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: WANGHAILIANG <hailiangx.e.wang@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2715 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
415abe87fc
commit
8f0e8ff149
@ -1196,7 +1196,7 @@ function get_nvme_bdfs() {
|
|||||||
|
|
||||||
# Same as function above, but just get the first disks BDF address
|
# Same as function above, but just get the first disks BDF address
|
||||||
function get_first_nvme_bdf() {
|
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
|
# Define temp storage for all the tests. Look for 2GB at minimum
|
||||||
|
Loading…
Reference in New Issue
Block a user