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, 8 Jun 2026 11:01:10 +0000 [thread overview]
Message-ID: <20260608110110.4175-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260608092200.92827-2-sachinp@linux.ibm.com>
Hi Sachin,
On Mon, 8 Jun 2026 14:51:53 +0530, Sachin Sant wrote:
> fs/acl: Add ACL_USER_OBJ permission test
--- [PATCH 1/8] ---
> +#include <sys/xattr.h>
acl_lib.h includes <sys/xattr.h> unconditionally. LTP's configure.ac
checks for this header and defines HAVE_SYS_XATTR_H. Other xattr tests
(e.g. setxattr01, setxattr02, setxattr03) guard their code with
#ifdef HAVE_SYS_XATTR_H.
Each .c test file should wrap all test code in a file-level guard with
TST_TEST_TCONF in the #else branch, e.g.:
#include "acl_lib.h"
#ifdef HAVE_SYS_XATTR_H
/* ... all test code ... */
static struct tst_test test = { ... };
#else
TST_TEST_TCONF("sys/xattr.h is not available");
#endif
Without this, the tests will fail to compile on systems where
sys/xattr.h is not available.
--- [PATCH 6/8] ---
> +static struct tst_test test = {
> + .test_all = run,
> + .setup = setup,
> + .cleanup = cleanup,
> + .needs_root = 1,
> + .mount_device = 1,
> + .mntpoint = MNTPOINT,
> + .forks_child = 1,
acl_link01 never forks a child process. It does not call SAFE_FORK(),
try_create_as(), or create_file_as(). Should .forks_child be dropped?
--- [PATCH 7/8] ---
> + TST_EXP_PASS_SILENT(setxattr(TESTDIR, XATTR_TEST_DIR_NAME,
> + XATTR_TEST_DIR_VALUE,
> + XATTR_TEST_DIR_SIZE, 0));
> + if (!TST_PASS) {
> + if (TST_ERR == EOPNOTSUPP) {
> + tst_res(TCONF, "Extended attributes not supported");
> + return;
> + }
> + tst_res(TFAIL, "setxattr on directory failed");
> + return;
> + }
TST_EXP_PASS_SILENT already reports TFAIL on failure. Then the code
reports TFAIL again (or TCONF for EOPNOTSUPP), resulting in
double-reporting. For the EOPNOTSUPP case the output will contain a
contradictory TFAIL followed by TCONF.
Since custom failure handling is needed here (EOPNOTSUPP -> TCONF),
TEST() should be used instead:
TEST(setxattr(TESTDIR, XATTR_TEST_DIR_NAME,
XATTR_TEST_DIR_VALUE, XATTR_TEST_DIR_SIZE, 0));
if (TST_RET == -1) {
if (TST_ERR == EOPNOTSUPP) {
tst_res(TCONF, "Extended attributes not supported");
return;
}
tst_res(TFAIL | TTERRNO, "setxattr on directory failed");
return;
}
The same pattern appears for the second setxattr call in test_xattr()
and the first setxattr call in test_xattr_backup_restore().
> + .forks_child = 1,
Same as patch 6/8: xattr_test01 never forks a child process.
Should .forks_child be dropped?
--- Applies to patches 2/8 through 7/8 ---
> + * [Algorithm]
> + *
> + * 1. Set up ACL with full permissions for the entry
The [Algorithm] section must use a bulleted list with "-" markers,
not numbered lists. This applies to all six tests that have an
[Algorithm] block (acl_mask01, acl_other01, acl_inherit01,
acl_file_ops01, acl_link01, xattr_test01).
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-08 11:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 9:21 [LTP] [PATCH v5 0/8] Convert shell-based ACL test (tacl_xattr.sh) to C Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v5 1/8] fs/acl: Add ACL_USER_OBJ permission test Sachin Sant
2026-06-08 11:01 ` linuxtestproject.agent [this message]
2026-06-08 11:57 ` Cyril Hrubis
2026-06-08 13:40 ` Sachin Sant
2026-06-08 14:25 ` Cyril Hrubis
2026-06-08 9:21 ` [LTP] [PATCH v3 2/8] fs/acl: Add ACL mask interaction tests Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v3 3/8] fs/acl: Add ACL_OTHER permissions test Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v4 4/8] fs/acl: Add default ACL inheritance test Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v3 5/8] fs/acl: Add chmod/chown ACL interaction tests Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v5 6/8] fs/acl: Add symlink ACL operations test Sachin Sant
2026-06-08 9:21 ` [LTP] [PATCH v4 7/8] fs/acl: Add extended attributes test Sachin Sant
2026-06-08 9:22 ` [LTP] [PATCH v1 8/8] fs/acl: Remove old shell-based ACL test Sachin Sant
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=20260608110110.4175-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.