22// Use of this source code is governed by a BSD-style
33// license that can be found in the LICENSE file.
44
5- // +build !windows,!solaris,!aix,! js
5+ // +build !windows,!solaris,!js
66
77package test
88
@@ -13,6 +13,7 @@ import (
1313 "errors"
1414 "fmt"
1515 "io"
16+ "runtime"
1617 "strings"
1718 "testing"
1819
@@ -217,6 +218,11 @@ func TestKeyChange(t *testing.T) {
217218}
218219
219220func 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+ }
220226 server := newServer (t )
221227 defer server .Shutdown ()
222228 conn := server .Dial (clientConfig ())
@@ -234,6 +240,11 @@ func TestInvalidTerminalMode(t *testing.T) {
234240}
235241
236242func 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+ }
237248 server := newServer (t )
238249 defer server .Shutdown ()
239250 conn := server .Dial (clientConfig ())
@@ -278,6 +289,11 @@ func TestValidTerminalMode(t *testing.T) {
278289}
279290
280291func 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+ }
281297 server := newServer (t )
282298 defer server .Shutdown ()
283299 conn := server .Dial (clientConfig ())
@@ -351,7 +367,7 @@ func testOneCipher(t *testing.T, cipher string, cipherOrder []string) {
351367 t .Fatalf ("NewSession: %v" , err )
352368 }
353369
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 ))
355371 if err != nil {
356372 t .Fatalf ("Output: %v" , err )
357373 }
0 commit comments