btrfs-progs: fsck-tests: Add test image for overlapping csum item

The image has a csum item overlap with next csum item, make sure btrfs
check can detect it.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2020-03-04 15:27:01 +08:00 committed by David Sterba
parent f0a8324d50
commit d7d3a77716
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
#
# Verify that check can detect overlapped csum items
#
# There is one report of overlap csum items, causing tree-checker to reject
# the csum tree.
#
# Make sure btrfs check can at least detect such error
source "$TEST_TOP/common"
check_prereq btrfs
check_image() {
run_mustfail "overlapping csum item not detected" \
"$TOP/btrfs" check "$1"
}
check_all_images