diff options
author | Su Yue <suy.fnst@cn.fujitsu.com> | 2018-05-15 09:33:24 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-07 16:37:38 +0200 |
commit | 6386ae4d8c6644630ab3f9aa1c92d8aed3b81aea (patch) | |
tree | 0bd68a886dc7b510ec0aa1ecb6b1f5ffb81d63ed | |
parent | 42f7017ee690eae3f0caee5bcce9d30885794a19 (diff) |
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>
-rw-r--r-- | tests/fsck-tests/034-bad-inode-flags/default_case.img | bin | 0 -> 4096 bytes | |||
-rwxr-xr-x | tests/fsck-tests/034-bad-inode-flags/test.sh | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/fsck-tests/034-bad-inode-flags/default_case.img b/tests/fsck-tests/034-bad-inode-flags/default_case.img Binary files differnew file mode 100644 index 00000000..43a2a6f6 --- /dev/null +++ b/tests/fsck-tests/034-bad-inode-flags/default_case.img diff --git a/tests/fsck-tests/034-bad-inode-flags/test.sh b/tests/fsck-tests/034-bad-inode-flags/test.sh new file mode 100755 index 00000000..4bdc2bf0 --- /dev/null +++ b/tests/fsck-tests/034-bad-inode-flags/test.sh @@ -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 |