From: Jeff Mahoney Date: Mon, 21 Jan 2019 16:33:14 +0000 (-0500) Subject: btrfs/023: skip trying to test raid56 without kernel support X-Git-Tag: v2022.05.01~1281 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=33cd745db03e1e69e86b27afc907f7ec2b62ab0c;p=users%2Fhch%2Fxfstests-dev.git btrfs/023: skip trying to test raid56 without kernel support Older kernels don't support raid56. This test is still valid for other profiles, so skip raid56 if the kernel doesn't support it. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana Signed-off-by: Eryu Guan --- diff --git a/tests/btrfs/023 b/tests/btrfs/023 index 6d9cc443c..6c02113ba 100755 --- a/tests/btrfs/023 +++ b/tests/btrfs/023 @@ -63,11 +63,13 @@ check_group_profile "RAID1" create_group_profile "raid10" check_group_profile "RAID10" -create_group_profile "raid5" -check_group_profile "RAID5" +if [ -e "/sys/fs/btrfs/features/raid56" ]; then + create_group_profile "raid5" + check_group_profile "RAID5" -create_group_profile "raid6" -check_group_profile "RAID6" + create_group_profile "raid6" + check_group_profile "RAID6" +fi # success, all done echo "Silence is golden"