[LTP] fs/acl: Add ACL_USER_OBJ permissions test
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Fri Jun 5 11:31:16 CEST 2026
Hi Sachin,
On Thu, 4 Jun 2026 12:24:10 +0530, Sachin Sant
<sachinp@linux.ibm.com> wrote:
> fs/acl: Add ACL_USER_OBJ permissions test
--- [PATCH 1/8] ---
> The patch also adds acl_lib.h containing shared helper functions
> and definitions for ACL and extended attribute tests.
The commit adds two distinct things: the shared helper library
acl_lib.h, and the first test acl_user_obj01.c. Per Ground Rule 7,
each patch must contain exactly one logical change. acl_lib.h should
be introduced in a preparatory commit before the tests that use it.
> then sets ACL_USER_OBJ with write permissions and confirms that
> file creation succeeds.
> + add_acl_entry(acl, ACL_USER_OBJ,
> + ACL_READ | ACL_WRITE | ACL_EXECUTE);
The body says "sets ACL_USER_OBJ with write permissions" but the
code grants read, write, and execute (rwx). The description should
say "full permissions (rwx)" or "rwx".
> +uid_t user1_uid, user2_uid, user3_uid;
> +gid_t user1_gid, user2_gid, user3_gid;
> +int users_created = 0;
> +
> +#ifdef HAVE_LIBACL
These variable definitions are outside the #ifdef HAVE_LIBACL guard
but are only used inside it. Per c-tests.md Rule 16, all test code
must be wrapped by the feature guard. Move these three lines inside
the #ifdef block.
The same pattern appears in acl_mask01.c (patch 2/8), acl_other01.c
(patch 3/8), acl_inherit01.c (patch 4/8), and acl_file_ops01.c
(patch 5/8).
> +LDLIBS += $(ACL_LIBS)
This applies the ACL library link flag to every binary in the
directory, including xattr_test01, which uses only xattr syscalls and
does not call any libacl functions. Per the build-system rules,
per-target flags are preferred when not every test truly needs them.
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