diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-04-30 23:34:56 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-04-30 23:34:56 +0000 |
commit | 09f4276679d05b77296d2fe03f941b34b56d8153 (patch) | |
tree | 89cce7c82f6612cdf11c19204971b39a7ee52b18 /regress/usr.bin/ssh/exit-status.sh | |
parent | 67c2333ec0216dfb41d7f9b00682cf192e48065f (diff) |
eliminate explicit specification of protocol in tests and loops over
protocol. We only support SSHv2 now.
Diffstat (limited to 'regress/usr.bin/ssh/exit-status.sh')
-rw-r--r-- | regress/usr.bin/ssh/exit-status.sh | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/regress/usr.bin/ssh/exit-status.sh b/regress/usr.bin/ssh/exit-status.sh index 397d8d732fe..aadf99fb3c8 100644 --- a/regress/usr.bin/ssh/exit-status.sh +++ b/regress/usr.bin/ssh/exit-status.sh @@ -1,24 +1,22 @@ -# $OpenBSD: exit-status.sh,v 1.7 2015/03/03 22:35:19 markus Exp $ +# $OpenBSD: exit-status.sh,v 1.8 2017/04/30 23:34:55 djm Exp $ # Placed in the Public Domain. tid="remote exit status" -for p in ${SSH_PROTOCOLS}; do - for s in 0 1 4 5 44; do - trace "proto $p status $s" - verbose "test $tid: proto $p status $s" - ${SSH} -$p -F $OBJ/ssh_proxy otherhost exit $s - r=$? - if [ $r -ne $s ]; then - fail "exit code mismatch for protocol $p: $r != $s" - fi +for s in 0 1 4 5 44; do + trace "status $s" + verbose "test $tid: status $s" + ${SSH} -F $OBJ/ssh_proxy otherhost exit $s + r=$? + if [ $r -ne $s ]; then + fail "exit code mismatch for: $r != $s" + fi - # same with early close of stdout/err - ${SSH} -$p -F $OBJ/ssh_proxy -n otherhost \ - exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\' - r=$? - if [ $r -ne $s ]; then - fail "exit code (with sleep) mismatch for protocol $p: $r != $s" - fi - done + # same with early close of stdout/err + ${SSH} -F $OBJ/ssh_proxy -n otherhost exec \ + sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\' + r=$? + if [ $r -ne $s ]; then + fail "exit code (with sleep) mismatch for: $r != $s" + fi done |