[LTP] semctl01: fix SEM_STAT failures under parallel LTP runs
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Jul 30 19:30:51 CEST 2026
Hi Stephen,
On Thu, 30 Jul 2026, Stephen Bertram wrote:
> semctl01: fix SEM_STAT failures under parallel LTP runs
> The per-index lookup duplicated shmctl01's get_shm_idx_from_id(). Move
> the common loop into a new get_ipc_idx_from_id() helper in libs/newipc,
> shared by semctl01.c and shmctl01.c behind a small per-family stat()
> wrapper on each side.
This patch does two things at once: it fixes the SEM_STAT index lookup in
semctl01, and it refactors the already-working shmctl01 to route through a
new shared libnewipc helper.
Would it be cleaner to split this into two patches, so each is one logical
change and bisects independently?
1) introduce get_ipc_idx_from_id() in libs/newipc and convert shmctl01
to use it (no behavior change);
2) fix semctl01's SEM_STAT lookup on top of the new helper.
The semctl01 fix itself, the func_iinfo()/func_sstat() reworks, the
Makefile -lltpnewipc addition, and the kernel-doc on the new helper all
look correct.
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