From 9de70e50b19d5d2ee8bb6909769214c66439c802 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 9 Sep 2012 11:51:26 +0000 Subject: Add test for ssh -Ostop --- regress/usr.bin/ssh/multiplex.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'regress') 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" -- cgit v1.2.3