btrfs-progs: tests: Add test case for dump-tree on heavily corrupted leaf
Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9e061cae19
commit
0ef6797205
Binary file not shown.
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Verify that btrfs inspect dump-tree won't segfault on heavily corrupted
|
||||||
|
# tree leaf
|
||||||
|
# Issue: #128
|
||||||
|
|
||||||
|
source "$TEST_TOP/common"
|
||||||
|
|
||||||
|
check_prereq btrfs
|
||||||
|
|
||||||
|
check_image() {
|
||||||
|
run_check "$TOP/btrfs" inspect-internal dump-tree "$1"
|
||||||
|
run_mustfail "btrfs check failed to detect such corruption" \
|
||||||
|
"$TOP/btrfs" check "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
check_all_images
|
Loading…
Reference in New Issue