Re: [PATCH] btrfs: fix raid-stripe-tree tests with non-experimental btrfs-progs build

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Jun 04, 2024 at 01:14:48PM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> When running the raid-stripe-tree tests with a btrfs-progs version that
> was not configured with the experimental features, the tests fail because
> they expect the dump tree commands to output the stored and calculated
> checksums lines, which are enabled only for experimental builds.
> 
> Also, these lines exists only starting with btrfs-progs v5.17 (more
> specifically since commit 1bb6fb896dfc ("btrfs-progs: btrfstune:
> experimental, new option to switch csums")).
> 
> The tests fail like this on non-experimental btrfs-progs build:
> 
>    $ ./check btrfs/304
>    FSTYP         -- btrfs
>    PLATFORM      -- Linux/x86_64 debian0 6.9.0-btrfs-next-160+ #1 SMP PREEMPT_DYNAMIC Tue May 28 12:00:03 WEST 2024
>    MKFS_OPTIONS  -- /dev/sdc
>    MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1
> 
>    btrfs/304 1s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad)
>        --- tests/btrfs/304.out	2024-01-25 11:15:33.420769484 +0000
>        +++ /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad	2024-06-04 12:55:04.289903124 +0100
>        @@ -8,8 +8,6 @@
>         raid stripe tree key (RAID_STRIPE_TREE ROOT_ITEM 0)
>         leaf XXXXXXXXX items X free space XXXXX generation X owner RAID_STRIPE_TREE
>         leaf XXXXXXXXX flags 0x1(WRITTEN) backref revision 1
>        -checksum stored <CHECKSUM>
>        -checksum calced <CHECKSUM>
>         fs uuid <UUID>
>         chunk uuid <UUID>
>       ...
>       (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/304.out /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad'  to see the entire diff)
>    Ran: btrfs/304
>    Failures: btrfs/304
>    Failed 1 of 1 tests
> 
> So update _filter_stripe_tree() to remove the checksum lines, since we
> don't care about them, and change the golden output of the tests to not
> expect those lines. This way the tests work with both experimental and
> non-experimental btrfs-progs builds, as well as btrfs-progs versions below
> v5.17.
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

In version 6.9 of btrfs-progs the messages will be printed only with
increased verbosity so we'll have same output for normal and
experimental build but it ideed needs to be removed from the golden
output.




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux