Skip to contentSkip to conversation

generic/590,735: add missing _require_scratch check

PATCH In review Prabhakar Pujeri 3 participants 3 messages Aug 31 – Sep 2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 54c26f2..0775d6f 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 60fa3dc..d7e732b 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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Prabhakar Pujeri

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

Yep, those are missing.

--D

Quoted 33 lines
---
 tests/generic/590 | 1 +
 tests/generic/735 | 1 +
 2 files changed, 2 insertions(+)
tests/generic/590 +1 -0
index 54c26f2..0775d6f 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 60fa3dc..d7e732b 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
In reply to Prabhakar Pujeri
Quoted 5 lines · Prabhakar Pujeri

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

---

Hmm... one more

And why does this patch need to be separate from the other one -- "generic/795: add missing _require_scratch check" ?

Please group patches with the same rationale and goal together, it'll prevent them from being scattered everywhere and helps ensure I don't overlook any. I'll drop the ones I already merged and wait for your consolidated patch or patchset :)

Thanks,
Zorro

Quoted 31 lines
 tests/generic/590 | 1 +
 tests/generic/735 | 1 +
 2 files changed, 2 insertions(+)
tests/generic/590 +1 -0
index 54c26f2..0775d6f 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 60fa3dc..d7e732b 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