mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 15:12:47 +00:00
btrfs-progs: tests: enable strict chunk alignment check
The strict check is enabled for both check_image() and convert_test_do_convert() to detect chunk alignment related problems. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6dfc69104b
commit
04f3efaa0d
@ -441,6 +441,7 @@ check_image()
|
||||
|
||||
image=$1
|
||||
echo "testing image $(basename $image)" >> "$RESULTS"
|
||||
export BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT=y
|
||||
run_mustfail_stdout "btrfs check should have detected corruption" \
|
||||
"$TOP/btrfs" check "$image" &> "$tmp_output"
|
||||
|
||||
@ -449,6 +450,7 @@ check_image()
|
||||
|
||||
run_check "$TOP/btrfs" check --repair --force "$image"
|
||||
run_check_stdout "$TOP/btrfs" check "$image" &> "$tmp_output"
|
||||
unset BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT
|
||||
|
||||
# Also make sure no subpage related warnings for the repaired image
|
||||
check_test_results "$tmp_output" "$testname"
|
||||
|
@ -147,9 +147,11 @@ convert_test_acl() {
|
||||
# $1: features, argument of -O, can be empty
|
||||
# $2: nodesize, argument of -N, can be empty
|
||||
convert_test_do_convert() {
|
||||
export BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT=y
|
||||
run_check "$TOP/btrfs-convert" ${1:+-O "$1"} ${2:+-N "$2"} "$TEST_DEV"
|
||||
run_check "$TOP/btrfs" check "$TEST_DEV"
|
||||
run_check "$TOP/btrfs" inspect-internal dump-super -Ffa "$TEST_DEV"
|
||||
unset BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT
|
||||
}
|
||||
|
||||
# post conversion check, verify file permissions.
|
||||
|
Loading…
Reference in New Issue
Block a user