summaryrefslogtreecommitdiff
path: root/tests/btrfs/275.out
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.de>2022-09-22 10:56:39 +0100
committerZorro Lang <zlang@kernel.org>2022-09-23 22:47:19 +0800
commite5555e75ba199d153f4dfb81496a891263ec9bdd (patch)
tree594700f695b0eef586bb01706efc0d26fe57c094 /tests/btrfs/275.out
parent42cc53859ca1198c97a2ca88d4b6589592cfa50c (diff)
btrfs: test xattr changes for RO btrfs propertyv2022.09.25
Test creation, modification and deletion of xattr for a BTRFS filesystem which has the read-only property set to true. Re-test the same after read-only property is set to false. This tests the bug for "security.*" modifications which escape xattr_permission(), because security parameters are usually let through in xattr_permission, without checking inode_permission()->btrfs_permission(). This resulted in being able to change a security xattr on a RO subvolume until it got fixed by kernel commit b51111271b03 ("btrfs: check if root is readonly while setting security xattr"). Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'tests/btrfs/275.out')
-rw-r--r--tests/btrfs/275.out39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/btrfs/275.out b/tests/btrfs/275.out
new file mode 100644
index 00000000..fb8f02f8
--- /dev/null
+++ b/tests/btrfs/275.out
@@ -0,0 +1,39 @@
+QA output created by 275
+ro=true
+setfattr: SCRATCH_MNT/foo: Read-only file system
+setfattr: SCRATCH_MNT/foo: Read-only file system
+setfattr: SCRATCH_MNT/foo: Read-only file system
+# file: SCRATCH_MNT/foo
+user.one="1"
+
+# file: SCRATCH_MNT/foo
+security.one="1"
+
+# file: SCRATCH_MNT/foo
+trusted.one="1"
+
+setfattr: SCRATCH_MNT/foo: Read-only file system
+setfattr: SCRATCH_MNT/foo: Read-only file system
+setfattr: SCRATCH_MNT/foo: Read-only file system
+# file: SCRATCH_MNT/foo
+user.one="1"
+
+# file: SCRATCH_MNT/foo
+security.one="1"
+
+# file: SCRATCH_MNT/foo
+trusted.one="1"
+
+ro=false
+# file: SCRATCH_MNT/foo
+user.one="2"
+
+# file: SCRATCH_MNT/foo
+security.one="2"
+
+# file: SCRATCH_MNT/foo
+trusted.one="2"
+
+SCRATCH_MNT/foo: user.one: No such attribute
+SCRATCH_MNT/foo: security.one: No such attribute
+SCRATCH_MNT/foo: trusted.one: No such attribute