mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-27 07:20:53 +00:00
btrfs-progs: 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:
parent
f0a8324d50
commit
2df82a2da6
BIN
tests/fsck-tests/045-overlap-csum-item/overlap_csum_item.img.xz
Normal file
BIN
tests/fsck-tests/045-overlap-csum-item/overlap_csum_item.img.xz
Normal file
Binary file not shown.
19
tests/fsck-tests/045-overlap-csum-item/test.sh
Executable file
19
tests/fsck-tests/045-overlap-csum-item/test.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user