btrfs-progs: fsck-tests: add test case to check symlinks with bad flags

There are two bad symlinks in the test case.  One is with immutable
attribute.  Another one is with append attribute.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Su Yue 2018-05-15 09:33:24 +08:00 committed by David Sterba
parent 42f7017ee6
commit 6386ae4d8c
2 changed files with 15 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,15 @@
#!/bin/bash
# In order to confirm that 'btrfs check' supports checking symlinks
# with immutable/append attributes that are not possible to set by standard
# syscall or ioctl so they're handled as corruption
source "$TEST_TOP/common"
check_prereq btrfs
check_image() {
run_mustfail "check should report errors about inode flags" \
$SUDO_HELPER "$TOP/btrfs" check "$1"
}
check_all_images