mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 08:02:21 +00:00
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
BIN
tests/misc-tests/032-bad-item-ptr/bad_item_ptr.raw.xz
Normal file
BIN
tests/misc-tests/032-bad-item-ptr/bad_item_ptr.raw.xz
Normal file
Binary file not shown.
17
tests/misc-tests/032-bad-item-ptr/test.sh
Executable file
17
tests/misc-tests/032-bad-item-ptr/test.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user