]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/012 btrfs/136: skip the test if ext* doesn't support the block size
authorQu Wenruo <wqu@suse.com>
Thu, 2 Oct 2025 00:56:46 +0000 (10:26 +0930)
committerZorro Lang <zlang@kernel.org>
Thu, 2 Oct 2025 06:59:31 +0000 (14:59 +0800)
commitebfd9f1ea7c636c85235d11b99eb60d523fea902
tree21bc7c99e73e246266b6fee9929e58924d965b5c
parent9460a05243ac9ec93f7184d5d2efc59fc69c63a2
btrfs/012 btrfs/136: skip the test if ext* doesn't support the block size

[FALSE ALERT]
When testing btrfs bs > ps support, the test cases btrfs/012 and
btrfs/136 fail like the following:

 FSTYP         -- btrfs
 PLATFORM      -- Linux/x86_64 btrfs-vm 6.17.0-rc4-custom+ #285 SMP PREEMPT_DYNAMIC Mon Sep 15 14:40:01 ACST 2025
 MKFS_OPTIONS  -- -s 8k /dev/mapper/test-scratch1
 MOUNT_OPTIONS -- /dev/mapper/test-scratch1 /mnt/scratch

 btrfs/012       [failed, exit status 1]- output mismatch (see /home/adam/xfstests/results//btrfs/012.out.bad)
     --- tests/btrfs/012.out 2024-07-17 16:27:18.790000343 +0930
     +++ /home/adam/xfstests/results//btrfs/012.out.bad 2025-09-15 16:32:55.185922173 +0930
     @@ -1,7 +1,11 @@
      QA output created by 012
     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/mapper/test-scratch1, missing codepage or helper program, or other error.
     +       dmesg(1) may have more information after failed mount system call.
     +mkdir: cannot create directory '/mnt/scratch/stressdir': File exists
     +umount: /mnt/scratch: not mounted.
      Checking converted btrfs against the original one:
     -OK
     ...
     (Run 'diff -u /home/adam/xfstests/tests/btrfs/012.out /home/adam/xfstests/results//btrfs/012.out.bad'  to see the entire diff)

 btrfs/136 3s ... - output mismatch (see /home/adam/xfstests/results//btrfs/136.out.bad)
     --- tests/btrfs/136.out 2022-05-11 11:25:30.743333331 +0930
     +++ /home/adam/xfstests/results//btrfs/136.out.bad 2025-09-19 07:00:00.395280850 +0930
     @@ -1,2 +1,10 @@
      QA output created by 136
     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/mapper/test-scratch1, missing codepage or helper program, or other error.
     +       dmesg(1) may have more information after failed mount system call.
     +umount: /mnt/scratch: not mounted.
     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/mapper/test-scratch1, missing codepage or helper program, or other error.
     +       dmesg(1) may have more information after failed mount system call.
     +umount: /mnt/scratch: not mounted.
     ...
     (Run 'diff -u /home/adam/xfstests/tests/btrfs/136.out /home/adam/xfstests/results//btrfs/136.out.bad'  to see the entire diff)

[CAUSE]
Currently ext* doesn't support block size larger than page size, thus
at mkfs time it will output the following warning:

 Warning: blocksize 8192 not usable on most systems.
 mke2fs 1.47.3 (8-Jul-2025)
 Warning: 8192-byte blocks too big for system (max 4096), forced to continue

Furthermore at ext* mount time it will fail with the following dmesg:

 EXT4-fs (loop0): bad block size 8192

[FIX]
Check if the mount of the newly created ext* succeeded.

If not and the block size is larger than page size, we know it's some
block size ext* not yet supported, and skip the test case.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/012
tests/btrfs/136