From: djm Date: Tue, 22 Jul 2014 01:32:12 +0000 (+0000) Subject: change the test for still-open Unix domain sockets to be robust against X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d01f9bc86e5674c2f7375f0ef63964ec30c3e732;p=openbsd change the test for still-open Unix domain sockets to be robust against nc implementations that produce error messages. from -portable --- diff --git a/regress/usr.bin/ssh/multiplex.sh b/regress/usr.bin/ssh/multiplex.sh index 8e51f50d8b5..704ccbbdbec 100644 --- a/regress/usr.bin/ssh/multiplex.sh +++ b/regress/usr.bin/ssh/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.24 2014/07/15 15:54:15 millert Exp $ +# $OpenBSD: multiplex.sh,v 1.25 2014/07/22 01:32:12 djm Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock @@ -137,7 +137,7 @@ echo "" | nc -U $OBJ/unix-1.fwd | grep "Protocol mismatch" >/dev/null 2>&1 \ || fail "connect to local forward path failed" ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \ || fail "cancel local forward failed" -N=$(echo "" | nc -U $OBJ/unix-1.fwd 2>&1 | wc -l) +N=$(echo "xyzzy" | nc -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l) test ${N} -eq 0 || fail "local forward path still listening" rm -f $OBJ/unix-1.fwd @@ -148,7 +148,7 @@ echo "" | nc -U $OBJ/unix-1.fwd | grep "Protocol mismatch" >/dev/null 2>&1 \ || fail "connect to remote forwarded path failed" ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \ || fail "cancel remote forward failed" -N=$(echo "" | nc -U $OBJ/unix-1.fwd 2>&1 | wc -l) +N=$(echo "xyzzy" | nc -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l) test ${N} -eq 0 || fail "remote forward path still listening" rm -f $OBJ/unix-1.fwd