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 <michalx.berger@intel.com>
Change-Id: Id8a8cf448d73abb6fe924b452f984f6e5381266f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10206
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2021-11-12 14:24:48 +01:00 committed by Jim Harris
parent ea81ed5dbb
commit 6c5d98817a
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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."??????)