diff options
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/ssh/reexec.sh | 13 | ||||
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 23 |
2 files changed, 13 insertions, 23 deletions
diff --git a/regress/usr.bin/ssh/reexec.sh b/regress/usr.bin/ssh/reexec.sh index c5ee58b26ff..f036ac7f303 100644 --- a/regress/usr.bin/ssh/reexec.sh +++ b/regress/usr.bin/ssh/reexec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: reexec.sh,v 1.1 2004/06/24 19:32:00 djm Exp $ +# $OpenBSD: reexec.sh,v 1.2 2004/06/25 01:25:11 djm Exp $ # Placed in the Public Domain. tid="reexec tests" @@ -6,6 +6,17 @@ tid="reexec tests" DATA=/bin/ls COPY=${OBJ}/copy +# Start a sshd and then delete it +start_sshd_copy_zap () +{ + cp ${SSHD} $OBJ/sshd.copy + SSHD_ORIG=$SSHD + SSHD=`which $OBJ/sshd.copy` + start_sshd + rm -f $SSHD + SSHD=$SSHD_ORIG +} + verbose "test config passing" cp $OBJ/sshd_config $OBJ/sshd_config.orig diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index b859521cd35..158df868205 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.22 2004/06/24 19:32:00 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.23 2004/06/25 01:25:12 djm Exp $ # Placed in the Public Domain. USER=`id -un` @@ -236,27 +236,6 @@ start_sshd () test -f $PIDFILE || fatal "no sshd running on port $PORT" } -# Start a sshd and then delete it -start_sshd_copy_zap () -{ - cp ${SSHD} $OBJ/sshd.copy - SSHD_CPY=`which $OBJ/sshd.copy` - - # start sshd - $SUDO $SSHD_CPY -f $OBJ/sshd_config -t || fatal "sshd_config broken" - $SUDO $SSHD_CPY -f $OBJ/sshd_config - - trace "wait for sshd" - i=0; - while [ ! -f $PIDFILE -a $i -lt 5 ]; do - i=`expr $i + 1` - sleep $i - done - - test -f $PIDFILE || fatal "no sshd running on port $PORT" - rm -f $OBJ/sshd.copy -} - # source test body . $SCRIPT |