From b9b389267759753493ba1a5102c9ff9fab91dfad Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 18 Jun 2013 21:50:58 +1000 Subject: [PATCH] go.crypto/ssh/test: Run sshd with -e, so the debug output goes onto stderr. R=dave, agl CC=golang-dev https://golang.org/cl/10230043 --- ssh/test/test_unix_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ssh/test/test_unix_test.go b/ssh/test/test_unix_test.go index 73f1287..4553254 100644 --- a/ssh/test/test_unix_test.go +++ b/ssh/test/test_unix_test.go @@ -56,7 +56,6 @@ HostbasedAuthentication no var ( configTmpl template.Template - sshd string // path to sshd rsakey *rsa.PrivateKey ) @@ -103,7 +102,11 @@ func clientConfig() *ssh.ClientConfig { } func (s *server) Dial(config *ssh.ClientConfig) *ssh.ClientConn { - s.cmd = exec.Command("sshd", "-f", s.configfile, "-i") + sshd, err := exec.LookPath("sshd") + if err != nil { + s.t.Skipf("skipping test: %v", err) + } + s.cmd = exec.Command(sshd, "-f", s.configfile, "-i", "-e") r1, w1, err := os.Pipe() if err != nil { s.t.Fatal(err)