Skip to contentSkip to conversation

xfstests: add missing _require_scratch checks

PATCH Superseded Prabhakar Pujeri 3 participants 6 messages Sep 3

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover xfstests: add missing _require_scratch checks

Consolidated resend of the remaining _require_scratch fixes, as requested by Zorro. The first three of this batch (btrfs/333 v3, overlay/081 v2, btrfs/273 v2) are already in his local tree.

v2:
- Resent as a single series, per Zorro's request.
- Carry Darrick J. Wong's Reviewed-by (generic/590,735 and generic/795) and Zorro Lang's Reviewed-by (f2fs/015,016); besides message re-formatting there is no code change.

v1 pieces for reference:
- generic/590,735: https://lore.kernel.org/fstests/[email protected]/
- generic/795: https://lore.kernel.org/fstests/[email protected]/
- f2fs/015,016: https://lore.kernel.org/fstests/[email protected]/

Prabhakar Pujeri (3):
generic/590,735: add missing _require_scratch check generic/795: add missing _require_scratch check f2fs/015,016: add missing _require_scratch checks

 tests/f2fs/015    | 1 +
 tests/f2fs/016    | 1 +
 tests/generic/590 | 1 +
 tests/generic/735 | 1 +
 tests/generic/795 | 2 ++
 5 files changed, 6 insertions(+)
Signature · 1 line
2.55.0
#1 lore raw

PATCH v2 1/3 generic/590,735: add missing _require_scratch check

Both tests use the scratch device without first requiring one, so they fail messily instead of skipping when no scratch device is configured.

---
 tests/generic/590 | 1 +
 tests/generic/735 | 1 +
 2 files changed, 2 insertions(+)
tests/generic/590 +1 -0
index 54c26f2a..0775d6ff 100755
@@ -13,6 +13,7 @@ _begin_fstest auto prealloc preallocrw
 
 . ./common/filter
 
+_require_scratch
 _require_xfs_io_command "falloc"
 
 maxextlen=$((0x1fffff))
tests/generic/735 +1 -0
index 60fa3dce..d7e732bc 100755
@@ -20,6 +20,7 @@ if [[ "$FSTYP" =~ ext[0-9]+ ]]; then
 fi
 
 _require_odirect
+_require_scratch
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "finsert"
 _require_max_file_range_blocks $(( (1 << 32) - 1 ))
Signature · 1 line
2.55.0
#2 lore raw

PATCH v2 2/3 generic/795: add missing _require_scratch check

In reply to Prabhakar Pujeri

The test runs _scratch_mkfs and _scratch_mount without first requiring a scratch device, so it fails messily instead of skipping when no scratch device is configured.

---
 tests/generic/795 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/795 +2 -0
index fa5474c5..4c0e7bdb 100755
@@ -27,6 +27,8 @@ _cleanup()
 
 . ./common/filter
 
+_require_scratch
+
 fsv_file_size=10000000
 nproc_enabler=$((4 * LOAD_FACTOR))
 nproc_reader=$((6 * LOAD_FACTOR))
Signature · 1 line
2.55.0
#3 lore raw

PATCH v2 3/3 f2fs/015,016: add missing _require_scratch checks

In reply to Prabhakar Pujeri

Both tests run _scratch_mkfs in a loop without first requiring a scratch device, so they fail messily instead of skipping when no scratch device is configured.

---
 tests/f2fs/015 | 1 +
 tests/f2fs/016 | 1 +
 2 files changed, 2 insertions(+)
tests/f2fs/015 +1 -0
index 54cada4a..75ae91f2 100755
@@ -12,6 +12,7 @@ _begin_fstest auto quick mount
 _require_kernel_config CONFIG_F2FS_FS_XATTR
 _require_kernel_config CONFIG_F2FS_FS_POSIX_ACL
 _require_kernel_config CONFIG_F2FS_FAULT_INJECTION
+_require_scratch
 
 options=(
 #	mount_option			mkfs_option
tests/f2fs/016 +1 -0
index a6df827d..e0857e0a 100755
@@ -15,6 +15,7 @@ _require_kernel_config CONFIG_F2FS_FS_LZORLE
 _require_kernel_config CONFIG_F2FS_FS_LZ4
 _require_kernel_config CONFIG_F2FS_FS_LZ4HC
 _require_kernel_config CONFIG_F2FS_FS_ZSTD
+_require_scratch
 
 options=(
 #	mount_option			mkfs_option
Signature · 1 line
2.55.0
Reviewed-by on v2 3/3
#4 lore raw

Re: [f2fs-dev] [PATCH v2 3/3] f2fs/015, 016: add missing _require_scratch checks

Quoted 6 lines · On 9/3/26 11:53, Prabhakar Pujeri via Linux-f2fs-devel wrote:

Both tests run _scratch_mkfs in a loop without first requiring a scratch device, so they fail messily instead of skipping when no scratch device is configured.

Thanks,

#5 lore raw
In reply to Prabhakar Pujeri
Quoted 16 lines · Prabhakar Pujeri

Consolidated resend of the remaining _require_scratch fixes, as requested by Zorro. The first three of this batch (btrfs/333 v3, overlay/081 v2, btrfs/273 v2) are already in his local tree.

v2:
- Resent as a single series, per Zorro's request.
- Carry Darrick J. Wong's Reviewed-by (generic/590,735 and generic/795) and Zorro Lang's Reviewed-by (f2fs/015,016); besides message re-formatting there is no code change.

v1 pieces for reference:
- generic/590,735: https://lore.kernel.org/fstests/[email protected]/
- generic/795: https://lore.kernel.org/fstests/[email protected]/
- f2fs/015,016: https://lore.kernel.org/fstests/[email protected]/

Quoted 4 lines

Prabhakar Pujeri (3):
generic/590,735: add missing _require_scratch check generic/795: add missing _require_scratch check f2fs/015,016: add missing _require_scratch checks

Hi,

Thanks for this work, I'm wondering why generic/590 and generic/735 are combined into one patch while generic/795 is split out?

Given that they all just add a single line of _require_scratch. While I think this could easily be a single patch, if you prefer splitting them up, grouping them per-directory (generic, f2fs, btrfs, overlay ...) would make sense.

Also, I recall you had a few other similar patches, such as:
btrfs/333: require scratch before checking encoded reads btrfs/273: add missing _require_scratch check overlay/081: add missing _require_scratch check

Please bundle all of them into a single patch series (keeping any existing Reviewed-by tags) so they can be reviewed and merged together.

Thanks,
Zorro

Quoted 11 lines
 tests/f2fs/015    | 1 +
 tests/f2fs/016    | 1 +
 tests/generic/590 | 1 +
 tests/generic/735 | 1 +
 tests/generic/795 | 2 ++
 5 files changed, 6 insertions(+)
Signature · 1 line
2.55.0