ext4/054: skip test if the dax mount option is enabled
authorTheodore Ts'o <tytso@mit.edu>
Thu, 30 Jun 2022 14:46:34 +0000 (10:46 -0400)
committerZorro Lang <zlang@kernel.org>
Sat, 2 Jul 2022 13:31:10 +0000 (21:31 +0800)
The ext4/054 test explicitly creates a file system with a 1k
blocksize.  This can't possibly work on if the dax mount option is
enabled, so change ext4/054 to use _scratch_mkfs_blocksized, and and a
check to _scratch_mkfs_blocksized to _notrun the test if the block
size is less than the page size.

Also remove an unnecessary _require_test declaration since this test
does not use the test device.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc
tests/ext4/054

index 918026b55d8c52c5944a503d20fed8ad45ef4213..d5e6764c20798f78d45a1d0b8c5775dbbaded77b 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1199,6 +1199,9 @@ _scratch_mkfs_blocksized()
        if ! [[ $blocksize =~ $re ]] ; then
                _notrun "error: _scratch_mkfs_sized: block size \"$blocksize\" not an integer."
        fi
+       if [ $blocksize -lt $(get_page_size) ]; then
+               _exclude_scratch_mount_option dax
+       fi
 
        case $FSTYP in
        btrfs)
index 9a11719f854bef09a33f516dc95230fa149652a8..e23acbb1bc1233f1281dc57db8dc65c26c6c9ec8 100755 (executable)
@@ -19,7 +19,6 @@ _begin_fstest auto quick dangerous_fuzzers
 
 # real QA test starts here
 _supported_fs ext4
-_require_test
 _require_scratch_nocheck
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "pwrite"
@@ -28,8 +27,8 @@ _require_xfs_io_command "fpunch"
 _require_command "$DEBUGFS_PROG" debugfs
 
 # In order to accurately construct the damaged extent in the following
-# test steps, the blocksize is set to 1024 here
-_scratch_mkfs "-b 1024" > $seqres.full 2>&1
+# test steps, the block size is set to 1024 here
+_scratch_mkfs_blocksized 1024 >> $seqres.full 2>&1
 _scratch_mount
 
 TEST_FILE="${SCRATCH_MNT}/testfile"