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.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 5d48706d..bfa48803 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.57 2016/11/25 03:02:01 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.58 2016/12/16 01:06:27 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -293,16 +293,8 @@ md5 () {
}
# End of portable specific functions
-# helper
-cleanup ()
+stop_sshd ()
{
- if [ "x$SSH_PID" != "x" ]; then
- if [ $SSH_PID -lt 2 ]; then
- echo bad pid for ssh: $SSH_PID
- else
- kill $SSH_PID
- fi
- fi
if [ -f $PIDFILE ]; then
pid=`$SUDO cat $PIDFILE`
if [ "X$pid" = "X" ]; then
@@ -325,6 +317,19 @@ cleanup ()
fi
}
+# helper
+cleanup ()
+{
+ if [ "x$SSH_PID" != "x" ]; then
+ if [ $SSH_PID -lt 2 ]; then
+ echo bad pid for ssh: $SSH_PID
+ else
+ kill $SSH_PID
+ fi
+ fi
+ stop_sshd
+}
+
start_debug_log ()
{
echo "trace: $@" >$TEST_REGRESS_LOGFILE