2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- // +build !windows,!solaris,!aix,! js
5
+ // +build !windows,!solaris,!js
6
6
7
7
package test
8
8
@@ -13,6 +13,7 @@ import (
13
13
"errors"
14
14
"fmt"
15
15
"io"
16
+ "runtime"
16
17
"strings"
17
18
"testing"
18
19
@@ -217,6 +218,11 @@ func TestKeyChange(t *testing.T) {
217
218
}
218
219
219
220
func TestInvalidTerminalMode (t * testing.T ) {
221
+ if runtime .GOOS == "aix" {
222
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
223
+ // a non-root user.
224
+ t .Skipf ("skipping on %s" , runtime .GOOS )
225
+ }
220
226
server := newServer (t )
221
227
defer server .Shutdown ()
222
228
conn := server .Dial (clientConfig ())
@@ -234,6 +240,11 @@ func TestInvalidTerminalMode(t *testing.T) {
234
240
}
235
241
236
242
func TestValidTerminalMode (t * testing.T ) {
243
+ if runtime .GOOS == "aix" {
244
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
245
+ // a non-root user.
246
+ t .Skipf ("skipping on %s" , runtime .GOOS )
247
+ }
237
248
server := newServer (t )
238
249
defer server .Shutdown ()
239
250
conn := server .Dial (clientConfig ())
@@ -278,6 +289,11 @@ func TestValidTerminalMode(t *testing.T) {
278
289
}
279
290
280
291
func TestWindowChange (t * testing.T ) {
292
+ if runtime .GOOS == "aix" {
293
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
294
+ // a non-root user.
295
+ t .Skipf ("skipping on %s" , runtime .GOOS )
296
+ }
281
297
server := newServer (t )
282
298
defer server .Shutdown ()
283
299
conn := server .Dial (clientConfig ())
@@ -351,7 +367,7 @@ func testOneCipher(t *testing.T, cipher string, cipherOrder []string) {
351
367
t .Fatalf ("NewSession: %v" , err )
352
368
}
353
369
354
- out , err := session .Output (fmt .Sprintf ("dd if=/dev/zero of=/dev/stdout bs=%d count=1" , numBytes ))
370
+ out , err := session .Output (fmt .Sprintf ("dd if=/dev/zero bs=%d count=1" , numBytes ))
355
371
if err != nil {
356
372
t .Fatalf ("Output: %v" , err )
357
373
}
0 commit comments