test/rpc: add multiple NVMe bdev support in the rpc_config.py

Change-Id: I923c808affabdb97a5237b76f9f5534d6fb41601
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/411048
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Liang Yan 2018-05-14 10:19:22 +08:00 committed by Daniel Verkamp
parent 3148c48079
commit 04ad0ad9f1

View File

@ -461,7 +461,7 @@ def verify_add_nvme_bdev_rpc_methods(rpc_py):
output = check_output(["lspci", "-mm", "-nn"])
addrs = re.findall('^([0-9]{2}:[0-9]{2}.[0-9]) "Non-Volatile memory controller \[0108\]".*-p02', output.decode(), re.MULTILINE)
for addr in addrs:
ctrlr_address = "-b Nvme0 -t pcie -a 0000:{}".format(addr)
ctrlr_address = "-b Nvme{} -t pcie -a 0000:{}".format(addrs.index(addr), addr)
rpc.construct_nvme_bdev(ctrlr_address)
print("add nvme device passed first time")
test_pass = 0