diff options
Diffstat (limited to 'regress/multiplex.sh')
-rw-r--r-- | regress/multiplex.sh | 23 |
1 files changed, 15 insertions, 8 deletions
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" |