From 405d338f74572305a0f0a6783c5e175fb99fe851 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 27 Oct 2022 00:07:19 +0200 Subject: [PATCH] autotest: Clear traps right before entering autotest_cleanup Currently, autotest_cleanup()'s failure causes the EXIT trap to run it again. This step is not necessary, so clear the traps prior running it. Signed-off-by: Michal Berger Change-Id: I8f841186bf9e9c0e82c8afc409129acad393efe8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15154 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Konrad Sztyber --- autotest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autotest.sh b/autotest.sh index 4536afa79..d92a0e93b 100755 --- a/autotest.sh +++ b/autotest.sh @@ -353,6 +353,8 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then fi fi +trap - SIGINT SIGTERM EXIT + timing_enter cleanup autotest_cleanup timing_exit cleanup @@ -360,8 +362,6 @@ timing_exit cleanup timing_exit autotest chmod a+r $output_dir/timing.txt -trap - SIGINT SIGTERM EXIT - [[ -f "$output_dir/udev.log" ]] && rm -f "$output_dir/udev.log" if hash lcov && ! [[ "$CC_TYPE" == *"clang"* ]]; then