From 7d83ccfe3ef3175c4faf02da316b8406ee2373dd Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Wed, 12 Feb 2025 23:35:01 +0000 Subject: [PATCH] common/btrfs: add a _require_btrfs_no_nodatasum helper 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. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Zorro Lang --- 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.39.5