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 <michal.berger@intel.com>
Change-Id: I8f841186bf9e9c0e82c8afc409129acad393efe8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15154
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
Michal Berger 2022-10-27 00:07:19 +02:00 committed by Tomasz Zawadzki
parent 0252bdbf60
commit 405d338f74

View File

@ -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