diff --git a/tests/fsck-tests/053-bad-metadata-level/default.img.xz b/tests/fsck-tests/053-bad-metadata-level/default.img.xz new file mode 100644 index 00000000..d7debee7 Binary files /dev/null and b/tests/fsck-tests/053-bad-metadata-level/default.img.xz differ diff --git a/tests/fsck-tests/053-bad-metadata-level/test.sh b/tests/fsck-tests/053-bad-metadata-level/test.sh new file mode 100755 index 00000000..0ffd7bdf --- /dev/null +++ b/tests/fsck-tests/053-bad-metadata-level/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Verify that check can detect invalid metadata backref level. +# +# There is a report that btrfs-check original mode doesn't report invalid +# metadata backref level, and lowmem mode would just crash. +# +# Make sure btrfs check can at least detect such error. + +source "$TEST_TOP/common" + +check_prereq btrfs + +check_image() { + run_mustfail "invalid metadata backref level not detected" \ + "$TOP/btrfs" check "$1" +} + +check_all_images