mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-26 06:50:46 +00:00
Fix failures caused by the lack of ACL support in btrfs. For example: $ make test :: [TEST/misc] 057-btrfstune-free-space-tree failed: setfacl -m u:root:x /Volumes/ws/btrfs-progs/tests/mnt/acls/acls.1 test failed for case 057-btrfstune-free-space-tree make: *** [Makefile:493: test-misc] Error 1 Similar failures occurred in the test cases convert/001-ext2-basic, convert/003-ext4-basic, convert/005-delete-all-rollback, and convert/006-large-hole-extent. Resolve it by adding a check for ACL support using the check_kernel_support_acl() helper function. It gracefully handles the case when ACL support is not compiled by calling _not_run(). Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
23 lines
502 B
Bash
Executable File
23 lines
502 B
Bash
Executable File
#!/bin/bash
|
|
# Test btrfstune --convert-to-free-space-tree option
|
|
|
|
source "$TEST_TOP/common" || exit
|
|
source "$TEST_TOP/common.convert" || exit
|
|
|
|
check_prereq mkfs.btrfs
|
|
check_prereq btrfstune
|
|
check_prereq btrfs
|
|
|
|
setup_root_helper
|
|
prepare_test_dev
|
|
check_kernel_support_acl
|
|
|
|
run_check_mkfs_test_dev -O ^free-space-tree
|
|
run_check_mount_test_dev
|
|
populate_fs
|
|
run_check_umount_test_dev
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfstune" --convert-to-free-space-tree "$TEST_DEV"
|
|
|
|
run_check "$TOP/btrfs" check "$TEST_DEV"
|