summaryrefslogtreecommitdiff
path: root/tests/misc-tests/032-bad-item-ptr/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc-tests/032-bad-item-ptr/test.sh')
-rwxr-xr-xtests/misc-tests/032-bad-item-ptr/test.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/misc-tests/032-bad-item-ptr/test.sh b/tests/misc-tests/032-bad-item-ptr/test.sh
new file mode 100755
index 00000000..cfbfe1a5
--- /dev/null
+++ b/tests/misc-tests/032-bad-item-ptr/test.sh
@@ -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