[PATCH 2/3] blktests: nvme/032: skip on non-PCI devices
Martin Wilck
martin.wilck at suse.com
Thu Aug 22 12:38:13 PDT 2024
nvme/032 is a PCI-specific test.
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
tests/nvme/032 | 2 +-
tests/nvme/rc | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/nvme/032 b/tests/nvme/032
index 5353e96..512d7ea 100755
--- a/tests/nvme/032
+++ b/tests/nvme/032
@@ -24,7 +24,7 @@ requires() {
}
device_requires() {
- _require_test_dev_is_nvme
+ _require_test_dev_is_nvme_pci
}
test_device() {
diff --git a/tests/nvme/rc b/tests/nvme/rc
index b3b1149..e7d2ab1 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -130,6 +130,14 @@ _require_test_dev_is_nvme() {
return 0
}
+_require_test_dev_is_nvme_pci() {
+ if [[ ! "$(readlink -f "$TEST_DEV_SYSFS/device")" =~ devices/pci ]]; then
+ SKIP_REASONS+=("$TEST_DEV is not a PCI NVMe device")
+ return 1
+ fi
+ return 0
+}
+
_require_test_dev_is_nvme_no_mpath() {
if [[ "$(readlink -f "$TEST_DEV_SYSFS/device")" =~ /nvme-subsystem/ ]]; then
SKIP_REASONS+=("$TEST_DEV is a NVMe multipath device")
--
2.46.0
More information about the Linux-nvme
mailing list