@@ -13,6 +13,10 @@ requires() {
_have_kernel_option NVME_TARGET_PASSTHRU
}
+device_requires() {
+ _require_test_dev_is_not_nvme_multipath
+}
+
set_conditions() {
_set_nvme_trtype "$@"
}
@@ -14,6 +14,10 @@ requires() {
_have_fio
}
+device_requires() {
+ _require_test_dev_is_not_nvme_multipath
+}
+
set_conditions() {
_set_nvme_trtype "$@"
}
@@ -17,6 +17,7 @@ requires() {
}
device_requires() {
+ _require_test_dev_is_not_nvme_multipath
_require_test_dev_size "${NVME_IMG_SIZE}"
}
@@ -13,6 +13,10 @@ requires() {
_have_kernel_option NVME_TARGET_PASSTHRU
}
+device_requires() {
+ _require_test_dev_is_not_nvme_multipath
+}
+
set_conditions() {
_set_nvme_trtype "$@"
}
@@ -12,6 +12,10 @@ requires() {
_have_kernel_option NVME_TARGET_PASSTHRU
}
+device_requires() {
+ _require_test_dev_is_not_nvme_multipath
+}
+
set_conditions() {
_set_nvme_trtype "$@"
}
@@ -18,6 +18,10 @@ requires() {
_have_kernel_option FAULT_INJECTION_DEBUG_FS
}
+device_requires() {
+ _require_test_dev_is_not_nvme_multipath
+}
+
# Get the last dmesg lines as many as specified. Exclude the lines to indicate
# suppression by rate limit.
last_dmesg()
@@ -130,6 +130,14 @@ _require_test_dev_is_nvme() {
return 0
}
+_require_test_dev_is_not_nvme_multipath() {
+ if [[ "$(readlink -f "$TEST_DEV_SYSFS/device")" =~ /nvme-subsystem/ ]]; then
+ SKIP_REASONS+=("$TEST_DEV is a NVMe multipath device")
+ return 1
+ fi
+ return 0
+}
+
_require_nvme_test_img_size() {
local require_sz_mb
local nvme_img_size_mb
NVMe multipath devices have no associated character device that can be used for NVMe passtrhu. Skip them. Signed-off-by: Martin Wilck <mwilck@suse.com> --- v3: improve patch subject (Shinichiro Kawasaki) v2: used more expressive function name for non-multipath test (Daniel Wagner) --- tests/nvme/033 | 4 ++++ tests/nvme/034 | 4 ++++ tests/nvme/035 | 1 + tests/nvme/036 | 4 ++++ tests/nvme/037 | 4 ++++ tests/nvme/039 | 4 ++++ tests/nvme/rc | 8 ++++++++ 7 files changed, 29 insertions(+)