Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] skip tests when a program they need is missing
@ 2026-11-18  8:42 Daniel Wagner
  2026-11-18  8:42 ` [PATCH 1/5] check: unload modules when a test with a fallback device is skipped Daniel Wagner
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

Hi all,

a few tests run programs they don't check for, so they fail instead of
being skipped on a host without them. Worse, check leaves the modules
loaded when a test with a fallback device is skipped, which makes the
following tests skip too: a missing xfs_io for scsi/009 took out six
scsi and zbd tests.

The first patch fixes check, the others add the missing requirements.

On a Debian 13 VM with a 7.3 kernel and without these tools, all tests
that fail are kernel bugs except nvme/068. With the tools installed, a
run of all groups but meta goes from 81 to 120 passing tests. The
remaining failures are block/052, block/053, nvme/073, nvme/074,
nvme/076 and zbd/009, which hits a btrfs warning in
btrfs_schedule_zone_finish_bg().

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
Daniel Wagner (5):
      check: unload modules when a test with a fallback device is skipped
      nvme/053, nvme/068: skip if fio or xfs_io is missing
      nbd/003: skip if mkfs.ext4 is missing
      block/009, block/012: skip if hexdump is missing
      zbd/008: skip if fio or hexdump is missing

 check           | 3 +++
 tests/block/009 | 1 +
 tests/block/012 | 1 +
 tests/nbd/003   | 1 +
 tests/nvme/053  | 4 ++++
 tests/nvme/068  | 1 +
 tests/zbd/008   | 2 ++
 7 files changed, 13 insertions(+)
---
base-commit: 79c32fb31b7bca6a4383b749030128683cf6b6b4
change-id: 20261117-skip-missing-deps-30b4084698c4

Best regards,
--  
Daniel Wagner <dwagner@suse.de>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] check: unload modules when a test with a fallback device is skipped
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
@ 2026-11-18  8:42 ` Daniel Wagner
  2026-11-18  8:42 ` [PATCH 2/5] nvme/053, nvme/068: skip if fio or xfs_io is missing Daniel Wagner
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

The requirement checks load modules, e.g. _have_scsi_debug loads
scsi_debug. When a test with a fallback device is skipped before the
fallback device is created, the modules stay loaded, and the next tests
that need to load the module themselves skip. A missing xfs_io for
scsi/009 skips the scsi and zbd tests that follow it.

Unload the modules on these early returns as well.

Fixes: 1967331d6667 ("check: do not create fallback device when other requirements are not met")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 check | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/check b/check
index e8613936554e..a0ce930942d8 100755
--- a/check
+++ b/check
@@ -761,6 +761,7 @@ _check_and_call_test_device() {
 		if [[ $TEST_DEV == fallback ]]; then
 			if [[ -v SKIP_REASONS ]]; then
 				_output_notrun "$TEST_NAME"
+				_unload_modules
 				return 0
 			fi
 
@@ -768,6 +769,7 @@ _check_and_call_test_device() {
 			fb_dev_file="${OUTPUT}/${TEST_NAME/\//_}_fallback_dev"
 			if ! fallback_device > "$fb_dev_file"; then
 				_warning "$TEST_NAME: fallback_device call failure"
+				_unload_modules
 				return 0
 			fi
 			TEST_DEV=$(<"$fb_dev_file")
@@ -776,6 +778,7 @@ _check_and_call_test_device() {
 			if ! _find_sysfs_dirs "$TEST_DEV"; then
 				_warning "$TEST_NAME: could not find sysfs directory for ${TEST_DEV}"
 				cleanup_fallback_device
+				_unload_modules
 				return 0
 			fi
 			fallback=1

-- 
2.56.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] nvme/053, nvme/068: skip if fio or xfs_io is missing
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
  2026-11-18  8:42 ` [PATCH 1/5] check: unload modules when a test with a fallback device is skipped Daniel Wagner
