From bcf04682f1e1b3f06ae17997a40c59f1406d0e8d Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Tue, 9 Jun 2020 09:06:02 -0400 Subject: [PATCH] test/ocf: do not use iter_pci_class_code in OCF test See commit msg from db43b387: "Do not use iter_pci_class_code function in tests to iterate over NVMe drives. This function can return drives which at the moment of execution can not be whitelisted for use. This can result in test errors (such as simply bdev_nvme_attach_controller RPC command failing) or even using and deleting data from NVMe drive which was not meant to be used in tests." Signed-off-by: Tomasz Zawadzki Change-Id: Ifa70a51822f78e95b6cddbfe665ea95ec1b423c1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2837 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/ocf/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ocf/common.sh b/test/ocf/common.sh index 061236790..6c196ab97 100644 --- a/test/ocf/common.sh +++ b/test/ocf/common.sh @@ -11,7 +11,7 @@ function nvme_cfg() { } function clear_nvme() { - mapfile -t bdf < <(iter_all_pci_class_code 01 08 02) + mapfile -t bdf < <(get_first_nvme_bdf) # Clear metadata on NVMe device $rootdir/scripts/setup.sh reset