summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2012-10-05 11:45:39 +1000
committerDarren Tucker <dtucker@zip.com.au>2012-10-05 11:45:39 +1000
commit9b2c0360cf7de7b460f1740b4eb247c27da4630f (patch)
tree0fdf462c2dd2ffa4773772366959c667df3d3cb6
parent6fc5aa8b2e76790b136adfb68f98fe3fb7230a25 (diff)
- dtucker@cvs.openbsd.org 2012/09/10 00:49:21
[regress/multiplex.sh] 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".
-rw-r--r--ChangeLog5
-rw-r--r--regress/multiplex.sh23
2 files changed, 20 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d3f058ff..1c4dba6dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,11 @@
37 - dtucker@cvs.openbsd.org 2012/09/09 11:51:25 37 - dtucker@cvs.openbsd.org 2012/09/09 11:51:25
38 [regress/multiplex.sh] 38 [regress/multiplex.sh]
39 Add test for ssh -Ostop 39 Add test for ssh -Ostop
40 - dtucker@cvs.openbsd.org 2012/09/10 00:49:21
41 [regress/multiplex.sh]
42 Log -O cmd output to the log file and make logging consistent with the
43 other tests. Test clean shutdown of an existing channel when testing
44 "stop".
40 - [Makefile umac.c] Add special-case target to build umac128.o. 45 - [Makefile umac.c] Add special-case target to build umac128.o.
41 46
4220120917 4720120917
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index d8c751073..9169656dd 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: multiplex.sh,v 1.14 2012/09/09 11:51:25 dtucker Exp $ 1# $OpenBSD: multiplex.sh,v 1.15 2012/09/10 00:49:21 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4CTL=/tmp/openssh.regress.ctl-sock.$$ 4CTL=/tmp/openssh.regress.ctl-sock.$$
@@ -78,11 +78,13 @@ for s in 0 1 4 5 44; do
78 fi 78 fi
79done 79done
80 80
81trace "test check command" 81verbose "test $tid: cmd check"
82${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost || fail "check command failed" 82${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_SSH_LOGFILE 2>&1 \
83 || fail "check command failed"
83 84
84trace "test exit command" 85verbose "test $tid: cmd exit"
85${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost || fail "send exit command failed" 86${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_SSH_LOGFILE 2>&1 \
87 || fail "send exit command failed"
86 88
87# Wait for master to exit 89# Wait for master to exit
88sleep 2 90sleep 2
@@ -94,7 +96,12 @@ trace "start master, fork to background"
94${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost & 96${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost &
95MASTER_PID=$! 97MASTER_PID=$!
96sleep 5 # Wait for master to start and authenticate 98sleep 5 # Wait for master to start and authenticate
97trace "test stop command" 99verbose "test $tid: cmd stop"
98${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost || fail "send stop command failed" 100${SSH} -F $OBJ/ssh_config -S $CTL otherhost "sleep 10; exit 0" &
99sleep 2 # Wait for master to exit 101SLEEP_PID=$!
102${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_SSH_LOGFILE 2>&1 \
103 || fail "send stop command failed"
104sleep 12 # Wait for master to exit
105wait $SLEEP_PID
106[ $! != 0 ] || fail "stop with concurrent command"
100ps -p $MASTER_PID >/dev/null && fail "stop command failed" 107ps -p $MASTER_PID >/dev/null && fail "stop command failed"