@@ -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.
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> --- tests/common | 2 ++ tests/common.convert | 2 ++ 2 files changed, 4 insertions(+)