diff --git a/apps/wolfsshd/test/run_all_sshd_tests.sh b/apps/wolfsshd/test/run_all_sshd_tests.sh index 2218ef28..7f7afe2a 100755 --- a/apps/wolfsshd/test/run_all_sshd_tests.sh +++ b/apps/wolfsshd/test/run_all_sshd_tests.sh @@ -142,6 +142,11 @@ export WOLFSSHD_TEST_PIDFILE # script's exit status, which would turn a passing run red. run_teardown() { if [ "$USING_LOCAL_HOST" == 1 ]; then + # Before the sweep, and idempotent: this is what removes $SSHD_KEYDIR, + # the temp dir holding the rewritten config and the root-owned copies + # of the trust anchors. The early exits -- a daemon that will not + # start, a failed test -- never reach a stop of their own. + stop_wolfsshd || true stop_all_wolfsshd || true fi rm -f "$WOLFSSHD_TEST_PIDFILE" || true