btrfs-progs/tests/fuzz-tests/003-multi-check-unmounted/test.sh
Josef Bacik c91d5bf144 btrfs-progs: tests: use --force for --init-csum-tree in 003-multi-check-unmounted
003-multi-check-unmounted was taking a long time, this is because it was
doing the 10 second countdown for each iteration of --init-csum-tree.
Fix this by using --force to bypass the countdown.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-03-08 18:18:00 +01:00

27 lines
688 B
Bash
Executable File

#!/bin/bash
# iterate over all fuzzed images and run 'btrfs check', try various options to
# get more code coverage
source "$TEST_TOP/common"
setup_root_helper
check_prereq btrfs
# redefine the one provided by common
check_image() {
local image
image=$1
run_mayfail $TOP/btrfs check -s 1 "$image"
run_mayfail $TOP/btrfs check --force --init-csum-tree "$image"
run_mayfail $TOP/btrfs check --repair --force --init-extent-tree "$image"
run_mayfail $TOP/btrfs check --repair --force --check-data-csum "$image"
run_mayfail $TOP/btrfs check --subvol-extents "$image"
run_mayfail $TOP/btrfs check --repair --force "$image"
}
check_all_images "$TEST_TOP/fuzz-tests/images"
exit 0