mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 16:12:34 +00:00
f6bbe06c08
Executing the script inside the directories as './test.sh' is not supposed to work but could happen accidentally. With an exit after attempting to source the we can fix that. Signed-off-by: David Sterba <dsterba@suse.com>
18 lines
545 B
Bash
Executable File
18 lines
545 B
Bash
Executable File
#!/bin/bash
|
|
# Basic check if mkfs supports the runtime feature free-space-tree
|
|
|
|
source "$TEST_TOP/common" || exit
|
|
|
|
check_prereq mkfs.btrfs
|
|
check_prereq btrfs
|
|
|
|
setup_root_helper
|
|
prepare_test_dev
|
|
|
|
run_check_mkfs_test_dev -O free-space-tree
|
|
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \
|
|
grep -q FREE_SPACE_TREE || _fail "free space tree not created"
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \
|
|
grep -q FREE_SPACE_TREE_VALID || _fail "free space tree not valid"
|