summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index b0ac64e9e..e626dd78a 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.20 2004/06/22 22:45:52 dtucker Exp $ 1# $OpenBSD: test-exec.sh,v 1.22 2004/06/24 19:32:00 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -82,6 +82,9 @@ if [ "x$TEST_SSH_SCP" != "x" ]; then
82 SCP="${TEST_SSH_SCP}" 82 SCP="${TEST_SSH_SCP}"
83fi 83fi
84 84
85# Path to sshd must be absolute for rexec
86SSHD=`which sshd`
87
85# these should be used in tests 88# these should be used in tests
86export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP 89export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP
87#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP 90#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP
@@ -265,6 +268,27 @@ start_sshd ()
265 test -f $PIDFILE || fatal "no sshd running on port $PORT" 268 test -f $PIDFILE || fatal "no sshd running on port $PORT"
266} 269}
267 270
271# Start a sshd and then delete it
272start_sshd_copy_zap ()
273{
274 cp ${SSHD} $OBJ/sshd.copy
275 SSHD_CPY=`which $OBJ/sshd.copy`
276
277 # start sshd
278 $SUDO $SSHD_CPY -f $OBJ/sshd_config -t || fatal "sshd_config broken"
279 $SUDO $SSHD_CPY -f $OBJ/sshd_config
280
281 trace "wait for sshd"
282 i=0;
283 while [ ! -f $PIDFILE -a $i -lt 5 ]; do
284 i=`expr $i + 1`
285 sleep $i
286 done
287
288 test -f $PIDFILE || fatal "no sshd running on port $PORT"
289 rm -f $OBJ/sshd.copy
290}
291
268# source test body 292# source test body
269. $SCRIPT 293. $SCRIPT
270 294