diff options
author | dtucker <dtucker> | 2004-06-25 03:45:18 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2004-06-25 03:45:18 +0000 |
commit | 045e6f4bf4801df2ef15b75f9ecf83f6bd5778a3 (patch) | |
tree | 0e3f6bce547c62429591d2d96fc85d73e9dde935 /regress/test-exec.sh | |
parent | 488657804f0eb1bd6ef8e09be26b03a06a9704a8 (diff) | |
download | openssh-045e6f4bf4801df2ef15b75f9ecf83f6bd5778a3.tar.gz |
- djm@cvs.openbsd.org 2004/06/24 19:32:00
[regress/Makefile regress/test-exec.sh, added regress/reexec.sh]
regress test for re-exec corner cases
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index b0ac64e9..e626dd78 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.20 2004/06/22 22:45:52 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.22 2004/06/24 19:32:00 djm Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -82,6 +82,9 @@ if [ "x$TEST_SSH_SCP" != "x" ]; then SCP="${TEST_SSH_SCP}" fi +# Path to sshd must be absolute for rexec +SSHD=`which sshd` + # these should be used in tests export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP @@ -265,6 +268,27 @@ 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 |