diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2012-09-09 11:51:26 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2012-09-09 11:51:26 +0000 |
commit | 9de70e50b19d5d2ee8bb6909769214c66439c802 (patch) | |
tree | 3abccf9eee9c8bb34b1d5ff835ab818af46d8115 /regress | |
parent | 0d3ecf9a0af1218786796ea9803a89878a701907 (diff) |
Add test for ssh -Ostop
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/ssh/multiplex.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/multiplex.sh b/regress/usr.bin/ssh/multiplex.sh index 44974fc26b5..2613f193aad 100644 --- a/regress/usr.bin/ssh/multiplex.sh +++ b/regress/usr.bin/ssh/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.13 2012/06/01 00:47:36 djm Exp $ +# $OpenBSD: multiplex.sh,v 1.14 2012/09/09 11:51:25 dtucker Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock @@ -82,4 +82,14 @@ ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost || fail "send exit command fa # Wait for master to exit sleep 2 -ps -p $MASTER_PID >/dev/null && fail "exit command failed" +ps -p $MASTER_PID >/dev/null && fail "exit command failed" + +# Restart master and test -O stop command with master using -N +trace "start master, fork to background" +${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost & +MASTER_PID=$! +sleep 5 # Wait for master to start and authenticate +trace "test stop command" +${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost || fail "send stop command failed" +sleep 2 # Wait for master to exit +ps -p $MASTER_PID >/dev/null && fail "stop command failed" |