From 8f0e8ff14996d0661990c86811edbf058eab1cc6 Mon Sep 17 00:00:00 2001 From: WANGHAILIANG Date: Mon, 1 Jun 2020 16:38:08 +0800 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2715 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/common/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 121dbd25b..118f5f846 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -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