]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/xattr: sockfs socket xattr tests
authorChristian Brauner <brauner@kernel.org>
Mon, 16 Feb 2026 13:32:09 +0000 (14:32 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 2 Mar 2026 10:06:42 +0000 (11:06 +0100)
commit0e75aea0b52dc8918fed4db40b035b2ef2cded40
treedea3976fa8b507a9e79e5e42119829a8f58844c6
parent7e28fef5d4db3a5e61cfcd4b09313933d16c0430
selftests/xattr: sockfs socket xattr tests

Test user.* extended attribute operations on sockfs sockets. Sockets
created via socket() have their inodes in sockfs, which now supports
user.* xattrs with per-inode limits.

Tests fsetxattr/fgetxattr/flistxattr/fremovexattr operations including
set/get, listing (verifies system.sockprotoname presence), remove,
update, XATTR_CREATE/XATTR_REPLACE flags, empty values, size queries,
and buffer-too-small errors.

Also tests per-inode limit enforcement: maximum 128 xattrs, maximum
128KB total value size, limit recovery after removal, and independent
limits across different sockets.

Link: https://patch.msgid.link/20260216-work-xattr-socket-v1-13-c2efa4f74cb7@kernel.org
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/filesystems/xattr/.gitignore
tools/testing/selftests/filesystems/xattr/Makefile
tools/testing/selftests/filesystems/xattr/xattr_sockfs_test.c [new file with mode: 0644]