public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] semctl: use IPC_PRIVATE to minimize interference.
@ 2026-04-14 16:51 Stephen Bertram via ltp
  2026-04-14 17:33 ` [LTP] " linuxtestproject.agent
  2026-04-15 13:49 ` [LTP] [PATCH v1] " Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Bertram via ltp @ 2026-04-14 16:51 UTC (permalink / raw)
  To: ltp; +Cc: Stephen Bertram

This update solves previous issues when tests were
run in parallel with multiple workers in tmt.

Signed-off-by: Stephen Bertram <sbertram@redhat.com>
---
 testcases/kernel/syscalls/ipc/semctl/semctl03.c | 5 +----
 testcases/kernel/syscalls/ipc/semctl/semctl05.c | 6 +-----
 testcases/kernel/syscalls/ipc/semctl/semctl07.c | 3 +--
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl03.c b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
index 5a11b95ef..dc11d0823 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl03.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
@@ -84,14 +84,11 @@ static void verify_semctl(unsigned int n)
 
 static void setup(void)
 {
-	static key_t semkey;
 	struct test_variants *tv = &variants[tst_variant];
 
 	tst_res(TINFO, "Testing variant: %s", tv->desc);
 
-	semkey = GETIPCKEY();
-
-	sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA);
+	sem_id = SAFE_SEMGET(IPC_PRIVATE, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA);
 
 	bad_ptr = tst_get_bad_addr(NULL);
 }
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl05.c b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
index 985c1f039..f1ab69f59 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl05.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
@@ -45,11 +45,7 @@ static void verify_semctl(unsigned int n)
 
 static void setup(void)
 {
-	static key_t semkey;
-
-	semkey = GETIPCKEY();
-
-	sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA);
+	sem_id = SAFE_SEMGET(IPC_PRIVATE, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA);
 }
 
 static void cleanup(void)
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl07.c b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
index 1b03f0ab2..a0b5f4928 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl07.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
@@ -130,10 +130,9 @@ static void verify_semctl(void)
 
 static void setup(void)
 {
-	key_t key = GETIPCKEY();
 	nsems = 1;
 
-	semid = SAFE_SEMGET(key, nsems, SEM_RA | IPC_CREAT);
+	semid = SAFE_SEMGET(IPC_PRIVATE, nsems, SEM_RA | IPC_CREAT);
 }
 
 static void cleanup(void)
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] semctl: use IPC_PRIVATE to minimize interference.
  2026-04-14 16:51 [LTP] [PATCH v1] semctl: use IPC_PRIVATE to minimize interference Stephen Bertram via ltp
@ 2026-04-14 17:33 ` linuxtestproject.agent
  2026-04-15 13:49 ` [LTP] [PATCH v1] " Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: linuxtestproject.agent @ 2026-04-14 17:33 UTC (permalink / raw)
  To: Stephen Bertram; +Cc: ltp

Hi Stephen,

On Tue, 14 Apr 2026 12:51:14 -0400, Stephen Bertram wrote:
> semctl: use IPC_PRIVATE to minimize interference.

> This update solves previous issues when tests were
> run in parallel with multiple workers in tmt.

Since you describe this as fixing a bug, a Fixes: tag is expected. Please
add one pointing to the commit that introduced the named-key usage. If
that commit predates LTP's git history, mention it in the cover letter.

---
Note:

Our agent completed the review of the patch. 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.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH v1] semctl: use IPC_PRIVATE to minimize interference.
  2026-04-14 16:51 [LTP] [PATCH v1] semctl: use IPC_PRIVATE to minimize interference Stephen Bertram via ltp
  2026-04-14 17:33 ` [LTP] " linuxtestproject.agent
@ 2026-04-15 13:49 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2026-04-15 13:49 UTC (permalink / raw)
  To: Stephen Bertram; +Cc: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-15 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 16:51 [LTP] [PATCH v1] semctl: use IPC_PRIVATE to minimize interference Stephen Bertram via ltp
2026-04-14 17:33 ` [LTP] " linuxtestproject.agent
2026-04-15 13:49 ` [LTP] [PATCH v1] " Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox