mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-26 23:43:09 +00:00
btrfs-progs: tests: add test for check --force
Basic test of the --force functionality, on an empty filesystem. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
162fdf9538
commit
a36d92cb8b
21
tests/cli-tests/007-check-force/test.sh
Executable file
21
tests/cli-tests/007-check-force/test.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# test 'btrfs check --force' on a mounted filesystem
|
||||
|
||||
source "$TOP/tests/common"
|
||||
|
||||
check_prereq mkfs.btrfs
|
||||
check_prereq btrfs
|
||||
|
||||
setup_root_helper
|
||||
prepare_test_dev
|
||||
|
||||
run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
|
||||
run_check_mount_test_dev
|
||||
run_mustfail $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" check --force "$TEST_DEV"
|
||||
run_mustfail $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV"
|
||||
run_check_umount_test_dev
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" check --force "$TEST_DEV"
|
||||
run_mustfail $SUDO_HELPER "$TOP/btrfs" check --force --repair "$TEST_DEV"
|
Loading…
Reference in New Issue
Block a user