Commit 8f0e8ff1 authored by WANGHAILIANG's avatar WANGHAILIANG Committed by Tomasz Zawadzki
Browse files

test/nvme: fix a multiple bdf error



If there are two or more Nvme SSDs in system, $bdf includes many bdfs.
Function get_first_nvme_bdf() have no effect on local phy servers.
nvme_rpc.sh will report error as below.

 09:16:06       # /home//spdk/scripts/rpc.py bdev_nvme_attach_controller -b Nvme0 -t PCIe -a 0000:03:00.0 0000:04:00.0
usage: rpc.py [options]
rpc.py: error: unrecognized arguments: 0000:04:00.0

Change-Id: I91be02b874fcc4ee4626c082b16d06e722797744
Signed-off-by: default avatarWANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2715


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 415abe87
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1196,7 +1196,7 @@ function get_nvme_bdfs() {

# Same as function above, but just get the first disks BDF address
function get_first_nvme_bdf() {
	head -1 <<< $(get_nvme_bdfs)
	head -1 <<< "$(get_nvme_bdfs)"
}

# Define temp storage for all the tests. Look for 2GB at minimum