@ 2026-11-18  8:42 ` Daniel Wagner
  2026-11-18  8:42 ` [PATCH 3/5] nbd/003: skip if mkfs.ext4 " Daniel Wagner
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

nvme/053 runs fio and nvme/068 runs xfs_io without checking for them, so
they fail instead of being skipped on a host without the tools. Check
for them in requires().

Fixes: ed9b60a05a3f ("nvme: add test for controller rescan under I/O load")
Fixes: ca59dfcce4ef ("nvme/068: add a test for multipath delayed removal")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/053 | 4 ++++
 tests/nvme/068 | 1 +
 2 files changed, 5 insertions(+)

diff --git a/tests/nvme/053 b/tests/nvme/053
index 99dbd3880edd..255cff177c0f 100755
--- a/tests/nvme/053
+++ b/tests/nvme/053
@@ -12,6 +12,10 @@ DESCRIPTION="test controller rescan under I/O load"
 TIMED=1
 : "${TIMEOUT:=60}"
 
+requires() {
+	_have_fio
+}
+
 get_sleep_time() {
 	local duration=$((RANDOM % 50 + 1))
 
diff --git a/tests/nvme/068 b/tests/nvme/068
index cab57cd62969..b9d28a50d03e 100755
--- a/tests/nvme/068
+++ b/tests/nvme/068
@@ -15,6 +15,7 @@ requires() {
 	_nvme_requires
 	_have_loop
 	_have_module_param_value nvme_core multipath Y
+	_have_program xfs_io
 	_require_nvme_trtype_is_fabrics
 }
 

-- 
2.56.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] nbd/003: skip if mkfs.ext4 is missing
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
  2026-11-18  8:42 ` [PATCH 1/5] check: unload modules when a test with a fallback device is skipped Daniel Wagner
  2026-11-18  8:42 ` [PATCH 2/5] nvme/053, nvme/068: skip if fio or xfs_io is missing Daniel Wagner
@ 2026-11-18  8:42 ` Daniel Wagner
  2026-11-18  8:42 ` [PATCH 4/5] block/009, block/012: skip if hexdump " Daniel Wagner
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

nbd/003 runs mkfs.ext4 without checking for it, so it fails instead of
being skipped on a host without e2fsprogs. Check for it in requires().

Fixes: f7b47c58e87c ("nbd/003:add mount and clear_sock test for nbd")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nbd/003 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/nbd/003 b/tests/nbd/003
index 4fabdebc8f6a..fdcfe0182653 100755
--- a/tests/nbd/003
+++ b/tests/nbd/003
@@ -13,6 +13,7 @@ QUICK=1
 requires() {
 	_have_nbd
 	_have_src_program mount_clear_sock
+	_have_program mkfs.ext4
 }
 
 test() {

-- 
2.56.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] block/009, block/012: skip if hexdump is missing
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
                   ` (2 preceding siblings ...)
  2026-11-18  8:42 ` [PATCH 3/5] nbd/003: skip if mkfs.ext4 " Daniel Wagner
