From: linuxtestproject.agent@gmail.com
To: Sachin Sant <sachinp@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] fs/acl: Add ACL_USER_OBJ permission test
Date: Mon, 15 Jun 2026 06:32:08 +0000 [thread overview]
Message-ID: <20260615063208.4077-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260615052953.18183-2-sachinp@linux.ibm.com>
Hi Sachin,
On Mon, 15 Jun 2026, Sachin Sant wrote:
> fs/acl: Add ACL_USER_OBJ permission test
--- [PATCH 2/8] ---
> +static void test_acl_user_with_mask(void)
> ...
> +static void test_acl_group_with_mask(void)
> ...
> +static void test_acl_group_obj_with_mask(void)
> ...
> +static void run(unsigned int n)
> +{
> + switch (n) {
> + case 0:
> + test_acl_user_with_mask();
> + break;
> + case 1:
> + test_acl_group_with_mask();
> + break;
> + case 2:
> + test_acl_group_obj_with_mask();
> + break;
> + }
> +}
The three test functions share the same algorithmic structure:
set up ACL with full permissions for an entry type, verify
access is granted with mask=rwx, clear the mask, verify
access is denied. They differ only in the ACL entry type
(ACL_USER / ACL_GROUP / ACL_GROUP_OBJ) and the UID/GID
used.
Could these be collapsed into a single parametrized test
function driven by a struct tcase array? Something along
the lines of:
struct tcase {
uint16_t tag;
uid_t uid;
gid_t gid;
uid_t owner_uid;
gid_t owner_gid;
const char *desc;
} tcases[] = {
{ACL_USER, USER3_UID, USER3_GID,
TEST_UID, TEST_GID, "ACL_USER with mask"},
{ACL_GROUP, USER2_UID, USER2_GID,
TEST_UID, TEST_GID, "ACL_GROUP with mask"},
{ACL_GROUP_OBJ, USER2_UID, USER2_GID,
TEST_UID, USER2_GID, "ACL_GROUP_OBJ with mask"},
};
That would remove roughly 130 lines of duplicated logic and
make the data-driven pattern explicit.
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-15 6:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 5:29 [LTP] [PATCH v9 0/8] Convert shell-based ACL test (tacl_xattr.sh) to C Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 1/8] fs/acl: Add ACL_USER_OBJ permission test Sachin Sant
2026-06-15 6:32 ` linuxtestproject.agent [this message]
2026-06-15 5:29 ` [LTP] [PATCH v9 2/8] fs/acl: Add ACL mask interaction tests Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 3/8] fs/acl: Add ACL_OTHER permission test Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 4/8] fs/acl: Add default ACL inheritance test Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 5/8] fs/acl: Add chmod/chown ACL interaction tests Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 6/8] fs/acl: Add ACL symlink operations test Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 7/8] fs/acl: Add extended attributes test Sachin Sant
2026-06-15 5:29 ` [LTP] [PATCH v9 8/8] fs/acl: Remove old shell-based ACL test Sachin Sant
-- strict thread matches above, loose matches on Subject: below --
2026-06-15 15:15 [LTP] [PATCH v11 1/8] fs/acl: Add ACL_USER_OBJ permission test Sachin Sant
2026-06-15 18:35 ` [LTP] " linuxtestproject.agent
2026-06-15 7:25 [LTP] [PATCH v10 1/8] " Sachin Sant
2026-06-15 8:33 ` [LTP] " linuxtestproject.agent
2026-06-15 9:04 ` Andrea Cervesato via ltp
2026-06-15 9:29 ` Andrea Cervesato via ltp
2026-06-15 11:25 ` Sachin Sant
2026-06-15 12:07 ` Andrea Cervesato via ltp
2026-06-13 9:05 [LTP] [PATCH v8 1/8] " Sachin Sant
2026-06-13 10:36 ` [LTP] " linuxtestproject.agent
2026-06-12 17:19 [LTP] [PATCH v7 1/8] " Sachin Sant
2026-06-12 19:13 ` [LTP] " linuxtestproject.agent
2026-06-12 10:24 [LTP] [PATCH v6 1/8] " Sachin Sant
2026-06-12 12:27 ` [LTP] " linuxtestproject.agent
2026-06-08 9:21 [LTP] [PATCH v5 1/8] " Sachin Sant
2026-06-08 11:01 ` [LTP] " linuxtestproject.agent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260615063208.4077-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=sachinp@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.