From: linuxtestproject.agent@gmail.com
To: Stephen Bertram <sbertram@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] semctl01: fix SEM_STAT failures under parallel LTP runs
Date: Thu, 30 Jul 2026 16:00:14 +0000 [thread overview]
Message-ID: <20260730160014.4060-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260730150149.211449-1-sbertram@redhat.com>
Hi Stephen,
On Thu, Jul 30, 2026, Stephen Bertram wrote:
> semctl01: fix SEM_STAT failures under parallel LTP runs
The functional change looks correct: looking up this test's own kernel
index instead of relying on the global high index from IPC_INFO is the
right fix, the shared get_ipc_idx_from_id() helper faithfully preserves
the old shmctl01 loop, and the non-SAFE stat() wrappers correctly skip
foreign sets that return -1. Two small comments below.
> +int get_ipc_idx_from_id(int id, int max_idx,
> + int (*stat_fn)(int idx, void *buf), void *buf);
Could this new public function gain a kernel-doc comment? Per the
documentation rules new public functions in include/ should be
documented with kernel-doc. The rest of this header is undocumented
too, so this is only a suggestion.
Also, the continuation line here is indented with three tabs plus one
extra space, so it does not align with the open parenthesis. The
definition in tse_newipc.c aligns with three tabs and no extra space;
should the declaration match?
> +static void func_sstat(int semid)
> +{
> + if (semid != sem_id) {
> + tst_res(TFAIL, "expected sem_id %d, got %d", sem_id, semid);
> + return;
> + }
> +
> + if (buf.sem_nsems == PSEMS && buf.sem_perm.mode == (SEM_RA | NEWMODE))
This reads the mode set by the IPC_SET case. Since the SEM_STAT case
(index 11) always runs after IPC_SET (index 1) in the tcases array, and
the mode is not touched in between, buf.sem_perm.mode is 0666 as
asserted here - so the check holds. Just noting the dependency for the
record.
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-07-30 16:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 16:49 [LTP] [PATCH v2] semctl: updates for multi worker testing Stephen Bertram via ltp
2026-04-14 17:15 ` [LTP] " linuxtestproject.agent
2026-07-20 22:49 ` [LTP] [PATCH v3] semctl01: tolerate SEM_STAT races under parallel LTP runs Stephen Bertram via ltp
2026-07-20 23:13 ` [LTP] " linuxtestproject.agent
2026-07-20 23:56 ` [LTP] [PATCH v4] " Stephen Bertram via ltp
2026-07-21 2:38 ` [LTP] " linuxtestproject.agent
2026-07-21 13:55 ` [LTP] [PATCH v5] " Stephen Bertram via ltp
2026-07-21 14:40 ` [LTP] " linuxtestproject.agent
2026-07-28 13:06 ` [LTP] [PATCH v5] " Andrea Cervesato via ltp
2026-07-28 16:23 ` [LTP] [PATCH v6] " Stephen Bertram via ltp
2026-07-28 17:31 ` [LTP] " linuxtestproject.agent
2026-07-28 20:33 ` [LTP] [PATCH v7] semctl01: look up SEM_STAT index for this test's sem_id Stephen Bertram via ltp
2026-07-28 21:12 ` [LTP] " linuxtestproject.agent
2026-07-29 14:53 ` [LTP] [PATCH v8] semctl01: fix SEM_STAT failures under parallel LTP runs Stephen Bertram via ltp
2026-07-29 16:26 ` [LTP] " linuxtestproject.agent
2026-07-29 17:56 ` [LTP] [PATCH v9] " Stephen Bertram via ltp
2026-07-29 18:14 ` [LTP] " linuxtestproject.agent
2026-07-29 19:33 ` [LTP] [PATCH v10] " Stephen Bertram via ltp
2026-07-29 20:20 ` [LTP] " linuxtestproject.agent
2026-07-29 21:00 ` [LTP] [PATCH v11] " Stephen Bertram via ltp
2026-07-29 22:07 ` [LTP] " linuxtestproject.agent
2026-07-30 2:08 ` [LTP] [PATCH v12] " Stephen Bertram via ltp
2026-07-30 2:19 ` [LTP] " linuxtestproject.agent
2026-07-30 4:47 ` [LTP] [PATCH v13] " Stephen Bertram via ltp
2026-07-30 5:46 ` [LTP] " linuxtestproject.agent
2026-07-30 15:01 ` [LTP] [PATCH v14] " Stephen Bertram via ltp
2026-07-30 16:00 ` linuxtestproject.agent [this message]
2026-07-30 17:19 ` [LTP] [PATCH v15] " Stephen Bertram via ltp
2026-07-30 17:30 ` [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=20260730160014.4060-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=sbertram@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox