From 0d2316b26734542fda0a2df69f586b811740edf4 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 18 Feb 2024 15:50:20 +0100 Subject: [PATCH] ssh/test: work around for TestCiphers failures on macOS TestCiphers is already skipped on macOS when testing data received from the server, so move the test for sending data after the receiving one to work around this new integration test failure. Fixes golang/go#65732 Change-Id: Ie0c614c5373735ae8aefdd7ded643579b130f4b3 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/564457 Reviewed-by: Bryan Mills Reviewed-by: Carlos Amedee LUCI-TryBot-Result: Go LUCI Auto-Submit: Nicola Murino Commit-Queue: Nicola Murino --- ssh/test/session_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssh/test/session_test.go b/ssh/test/session_test.go index 7925e95278..e9bfa9ec27 100644 --- a/ssh/test/session_test.go +++ b/ssh/test/session_test.go @@ -357,11 +357,6 @@ func testOneCipher(t *testing.T, cipher string, cipherOrder []string) { numBytes := 4096 - // Exercise sending data to the server - if _, _, err := conn.Conn.SendRequest("drop-me", false, make([]byte, numBytes)); err != nil { - t.Fatalf("SendRequest: %v", err) - } - // Exercise receiving data from the server session, err := conn.NewSession() if err != nil { @@ -377,6 +372,11 @@ func testOneCipher(t *testing.T, cipher string, cipherOrder []string) { if len(out) != numBytes { t.Fatalf("got %d bytes, want %d bytes", len(out), numBytes) } + + // Exercise sending data to the server + if _, _, err := conn.Conn.SendRequest("drop-me", false, make([]byte, numBytes)); err != nil { + t.Fatalf("SendRequest: %v", err) + } } var deprecatedCiphers = []string{