|
@@ -2,7 +2,7 @@
|
|
|
// Use of this source code is governed by a BSD-style
|
|
// Use of this source code is governed by a BSD-style
|
|
|
// license that can be found in the LICENSE file.
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
-// +build !windows,!solaris,!aix,!js
|
|
|
|
|
|
|
+// +build !windows,!solaris,!js
|
|
|
|
|
|
|
|
package test
|
|
package test
|
|
|
|
|
|
|
@@ -13,6 +13,7 @@ import (
|
|
|
"errors"
|
|
"errors"
|
|
|
"fmt"
|
|
"fmt"
|
|
|
"io"
|
|
"io"
|
|
|
|
|
+ "runtime"
|
|
|
"strings"
|
|
"strings"
|
|
|
"testing"
|
|
"testing"
|
|
|
|
|
|
|
@@ -217,6 +218,11 @@ func TestKeyChange(t *testing.T) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func TestInvalidTerminalMode(t *testing.T) {
|
|
func TestInvalidTerminalMode(t *testing.T) {
|
|
|
|
|
+ if runtime.GOOS == "aix" {
|
|
|
|
|
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
|
|
|
|
|
+ // a non-root user.
|
|
|
|
|
+ t.Skipf("skipping on %s", runtime.GOOS)
|
|
|
|
|
+ }
|
|
|
server := newServer(t)
|
|
server := newServer(t)
|
|
|
defer server.Shutdown()
|
|
defer server.Shutdown()
|
|
|
conn := server.Dial(clientConfig())
|
|
conn := server.Dial(clientConfig())
|
|
@@ -234,6 +240,11 @@ func TestInvalidTerminalMode(t *testing.T) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func TestValidTerminalMode(t *testing.T) {
|
|
func TestValidTerminalMode(t *testing.T) {
|
|
|
|
|
+ if runtime.GOOS == "aix" {
|
|
|
|
|
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
|
|
|
|
|
+ // a non-root user.
|
|
|
|
|
+ t.Skipf("skipping on %s", runtime.GOOS)
|
|
|
|
|
+ }
|
|
|
server := newServer(t)
|
|
server := newServer(t)
|
|
|
defer server.Shutdown()
|
|
defer server.Shutdown()
|
|
|
conn := server.Dial(clientConfig())
|
|
conn := server.Dial(clientConfig())
|
|
@@ -278,6 +289,11 @@ func TestValidTerminalMode(t *testing.T) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func TestWindowChange(t *testing.T) {
|
|
func TestWindowChange(t *testing.T) {
|
|
|
|
|
+ if runtime.GOOS == "aix" {
|
|
|
|
|
+ // On AIX, sshd cannot acquire /dev/pts/* if launched as
|
|
|
|
|
+ // a non-root user.
|
|
|
|
|
+ t.Skipf("skipping on %s", runtime.GOOS)
|
|
|
|
|
+ }
|
|
|
server := newServer(t)
|
|
server := newServer(t)
|
|
|
defer server.Shutdown()
|
|
defer server.Shutdown()
|
|
|
conn := server.Dial(clientConfig())
|
|
conn := server.Dial(clientConfig())
|
|
@@ -351,7 +367,7 @@ func testOneCipher(t *testing.T, cipher string, cipherOrder []string) {
|
|
|
t.Fatalf("NewSession: %v", err)
|
|
t.Fatalf("NewSession: %v", err)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- out, err := session.Output(fmt.Sprintf("dd if=/dev/zero of=/dev/stdout bs=%d count=1", numBytes))
|
|
|
|
|
|
|
+ out, err := session.Output(fmt.Sprintf("dd if=/dev/zero bs=%d count=1", numBytes))
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
t.Fatalf("Output: %v", err)
|
|
t.Fatalf("Output: %v", err)
|
|
|
}
|
|
}
|