summaryrefslogtreecommitdiff
path: root/regress/usr.bin/ssh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2017-07-28 10:32:09 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2017-07-28 10:32:09 +0000
commitaf1859eb772788013880a2b301b353f1996f8fe6 (patch)
treea6badf16df0cfe66e0bc8fca4e158dded8935255 /regress/usr.bin/ssh
parent5c66346501f463ff199dd53a71e3c12c04c72fa2 (diff)
Don't call fatal from stop_sshd since it calls cleanup which calls stop_sshd
which will probably fail in the same way. Instead, just bail. Differentiate between sshd dying without cleanup and not shutting down.
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r--regress/usr.bin/ssh/test-exec.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh
index 66e536bef54..68c8057f331 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.60 2017/04/30 23:34:55 djm Exp $
+# $OpenBSD: test-exec.sh,v 1.61 2017/07/28 10:32:08 dtucker Exp $
# Placed in the Public Domain.
USER=`id -un`
@@ -169,8 +169,15 @@ stop_sshd ()
i=`expr $i + 1`
sleep $i
done
- test -f $PIDFILE && \
- fatal "sshd didn't exit port $PORT pid $pid"
+ if test -f $PIDFILE; then
+ if $SUDO kill -0 $pid; then
+ echo "sshd didn't exit " \
+ "port $PORT pid $pid"
+ else
+ echo "sshd died without cleanup"
+ fi
+ exit 1
+ fi
fi
fi
fi