From: Jeffrey Lien Date: Tue, 25 Sep 2018 14:45:07 +0000 (+0000) Subject: Fix nvme test device selection to use controller value defined in the config.json... X-Git-Tag: v1.7~59 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9037a33d088663f9b9fae920ced4a61e3efdfa7d;p=users%2Fsagi%2Fnvme-cli.git Fix nvme test device selection to use controller value defined in the config.json file. Before this fix, the value was hard coded to nvme0. Signed-off-by: Jeff Lien --- diff --git a/tests/nvme_test.py b/tests/nvme_test.py index d735863d..d4409ecf 100644 --- a/tests/nvme_test.py +++ b/tests/nvme_test.py @@ -76,7 +76,8 @@ class TestNVMe(object): - Returns: - None """ - cmd = cmd = "find /sys/devices -name \\*nvme0 | grep -i pci" + x1, x2, dev = self.ctrl.split('/') + cmd = cmd = "find /sys/devices -name \\*" + dev + " | grep -i pci" err = subprocess.call(cmd, shell=True) assert_equal(err, 0, "ERROR : Only NVMe PCI subsystem is supported")