From: Petr Špaček Date: Mon, 17 Aug 2020 12:24:19 +0000 (+0200) Subject: tests: kill background tasks when config test exits X-Git-Tag: v5.1.3~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b1cdbf8752a13a2db4865c5f07c585ab3ac8a14;p=thirdparty%2Fknot-resolver.git tests: kill background tasks when config test exits In theory there should be no background task but we need cleanup in case kresd gets into infinite loop or something like that. --- diff --git a/scripts/test-config.sh b/scripts/test-config.sh index 25f2662f3..3ae6c3aae 100755 --- a/scripts/test-config.sh +++ b/scripts/test-config.sh @@ -13,6 +13,7 @@ TEST_DIR="$(dirname ${TEST_FILE})" TMP_RUNDIR="$(mktemp -d)" function finish { + kill -s 9 $(jobs -p) || : rm -rf "${TMP_RUNDIR}" } trap finish EXIT