btrfs/333: require scratch before checking encoded reads
PATCH 1/1 btrfs/333: require scratch before checking encoded reads
_require_btrfs_iouring_encoded_read() formats and mounts the scratch device while checking for encoded-read support. Without a configured scratch device, the test therefore fails before reaching its existing _require_scratch call.
Move _require_scratch before the encoded-read check so the test is skipped before its first scratch operation.
--- tests/btrfs/333 | 1 + 1 file changed, 1 insertion(+)
tests/btrfs/333 +1 -0
@@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl _require_command src/btrfs_encoded_read _require_command src/btrfs_encoded_write +_require_scratch _require_btrfs_iouring_encoded_read # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip # the test if running with either the nodatasum or nodatacow (which implies
Signature · 1 line
2.55.0
Quoted 9 lines · Prabhakar Pujeri
_require_btrfs_iouring_encoded_read()formats and mounts the scratch device while checking for encoded-read support. Without a configured scratch device, the test therefore fails before reaching its existing_require_scratchcall.Move
_require_scratchbefore the encoded-read check so the test is skipped before its first scratch operation.Signed-off-by Prabhakar Pujeri <[email protected]>
That looks right to me,
--D
Quoted 20 lines
--- tests/btrfs/333 | 1 + 1 file changed, 1 insertion(+)tests/btrfs/333 +1
-0@@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl _require_command src/btrfs_encoded_read _require_command src/btrfs_encoded_write +_require_scratch _require_btrfs_iouring_encoded_read # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip # the test if running with either the nodatasum or nodatacow (which impliesSignature · 1 line
2.55.0
Quoted 4 lines · Prabhakar Pujeri
_require_btrfs_iouring_encoded_read()formats and mounts the scratch device while checking for encoded-read support. Without a configured scratch device, the test therefore fails before reaching its existing_require_scratchcall.
In that case it's better to just add _require_scratch to _require_btrfs_iouring_encoded_read(), instead of changing every possible caller.
BTW, without a scratch device, more than half of the tests will be skipped, thus it may not provide much coverage for such runs.
Thanks,
Qu
Quoted 21 lines
Move
_require_scratchbefore the encoded-read check so the test is skipped before its first scratch operation.Signed-off-by Prabhakar Pujeri <[email protected]>--- tests/btrfs/333 | 1 + 1 file changed, 1 insertion(+)tests/btrfs/333 +1
-0@@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl _require_command src/btrfs_encoded_read _require_command src/btrfs_encoded_write +_require_scratch _require_btrfs_iouring_encoded_read # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip # the test if running with either the nodatasum or nodatacow (which implies