From 6c5d98817a3ca19c7ce5441758ba2c48d2178551 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 12 Nov 2021 14:24:48 +0100 Subject: [PATCH] autotest: Move revert_soft_roce() outside of autotest_cleanup() This function is part of test/nvmf/common.sh which is not included in the test/common/autotest_common.sh. This makes autotest_cleanup unusable unless parent script sources test/nvmf/common.sh directly. To make its scope more obvious, put the revert_soft_roce() inside autotest.sh. Signed-off-by: Michal Berger Change-Id: Id8a8cf448d73abb6fe924b452f984f6e5381266f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10206 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- autotest.sh | 3 ++- test/common/autotest_common.sh | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autotest.sh b/autotest.sh index e305b021d..07c7faf23 100755 --- a/autotest.sh +++ b/autotest.sh @@ -45,7 +45,7 @@ if [ $(uname -s) = Linux ]; then fi fi -trap "process_core || :; autotest_cleanup; exit 1" SIGINT SIGTERM EXIT +trap "process_core || :; autotest_cleanup || :; revert_soft_roce; exit 1" SIGINT SIGTERM EXIT timing_enter autotest @@ -353,6 +353,7 @@ fi timing_enter cleanup autotest_cleanup +revert_soft_roce timing_exit cleanup timing_exit autotest diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index c85aa3f5b..279c43750 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -1237,7 +1237,6 @@ function autotest_cleanup() { if [[ -e /proc/$udevadm_pid/status ]]; then kill "$udevadm_pid" || : fi - revert_soft_roce shopt -s nullglob local storage_fallback_purge=("${TMPDIR:-/tmp}/spdk."??????)