diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/multiplex.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/regress/multiplex.sh b/regress/multiplex.sh index c0adf109f..15e518c86 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: multiplex.sh,v 1.8 2004/06/22 03:12:13 markus Exp $ | 1 | # $OpenBSD: multiplex.sh,v 1.9 2004/11/07 00:32:41 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | CTL=$OBJ/ctl-sock | 4 | CTL=$OBJ/ctl-sock |
@@ -17,7 +17,11 @@ COPY=$OBJ/ls.copy | |||
17 | start_sshd | 17 | start_sshd |
18 | 18 | ||
19 | trace "start master, fork to background" | 19 | trace "start master, fork to background" |
20 | ${SSH} -2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -f somehost sleep 120 | 20 | ${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost & |
21 | MASTER_PID=$! | ||
22 | |||
23 | # Wait for master to start and authenticate | ||
24 | sleep 5 | ||
21 | 25 | ||
22 | verbose "test $tid: envpass" | 26 | verbose "test $tid: envpass" |
23 | trace "env passing over multiplexed connection" | 27 | trace "env passing over multiplexed connection" |
@@ -75,6 +79,15 @@ for s in 0 1 4 5 44; do | |||
75 | fi | 79 | fi |
76 | done | 80 | done |
77 | 81 | ||
78 | # kill master, remove control socket. ssh -MS will exit when sleep exits | 82 | trace "test check command" |
79 | $SUDO kill `cat $PIDFILE` | 83 | ${SSH} -S $CTL -Ocheck otherhost || fail "check command failed" |
80 | rm -f $CTL | 84 | |
85 | trace "test exit command" | ||
86 | ${SSH} -S $CTL -Oexit otherhost || fail "send exit command failed" | ||
87 | |||
88 | # Wait for master to exit | ||
89 | sleep 2 | ||
90 | |||
91 | ps -p $MASTER_PID >/dev/null && fail "exit command failed" | ||
92 | |||
93 | cleanup | ||