btrfs-progs/tests/fsck-tests/053-bad-metadata-level/test.sh
Qu Wenruo 2f734d7b2c btrfs-progs: tests/fsck: add test image with invalid metadata backref level
The image has a key in extent tree, (30457856 METADATA_ITEM 256), which
has invalid level (256 > BTRFS_MAX_LEVEL).

Make sure check can at least detect such problem.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-01 18:42:02 +01:00

20 lines
443 B
Bash
Executable File

#!/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