diff options
author | Darren Tucker <dtucker@zip.com.au> | 2012-10-05 11:45:39 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2012-10-05 11:45:39 +1000 |
commit | 9b2c0360cf7de7b460f1740b4eb247c27da4630f (patch) | |
tree | 0fdf462c2dd2ffa4773772366959c667df3d3cb6 | |
parent | 6fc5aa8b2e76790b136adfb68f98fe3fb7230a25 (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-- | ChangeLog | 5 | ||||
-rw-r--r-- | regress/multiplex.sh | 23 |
2 files changed, 20 insertions, 8 deletions
@@ -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 | ||
42 | 20120917 | 47 | 20120917 |
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 | ||
4 | CTL=/tmp/openssh.regress.ctl-sock.$$ | 4 | CTL=/tmp/openssh.regress.ctl-sock.$$ |
@@ -78,11 +78,13 @@ for s in 0 1 4 5 44; do | |||
78 | fi | 78 | fi |
79 | done | 79 | done |
80 | 80 | ||
81 | trace "test check command" | 81 | verbose "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 | ||
84 | trace "test exit command" | 85 | verbose "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 |
88 | sleep 2 | 90 | sleep 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 & |
95 | MASTER_PID=$! | 97 | MASTER_PID=$! |
96 | sleep 5 # Wait for master to start and authenticate | 98 | sleep 5 # Wait for master to start and authenticate |
97 | trace "test stop command" | 99 | verbose "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" & |
99 | sleep 2 # Wait for master to exit | 101 | SLEEP_PID=$! |
102 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_SSH_LOGFILE 2>&1 \ | ||
103 | || fail "send stop command failed" | ||
104 | sleep 12 # Wait for master to exit | ||
105 | wait $SLEEP_PID | ||
106 | [ $! != 0 ] || fail "stop with concurrent command" | ||
100 | ps -p $MASTER_PID >/dev/null && fail "stop command failed" | 107 | ps -p $MASTER_PID >/dev/null && fail "stop command failed" |