From: Filipe Manana <fdmanana@xxxxxxxx> Add a _require_btrfs_no_nodatasum helper to skip a test if the nodatasum mount option is give, as we do have several tests that fail, for several reasons, when that mount option is passed. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx> --- common/btrfs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/btrfs b/common/btrfs index 5d69ddd8..a3b9c12f 100644 --- a/common/btrfs +++ b/common/btrfs @@ -134,6 +134,13 @@ _require_btrfs_no_nodatacow() fi } +_require_btrfs_no_nodatasum() +{ + if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "nodatasum"; then + _notrun "This test requires no nodatasum enabled" + fi +} + _require_btrfs_free_space_tree() { _scratch_mkfs > /dev/null 2>&1 -- 2.45.2