Skip to contentSkip to conversation

fstests failures at btrfs/003 and other test cases

bug report Shin'ichiro Kawasaki 2 participants 2 messages May 9 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi David and all,

I found btrfs/003 and other test cases of fstests fail with the latest btrfs- progs at the devel branch tip. The message "mkfs failed" is observed at the failures [1]. I bisected and found the btrfs-progs commit below triggers the failure.

ec8324cc4b8b ("btrfs-progs: help: adjust alignment of text")

This commit modified the help message of mkfs.btrfs command.

I found fstests checks the help message and greps with the pattern "[[:space:]]-f[[:space:]|,]" in set_mkfs_prog_path_with_opts() [2]. The grep succeeds before the commit, since it had spaces before "-f".

$ mkfs.btrfs --help |& grep -e "--force"
    -f, --force               force overwrite of existing filesystem

However, it fails to after the commit, since there is no space before "-f".

$ mkfs.btrfs --help |& grep -e "--force"
-f, --force               force overwrite of existing filesystem

Then, fstests no longer adds -f option to not add $MKFS_BTRFS_PROGS.

Is this a known failure? If not, actions for fix will be appreciated.

[1]

$ sudo ./check btrfs/003
FSTYP         -- btrfs
PLATFORM      -- Linux/x86_64 redsun115 7.1.0-rc2-kts-btrfs #1 SMP PREEMPT_DYNAMIC Sat May  9 03:03:55 JST 2026
MKFS_OPTIONS  -- -f /dev/nullb1
MOUNT_OPTIONS -- -o enospc_debug -o context=system_u:object_r:root_t:s0 /dev/nullb1 /var/kts/scratch

btrfs/003 55s ... [failed, exit status 1]- output mismatch (see /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad)
--- tests/btrfs/003.out 2026-05-09 03:07:52.952213772 +0900
+++ /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad 2026-05-09 23:32:17.595751435 +0900
@@ -1,2 +1,3 @@
QA output created by 003
-Silence is golden
+mkfs failed
+(see /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.full for details)
...
(Run 'diff -u /home/kts/kernel-test-suite/src/xfstests/tests/btrfs/003.out /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad' to see the entire diff)
Ran: btrfs/003
Failures: btrfs/003
Failed 1 of 1 tests

[2] https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/common/config?h=for-next#n106

#1 lore raw
Quoted 18 lines · Shin'ichiro Kawasaki

Hi David and all,

I found btrfs/003 and other test cases of fstests fail with the latest btrfs- progs at the devel branch tip. The message "mkfs failed" is observed at the failures [1]. I bisected and found the btrfs-progs commit below triggers the failure.

ec8324cc4b8b ("btrfs-progs: help: adjust alignment of text")

This commit modified the help message of mkfs.btrfs command.

I found fstests checks the help message and greps with the pattern "[[:space:]]-f[[:space:]|,]" in set_mkfs_prog_path_with_opts() [2]. The grep succeeds before the commit, since it had spaces before "-f".

$ mkfs.btrfs --help |& grep -e "--force"
     -f, --force               force overwrite of existing filesystem
Quoted 8 lines

However, it fails to after the commit, since there is no space before "-f".

$ mkfs.btrfs --help |& grep -e "--force"
-f, --force               force overwrite of existing filesystem

Then, fstests no longer adds -f option to not add $MKFS_BTRFS_PROGS.

Is this a known failure? If not, actions for fix will be appreciated.

Sure, fstest's filter needs to be updated to handle both cases.

I'll send out a fix soon.

Thanks a lot for the report,
Qu

Quoted 29 lines

[1]

$ sudo ./check btrfs/003
FSTYP         -- btrfs
PLATFORM      -- Linux/x86_64 redsun115 7.1.0-rc2-kts-btrfs #1 SMP PREEMPT_DYNAMIC Sat May  9 03:03:55 JST 2026
MKFS_OPTIONS  -- -f /dev/nullb1
MOUNT_OPTIONS -- -o enospc_debug -o context=system_u:object_r:root_t:s0 /dev/nullb1 /var/kts/scratch

btrfs/003 55s ... [failed, exit status 1]- output mismatch (see /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad)
--- tests/btrfs/003.out 2026-05-09 03:07:52.952213772 +0900
+++ /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad 2026-05-09 23:32:17.595751435 +0900
@@ -1,2 +1,3 @@
QA output created by 003
-Silence is golden
+mkfs failed
+(see /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.full for details)
...
(Run 'diff -u /home/kts/kernel-test-suite/src/xfstests/tests/btrfs/003.out /home/kts/kernel-test-suite/src/xfstests/results//btrfs/003.out.bad' to see the entire diff)
Ran: btrfs/003
Failures: btrfs/003
Failed 1 of 1 tests

[2] https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/common/config?h=for-next#n106