diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-06-12 15:43:33 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-06-12 15:43:33 +0000 |
commit | 371c5e085f448c12c50770b507d57bc60aa06836 (patch) | |
tree | 853b7b0965b907c05d79faa1dd5d6bed22886ce2 /regress | |
parent | fc02b9486fadd22f3bfeeaa603d45e614b4f08fc (diff) |
test -HUP; dtucker at zip.com.au
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/ssh/Makefile | 3 | ||||
-rw-r--r-- | regress/usr.bin/ssh/reconfigure.sh | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile index 837ead68b0f..d66d1a6b640 100644 --- a/regress/usr.bin/ssh/Makefile +++ b/regress/usr.bin/ssh/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2003/04/04 09:34:22 djm Exp $ +# $OpenBSD: Makefile,v 1.23 2003/06/12 15:43:32 markus Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 @@ -27,6 +27,7 @@ LTESTS= connect \ sftp-cmds \ sftp-badcmds \ sftp-batch \ + reconfigure \ forwarding USER!= id -un diff --git a/regress/usr.bin/ssh/reconfigure.sh b/regress/usr.bin/ssh/reconfigure.sh new file mode 100644 index 00000000000..1de846a7e96 --- /dev/null +++ b/regress/usr.bin/ssh/reconfigure.sh @@ -0,0 +1,28 @@ +# $OpenBSD: reconfigure.sh,v 1.1 2003/06/12 15:43:32 markus Exp $ +# Placed in the Public Domain. + +tid="simple connect after reconfigure" + +# we need the full path to sshd for -HUP +SSHD=/usr/sbin/sshd + +start_sshd + +kill -HUP `cat $PIDFILE` +sleep 1 + +trace "wait for sshd to restart" +i=0; +while [ ! -f $PIDFILE -a $i -lt 10 ]; do + i=`expr $i + 1` + sleep $i +done + +test -f $PIDFILE || fatal "sshd did not restart" + +for p in 1 2; do + ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true + if [ $? -ne 0 ]; then + fail "ssh connect with protocol $p failed after reconfigure" + fi +done |