]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common: make _filter_fiemap_flags optionally print the encoded flag
authorFilipe Manana <fdmanana@suse.com>
Mon, 28 Nov 2022 12:07:22 +0000 (12:07 +0000)
committerZorro Lang <zlang@kernel.org>
Thu, 8 Dec 2022 12:46:54 +0000 (20:46 +0800)
commit1f423c9e6e05dcb3b1ec94d0ba560c661c4d421f
treede12437b0ba9b1d9e5d673a344dcd4bb4dddd730
parent676b0a09706d6db31b453e1c5aabce4204b541de
common: make _filter_fiemap_flags optionally print the encoded flag

We'd like to have some btrfs test cases in the future to verify that
extents are compressed when using fiemap. For that we can just check if
the FIEMAP_EXTENT_ENCODED (0x8) flag is set for an extent. Currently
_filter_fiemap_flags does not print that flag, so this changes it to
print the flag.

However printing the encoded flag is optional, because some tests use
the filter and use its output to match the golden output. So always
printing the flag would make the tests fail on btrfs when they are run
with "-o compress" (or compress-force) set in MOUNT_OPTIONS due to a
mismatch with the golden output. The tests that can be run with or
without compression on btrfs are generic/352, generic/353 and btrfs/279.
Since those tests don't care about the encoded flag, there is no need to
change them, just make the output of the flag optional, and any future
tests that want to check the presence of the encoded flag, will just pass
a parameter to _filter_fiemap_flags to tell it that the encoded flag
should be printed.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/punch