Commit 4041ab04 authored by xuhuagen's avatar xuhuagen Committed by Jim Harris
Browse files

Test: fix the syntax error issue in the nvme.sh



The nvme.sh will report error If more than one NVMe devices in the system.
Update the nvme.sh to fix this issue.

Change-Id: I9685394ec53eb036f7580a383619bca559f95c60
Signed-off-by: default avatarxuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/394870


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent f587197d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9,10 +9,10 @@ source $rootdir/scripts/autotest_common.sh

function get_nvme_name_from_bdf {
	lsblk -d --output NAME
	if ! [ $(lsblk -d --output NAME | grep "^nvme") ]; then
	nvme_devs=$(lsblk -d --output NAME | grep "^nvme") || true
	if [ -z "$nvme_devs" ]; then
		return
	fi
	nvme_devs=`lsblk -d --output NAME | grep "^nvme"`
	for dev in $nvme_devs; do
		link_name=$(readlink /sys/block/$dev/device/device) || true
		if [ -z "$link_name" ]; then