From 371c5e085f448c12c50770b507d57bc60aa06836 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Thu, 12 Jun 2003 15:43:33 +0000 Subject: test -HUP; dtucker at zip.com.au --- regress/usr.bin/ssh/Makefile | 3 ++- regress/usr.bin/ssh/reconfigure.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 regress/usr.bin/ssh/reconfigure.sh (limited to 'regress/usr.bin/ssh') 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 -- cgit v1.2.3