From fcebb87f524956d5d1c082bd4496b574b17a1d5d Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Mon, 5 Aug 2019 14:45:22 +0300 Subject: [PATCH] btrfs-progs: tests: Check for metadata_uuid feature in misc-tests/034-metadata-uuid Instead of checking the kernel version, explicitly check for the presence of metadata_uuid file in sysfs. This allows the test to be run on older kernels that might have this feature backported. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba --- tests/misc-tests/034-metadata-uuid/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/misc-tests/034-metadata-uuid/test.sh b/tests/misc-tests/034-metadata-uuid/test.sh index 3ef110cd..6ac55b1c 100755 --- a/tests/misc-tests/034-metadata-uuid/test.sh +++ b/tests/misc-tests/034-metadata-uuid/test.sh @@ -10,8 +10,8 @@ check_prereq btrfs-image setup_root_helper prepare_test_dev -if ! check_min_kernel_version 5.0; then - _not_run "kernel too old, METADATA_UUID support needed" +if [ ! -f /sys/fs/btrfs/features/metadata_uuid ] ; then + _not_run "METADATA_UUID feature not supported" fi read_fsid() {