[LTP] fs/acl: Add ACL_USER_OBJ permission test
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Fri Jun 12 21:13:35 CEST 2026
Hi Sachin,
On Fri, 12 Jun 2026, Sachin Sant wrote:
> fs/acl: Add ACL_USER_OBJ permission test
--- [PATCH 1/8] ---
> +static inline void reset_test_path_no_chown(void)
> +{
> + SAFE_TRY_UNLINK(TESTSYMLINK);
> + SAFE_TRY_UNLINK(TESTFILE);
> + SAFE_TRY_RMDIR(TESTDIR);
> +
> + SAFE_MKDIR(TESTDIR, 0755);
> +}
> +
> +static inline void reset_test_path(void)
> +{
> + reset_test_path_no_chown();
> +}
reset_test_path() and reset_test_path_no_chown() are identical.
The "_no_chown" suffix implies that reset_test_path() performs a
chown, but it does not. Could this cause confusion for future
maintainers?
If both need to exist for readability, the naming should reflect
the actual difference (which is currently none). Otherwise, one
of them could be dropped.
> +/*\
> + * Test ACL_USER_OBJ permissions using direct xattr manipulation.
> + *
> + * Verify that owner permissions (ACL_USER_OBJ) correctly control access
> + * to files and directories. The test validates that:
> + * - ACL_USER_OBJ permissions are applied directly as the owner bits
> + * - Setting ACL_USER_OBJ=rwx via setxattr() overrides a previous
> + * chmod restriction
setxattr() should use the RST manpage role for the test catalog,
e.g. :manpage:`setxattr(2)`.
--- [PATCH 5/8] ---
> +/*\
> + * Test chmod and chown interaction with ACLs using direct xattr manipulation.
> + *
> + * Verify that standard file operations (chmod, chown) interact correctly
> + * with ACLs:
> + * - chmod should update ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER entries
> + * - chown should change file owner/group without affecting ACL entries
Since the doc comment block is exported to the test catalog, chmod
and chown should use the RST manpage role, e.g.
:manpage:`chmod(2)` and :manpage:`chown(2)`.
> +static struct tst_test test = {
> + .test = run,
> + .tcnt = 2,
> + .setup = setup,
> + .cleanup = cleanup,
> + .needs_root = 1,
> + .mount_device = 1,
> + .mntpoint = MNTPOINT,
> + .forks_child = 1,
This test never calls SAFE_FORK() or any forking helper. Is
.forks_child = 1 needed here?
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list