@ 2026-11-18  8:42 ` Daniel Wagner
  2026-11-18  8:42 ` [PATCH 5/5] zbd/008: skip if fio or " Daniel Wagner
  2026-11-27  5:42 ` [PATCH 0/5] skip tests when a program they need " Shin'ichiro Kawasaki
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

block/009 and block/012 compare the device contents with hexdump, which
some distributions ship separately from util-linux, e.g. Debian in
bsdextrautils. Check for it in requires().

Fixes: 576668a4a6b1 ("add: Check page-cache coherency after BLKDISCARD")
Fixes: 3aeec46f048b ("block/012: add test for BLKROSET/BLKROGET ioctls")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/block/009 | 1 +
 tests/block/012 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/block/009 b/tests/block/009
index 8995646e5d21..1e3bc8ece8cf 100755
--- a/tests/block/009
+++ b/tests/block/009
@@ -14,6 +14,7 @@ DESCRIPTION="check page-cache coherency after BLKDISCARD"
 requires() {
 	_have_loadable_scsi_debug
 	_have_program xfs_io
+	_have_program hexdump
 }
 
 test() {
diff --git a/tests/block/012 b/tests/block/012
index c92f5b4b8dd2..430a3ac7f0b6 100755
--- a/tests/block/012
+++ b/tests/block/012
@@ -11,6 +11,7 @@ TIMED=1
 
 requires() {
 	_have_program xfs_io
+	_have_program hexdump
 }
 
 test_device() {

-- 
2.56.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] zbd/008: skip if fio or hexdump is missing
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
                   ` (3 preceding siblings ...)
  2026-11-18  8:42 ` [PATCH 4/5] block/009, block/012: skip if hexdump " Daniel Wagner
@ 2026-11-18  8:42 ` Daniel Wagner
  2026-11-27  5:42 ` [PATCH 0/5] skip tests when a program they need " Shin'ichiro Kawasaki
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Wagner @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki; +Cc: linux-block, linux-nvme, Daniel Wagner

zbd/008 runs fio and hexdump without checking for them. Check for them
in requires().

Fixes: a2737bbd421a ("zbd/008: check no stale page cache after BLKRESETZONE ioctl")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/zbd/008 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/zbd/008 b/tests/zbd/008
index cdfbedfd7976..480b3d55a122 100755
--- a/tests/zbd/008
+++ b/tests/zbd/008
@@ -15,7 +15,9 @@ TIMED=1
 requires() {
 	_have_loadable_scsi_debug
 	_have_module_param scsi_debug zbc
+	_have_fio
 	_have_program xfs_io
+	_have_program hexdump
 }
 
 test() {

-- 
2.56.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] skip tests when a program they need is missing
  2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
                   ` (4 preceding siblings ...)
  2026-11-18  8:42 ` [PATCH 5/5] zbd/008: skip if fio or " Daniel Wagner
@ 2026-11-27  5:42 ` Shin'ichiro Kawasaki
  5 siblings, 0 replies; 7+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-11-27  5:42 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: linux-block, linux-nvme

On Nov 18, 2026 / 09:42, Daniel Wagner wrote:
> Hi all,
> 
> a few tests run programs they don't check for, so they fail instead of
> being skipped on a host without them. Worse, check leaves the modules
> loaded when a test with a fallback device is skipped, which makes the
> following tests skip too: a missing xfs_io for scsi/009 took out six
> scsi and zbd tests.
> 
> The first patch fixes check, the others add the missing requirements.
> 
> On a Debian 13 VM with a 7.3 kernel and without these tools, all tests
> that fail are kernel bugs except nvme/068. With the tools installed, a
> run of all groups but meta goes from 81 to 120 passing tests. The
> remaining failures are block/052, block/053, nvme/073, nvme/074,
> nvme/076 and zbd/009, which hits a btrfs warning in
> btrfs_schedule_zone_finish_bg().
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>

Good fixes, I applied them. Thanks!


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-27  5:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  8:42 [PATCH 0/5] skip tests when a program they need is missing Daniel Wagner
2026-11-18  8:42 ` [PATCH 1/5] check: unload modules when a test with a fallback device is skipped Daniel Wagner
2026-11-18  8:42 ` [PATCH 2/5] nvme/053, nvme/068: skip if fio or xfs_io is missing Daniel Wagner
2026-11-18  8:42 ` [PATCH 3/5] nbd/003: skip if mkfs.ext4 " Daniel Wagner
2026-11-18  8:42 ` [PATCH 4/5] block/009, block/012: skip if hexdump " Daniel Wagner
2026-11-18  8:42 ` [PATCH 5/5] zbd/008: skip if fio or " Daniel Wagner
2026-11-27  5:42 ` [PATCH 0/5] skip tests when a program they need " Shin'ichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox