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 <wqu@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Nikolay Borisov 2019-08-05 14:45:22 +03:00 committed by David Sterba
parent 90a87e817d
commit fcebb87f52
1 changed files with 2 additions and 2 deletions

View File

@ -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() {