Skip to content

Commit 41d857e

Browse files
committed
ssh/test: delete TestInvalidTerminalMode
This test just tests the behaviour of the host sshd in the face of invalid terminal modes, and the RFCs say that the server "MAY" ignore such modes (and newer openssh does in fact ignore these modes rather than terminating the connection). Fixes golang/go#33919 Change-Id: I3f915aed22651e2eb33ec34044af8b125aeb82fa Reviewed-on: https://go-review.googlesource.com/c/crypto/+/192217 Run-TryBot: Michael Hudson-Doyle <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 9ce6e43 commit 41d857e

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

test/session_test.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,28 +217,6 @@ func TestKeyChange(t *testing.T) {
217217
}
218218
}
219219

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-
}
226-
server := newServer(t)
227-
defer server.Shutdown()
228-
conn := server.Dial(clientConfig())
229-
defer conn.Close()
230-
231-
session, err := conn.NewSession()
232-
if err != nil {
233-
t.Fatalf("session failed: %v", err)
234-
}
235-
defer session.Close()
236-
237-
if err = session.RequestPty("vt100", 80, 40, ssh.TerminalModes{255: 1984}); err == nil {
238-
t.Fatalf("req-pty failed: successful request with invalid mode")
239-
}
240-
}
241-
242220
func TestValidTerminalMode(t *testing.T) {
243221
if runtime.GOOS == "aix" {
244222
// On AIX, sshd cannot acquire /dev/pts/* if launched as

test/session_test.go-e

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,28 +217,6 @@ func TestKeyChange(t *testing.T) {
217217
}
218218
}
219219

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-
}
226-
server := newServer(t)
227-
defer server.Shutdown()
228-
conn := server.Dial(clientConfig())
229-
defer conn.Close()
230-
231-
session, err := conn.NewSession()
232-
if err != nil {
233-
t.Fatalf("session failed: %v", err)
234-
}
235-
defer session.Close()
236-
237-
if err = session.RequestPty("vt100", 80, 40, ssh.TerminalModes{255: 1984}); err == nil {
238-
t.Fatalf("req-pty failed: successful request with invalid mode")
239-
}
240-
}
241-
242220
func TestValidTerminalMode(t *testing.T) {
243221
if runtime.GOOS == "aix" {
244222
// On AIX, sshd cannot acquire /dev/pts/* if launched as

0 commit comments

Comments
 (0)