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: xuhuagen <huagenx.xu@intel.com> Reviewed-on: https://review.gerrithub.io/394870 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f587197d21
commit
4041ab04fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user