From 5e65adcc7df85487733ca823e1b0a94988f0670d Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Tue, 1 Dec 2020 11:01:43 -0500 Subject: [PATCH] autotest: uses unique name for the controller Although '|| true' has been added in rpc.py bdev_nvme_opal_revert -b nvme0 -p test || true, Backtrace also appears while running autotest.sh on none-opal nvme server. Now using unique name for the controller in opal_revert_cleanup() can fix the issue. Change-Id: Id65739f9d4c37e33817406a074350345a767e99c Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5366 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki Reviewed-by: --- test/common/autotest_common.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 1cef9f96f..047560eb5 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -1347,10 +1347,12 @@ function opal_revert_cleanup() { spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid + bdf_id=0 for bdf in "${bdfs[@]}"; do - $rootdir/scripts/rpc.py bdev_nvme_attach_controller -b "nvme0" -t "pcie" -a ${bdf} + $rootdir/scripts/rpc.py bdev_nvme_attach_controller -b "nvme"${bdf_id} -t "pcie" -a ${bdf} # Ignore if this fails. - $rootdir/scripts/rpc.py bdev_nvme_opal_revert -b nvme0 -p test || true + $rootdir/scripts/rpc.py bdev_nvme_opal_revert -b "nvme"${bdf_id} -p test || true + ((++bdf_id)) done killprocess $spdk_tgt_pid