mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-28 14:44:36 +08:00
btrfs-progs: tests: check nlinks for directories
Make sure btrfs check can detect such problem. Right now we have no way to fix it yet. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
478e98cd01
commit
af62875784
BIN
tests/fsck-tests/049-dir-hard-link/default.img.xz
Normal file
BIN
tests/fsck-tests/049-dir-hard-link/default.img.xz
Normal file
Binary file not shown.
19
tests/fsck-tests/049-dir-hard-link/test.sh
Executable file
19
tests/fsck-tests/049-dir-hard-link/test.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Verify that check can detect overlapped dir with 2 links
|
||||
#
|
||||
# There is a report that btrfs-check doesn't report dir with 2 links as
|
||||
# error, and only get caught by tree-checker.
|
||||
#
|
||||
# Make sure btrfs check can at least detect such error.
|
||||
|
||||
source "$TEST_TOP/common"
|
||||
|
||||
check_prereq btrfs
|
||||
|
||||
check_image() {
|
||||
run_mustfail "dir with 2 links not detected" \
|
||||
"$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images
|
Loading…
Reference in New Issue
Block a user