diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2004-06-25 01:25:13 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2004-06-25 01:25:13 +0000 |
commit | 65511527b55de837b14f18a451a69cef05f84f23 (patch) | |
tree | ef2152d66f894101fbb8f7f7e15c889c1c5f458c /regress | |
parent | eaa0a0397cf98d29d225383ce8eca93bd0893d45 (diff) |
clean reexec-specific junk out of text-exec.sh and simplify; idea markus@
Diffstat (limited to 'regress')
-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 |