Skip to contentSkip to conversation

xfs/262: call _supports_xfs_scrub

PATCH In review Christoph Hellwig 2 participants 3 messages Jan 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs/262: call _supports_xfs_scrub

Call _supports_xfs_scrub so that the test is _notrun on kernels without online scrub support.

---
 tests/xfs/262 | 3 +++
 1 file changed, 3 insertions(+)
tests/xfs/262 +3 -0
index b28a6c88b..6df3c79f3 100755
@@ -29,6 +29,9 @@ _require_xfs_io_error_injection "force_repair"
 echo "Format and populate"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
+
+_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"
+
 cp $XFS_SCRUB_PROG $SCRATCH_MNT/xfs_scrub
 $LDD_PROG $XFS_SCRUB_PROG | sed -e '/\//!d;/linux-gate/d;/=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' | while read lib; do
 	cp $lib $SCRATCH_MNT/
Signature · 1 line
2.39.2
#1 lore raw
Quoted 13 lines · Christoph Hellwig

Call _supports_xfs_scrub so that the test is _notrun on kernels without online scrub support.

---
 tests/xfs/262 | 3 +++
 1 file changed, 3 insertions(+)
tests/xfs/262 +0 -0
index b28a6c88b..6df3c79f3 100755

tests/xfs/262 _require_xfs_io_error_injection "force_repair" · line 33

Quoted 5 lines
tests/xfs/262 +2 -0
@@ -29,6 +29,9 @@ _require_xfs_io_error_injection "force_repair"
 echo "Format and populate"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
+
+_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"

Can you refactor this into a common _scratch_require_xfs_scrub helper for xfs/556 and xfs/716?

The patch itself looks sound.

--D

Quoted 8 lines
tests/xfs/262 +1 -0
+
 cp $XFS_SCRUB_PROG $SCRATCH_MNT/xfs_scrub
 $LDD_PROG $XFS_SCRUB_PROG | sed -e '/\//!d;/linux-gate/d;/=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' | while read lib; do
 	cp $lib $SCRATCH_MNT/
Signature · 1 line
2.39.2
#2 lore raw
Quoted 4 lines · Darrick J. Wong
Quoted 1 line

+_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"

Can you refactor this into a common _scratch_require_xfs_scrub helper for xfs/556 and xfs/716?

Sure, I'll look into that.