From ebfd9f1ea7c636c85235d11b99eb60d523fea902 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Thu, 2 Oct 2025 10:26:46 +0930 Subject: [PATCH] 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 Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/btrfs/012 | 3 +++ tests/btrfs/136 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/btrfs/012 b/tests/btrfs/012 index f41d7e4e..6914fba6 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -42,6 +42,9 @@ $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \ _notrun "Could not create ext4 filesystem" # Manual mount so we don't use -t btrfs or selinux context mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT +if [ $? -ne 0 -a $BLOCK_SIZE -gt $(_get_page_size) ]; then + _notrun "block size $BLOCK_SIZE is not supported by ext4" +fi echo "populating the initial ext fs:" >> $seqres.full mkdir "$SCRATCH_MNT/$BASENAME" diff --git a/tests/btrfs/136 b/tests/btrfs/136 index 65bbcf51..fd24d3f8 100755 --- a/tests/btrfs/136 +++ b/tests/btrfs/136 @@ -45,6 +45,9 @@ $MKFS_EXT4_PROG -F -t ext3 -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \ # mount and populate non-extent file mount -t ext3 $SCRATCH_DEV $SCRATCH_MNT +if [ $? -ne 0 -a $BLOCK_SIZE -gt $(_get_page_size) ]; then + _notrun "block size $BLOCK_SIZE is not supported by ext3" +fi populate_data "$SCRATCH_MNT/ext3_ext4_data/ext3" _scratch_unmount -- 2.39.5