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>
master
Qu Wenruo 2018-05-07 15:46:28 +08:00 committed by David Sterba
parent 9e061cae19
commit 0ef6797205
2 changed files with 17 additions and 0 deletions

View File

@ -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