[PATCH 21/33] ext4/046: don't run this test if dioread_nolock not supported

Darrick J. Wong
2025-10-29T01:25:54Z

This test checks that directio reads still work ok if nolock is enabled.
Therefore, if the filesystem driver won't mount with dioread_nolock,
skip the test because its preconditions are not satisfied.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/ext4/046 | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tests/ext4/046 b/tests/ext4/046
index 60d33550e3db59..2e770830ab0c5e 100755
--- a/tests/ext4/046
+++ b/tests/ext4/046
@@ -24,13 +24,7 @@ _require_scratch_size $((6 * 1024 * 1024)) #kB

_scratch_mkfs >> $seqres.full 2>&1
if ! _try_scratch_mount "-o dioread_nolock" >> $seqres.full 2>&1; then
- err_str="can't mount with dioread_nolock if block size != PAGE_SIZE"
- _check_dmesg_for ${err_str}
- if [ $? -eq 0 ]; then
- _notrun "mount failed, ext4 doesn't support bs < ps with dioread_nolock"
- else
- _fail "mount failed with dioread_nolock"
- fi
+ _notrun "mount failed, ext4 doesn't support dioread_nolock"
fi

# Get blksz