summaryrefslogtreecommitdiff
path: root/regress/multiplex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/multiplex.sh')
-rw-r--r--regress/multiplex.sh23
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
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"