Commit 6c5d9881 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

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: default avatarMichal 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent ea81ed5d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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."??????)