Commit 5e65adcc authored by wanghailiangx's avatar wanghailiangx Committed by Tomasz Zawadzki
Browse files

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: default avatarwanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5366


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatar <qun.wan@intel.com>
parent 19fe6e50
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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