summaryrefslogtreecommitdiff
path: root/regress/multiplex.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-12-06 23:12:15 +1100
committerDarren Tucker <dtucker@zip.com.au>2004-12-06 23:12:15 +1100
commit79ec66e980ff830b8503dc4bde9c022b23c7825c (patch)
treedc401a68cb01db0d902d35bfbe2e3570e65ea18f /regress/multiplex.sh
parent124f58ecba39525af88e0619105656d383e515ff (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.sh23
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
4CTL=$OBJ/ctl-sock 4CTL=$OBJ/ctl-sock
@@ -17,7 +17,11 @@ COPY=$OBJ/ls.copy
17start_sshd 17start_sshd
18 18
19trace "start master, fork to background" 19trace "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 &
21MASTER_PID=$!
22
23# Wait for master to start and authenticate
24sleep 5
21 25
22verbose "test $tid: envpass" 26verbose "test $tid: envpass"
23trace "env passing over multiplexed connection" 27trace "env passing over multiplexed connection"
@@ -75,6 +79,15 @@ for s in 0 1 4 5 44; do
75 fi 79 fi
76done 80done
77 81
78# kill master, remove control socket. ssh -MS will exit when sleep exits 82trace "test check command"
79$SUDO kill `cat $PIDFILE` 83${SSH} -S $CTL -Ocheck otherhost || fail "check command failed"
80rm -f $CTL 84
85trace "test exit command"
86${SSH} -S $CTL -Oexit otherhost || fail "send exit command failed"
87
88# Wait for master to exit
89sleep 2
90
91ps -p $MASTER_PID >/dev/null && fail "exit command failed"
92
93cleanup