diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2012-09-10 00:49:22 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2012-09-10 00:49:22 +0000 |
commit | 9768434a12db19b3733b0e34f316aa790d5adaf7 (patch) | |
tree | e9f4a91b9bdf1a322932e11cee53bf52d7f95de7 /regress/usr.bin/ssh/multiplex.sh | |
parent | 505630b045b1c95f3e4fee3a4d3339777222550c (diff) |
Log -O cmd output to the log file and make logging consistent with the other
tests. Test clean shutdown of an existing channel when testing "stop".
Diffstat (limited to 'regress/usr.bin/ssh/multiplex.sh')
-rw-r--r-- | regress/usr.bin/ssh/multiplex.sh | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/regress/usr.bin/ssh/multiplex.sh b/regress/usr.bin/ssh/multiplex.sh index 2613f193aad..9eaf3eaf877 100644 --- a/regress/usr.bin/ssh/multiplex.sh +++ b/regress/usr.bin/ssh/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.14 2012/09/09 11:51:25 dtucker Exp $ +# $OpenBSD: multiplex.sh,v 1.15 2012/09/10 00:49:21 dtucker Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock @@ -73,11 +73,13 @@ for s in 0 1 4 5 44; do fi done -trace "test check command" -${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost || fail "check command failed" +verbose "test $tid: cmd check" +${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_SSH_LOGFILE 2>&1 \ + || fail "check command failed" -trace "test exit command" -${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost || fail "send exit command failed" +verbose "test $tid: cmd exit" +${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_SSH_LOGFILE 2>&1 \ + || fail "send exit command failed" # Wait for master to exit sleep 2 @@ -89,7 +91,12 @@ trace "start master, fork to background" ${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost & MASTER_PID=$! sleep 5 # Wait for master to start and authenticate -trace "test stop command" -${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost || fail "send stop command failed" -sleep 2 # Wait for master to exit +verbose "test $tid: cmd stop" +${SSH} -F $OBJ/ssh_config -S $CTL otherhost "sleep 10; exit 0" & +SLEEP_PID=$! +${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_SSH_LOGFILE 2>&1 \ + || fail "send stop command failed" +sleep 12 # Wait for master to exit +wait $SLEEP_PID +[ $! != 0 ] || fail "stop with concurrent command" ps -p $MASTER_PID >/dev/null && fail "stop command failed" |