diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 23:12:15 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 23:12:15 +1100 |
commit | 79ec66e980ff830b8503dc4bde9c022b23c7825c (patch) | |
tree | dc401a68cb01db0d902d35bfbe2e3570e65ea18f /regress/multiplex.sh | |
parent | 124f58ecba39525af88e0619105656d383e515ff (diff) |
- djm@cvs.openbsd.org 2004/11/07 00:32:41
[multiplex.sh]
regression tests for new multiplex commands
Diffstat (limited to 'regress/multiplex.sh')
-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 | ||