summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/login-timeout.sh4
-rw-r--r--regress/reexec.sh11
-rw-r--r--regress/test-exec.sh25
3 files changed, 21 insertions, 19 deletions
diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh
index eb76f554b..12207fd99 100644
--- a/regress/login-timeout.sh
+++ b/regress/login-timeout.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: login-timeout.sh,v 1.7 2014/03/13 20:44:49 djm Exp $ 1# $OpenBSD: login-timeout.sh,v 1.8 2016/12/16 01:06:27 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="connect after login grace timeout" 4tid="connect after login grace timeout"
@@ -17,7 +17,7 @@ if [ $? -ne 0 ]; then
17 fail "ssh connect after login grace timeout failed with privsep" 17 fail "ssh connect after login grace timeout failed with privsep"
18fi 18fi
19 19
20$SUDO kill `$SUDO cat $PIDFILE` 20stop_sshd
21 21
22trace "test login grace without privsep" 22trace "test login grace without privsep"
23echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config 23echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config
diff --git a/regress/reexec.sh b/regress/reexec.sh
index 6ac648fd3..72957d4cd 100644
--- a/regress/reexec.sh
+++ b/regress/reexec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: reexec.sh,v 1.9 2016/12/15 23:50:37 dtucker Exp $ 1# $OpenBSD: reexec.sh,v 1.10 2016/12/16 01:06:27 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="reexec tests" 4tid="reexec tests"
@@ -39,8 +39,7 @@ echo "InvalidXXX=no" >> $OBJ/sshd_config
39 39
40copy_tests 40copy_tests
41 41
42$SUDO kill `$SUDO cat $PIDFILE` 42stop_sshd
43rm -f $PIDFILE
44 43
45cp $OBJ/sshd_config.orig $OBJ/sshd_config 44cp $OBJ/sshd_config.orig $OBJ/sshd_config
46 45
@@ -54,8 +53,7 @@ rm -f $SSHD_COPY
54 53
55copy_tests 54copy_tests
56 55
57$SUDO kill `$SUDO cat $PIDFILE` 56stop_sshd
58rm -f $PIDFILE
59 57
60verbose "test reexec fallback without privsep" 58verbose "test reexec fallback without privsep"
61 59
@@ -67,7 +65,6 @@ rm -f $SSHD_COPY
67 65
68copy_tests 66copy_tests
69 67
70$SUDO kill `$SUDO cat $PIDFILE` 68stop_sshd
71rm -f $PIDFILE
72 69
73fi 70fi
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 5d48706d4..bfa48803b 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.57 2016/11/25 03:02:01 dtucker Exp $ 1# $OpenBSD: test-exec.sh,v 1.58 2016/12/16 01:06:27 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -293,16 +293,8 @@ md5 () {
293} 293}
294# End of portable specific functions 294# End of portable specific functions
295 295
296# helper 296stop_sshd ()
297cleanup ()
298{ 297{
299 if [ "x$SSH_PID" != "x" ]; then
300 if [ $SSH_PID -lt 2 ]; then
301 echo bad pid for ssh: $SSH_PID
302 else
303 kill $SSH_PID
304 fi
305 fi
306 if [ -f $PIDFILE ]; then 298 if [ -f $PIDFILE ]; then
307 pid=`$SUDO cat $PIDFILE` 299 pid=`$SUDO cat $PIDFILE`
308 if [ "X$pid" = "X" ]; then 300 if [ "X$pid" = "X" ]; then
@@ -325,6 +317,19 @@ cleanup ()
325 fi 317 fi
326} 318}
327 319
320# helper
321cleanup ()
322{
323 if [ "x$SSH_PID" != "x" ]; then
324 if [ $SSH_PID -lt 2 ]; then
325 echo bad pid for ssh: $SSH_PID
326 else
327 kill $SSH_PID
328 fi
329 fi
330 stop_sshd
331}
332
328start_debug_log () 333start_debug_log ()
329{ 334{
330 echo "trace: $@" >$TEST_REGRESS_LOGFILE 335 echo "trace: $@" >$TEST_REGRESS_LOGFILE