nvme/test: Fix NVMe & setup.sh mounts test
We should brake through both loops of tests, but currently we break only through one. Also change the way the blk name is assigned to not overwrite it. Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: I9a4ce004e1115301080c86ceb9a429cd6fc831e3 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461250 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
0901744bb1
commit
0c7ce64f3a
@ -42,13 +42,12 @@ if [ $(uname) = Linux ]; then
|
|||||||
# note: more work probably needs to be done to properly handle devices with multiple
|
# note: more work probably needs to be done to properly handle devices with multiple
|
||||||
# namespaces
|
# namespaces
|
||||||
for bdf in $(iter_pci_class_code 01 08 02); do
|
for bdf in $(iter_pci_class_code 01 08 02); do
|
||||||
for blkname in $(get_nvme_name_from_bdf $bdf); do
|
for name in $(get_nvme_name_from_bdf $bdf); do
|
||||||
if [ "$blkname" != "" ]; then
|
if [ "$name" != "" ]; then
|
||||||
mountpoints=$(lsblk /dev/$blkname --output MOUNTPOINT -n | wc -w)
|
mountpoints=$(lsblk /dev/$name --output MOUNTPOINT -n | wc -w)
|
||||||
if [ "$mountpoints" = "0" ]; then
|
if [ "$mountpoints" = "0" ]; then
|
||||||
break
|
blkname=$name
|
||||||
else
|
break 2
|
||||||
blkname=''
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user