All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/ipc: Skip msgctl05 when __USE_TIME64_REDIRECTS is defined
@ 2025-05-22  9:30 Jiaying Song via ltp
  2026-02-17  8:50 ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 2+ messages in thread
From: Jiaying Song via ltp @ 2025-05-22  9:30 UTC (permalink / raw)
  To: ltp

From: Jiaying Song <jiaying.song.cn@windriver.com>

The msgctl05 test checks if the kernel clears the *_high fields in struct msqid64_ds.

However, when __USE_TIME64_REDIRECTS is defined, this structure may not
contain those fields due to header redirection. This patch adds a check
to skip the test in such cases, avoiding false failures and improving test robustness.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
---
 testcases/kernel/syscalls/ipc/msgctl/msgctl05.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
index cd2643b..27beeb8 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
@@ -11,7 +11,11 @@
 #include "tst_test.h"
 #include "tst_safe_sysv_ipc.h"
 
-#ifdef HAVE_MSQID64_DS_TIME_HIGH
+#if !defined(HAVE_MSQID64_DS_TIME_HIGH)
+TST_TEST_TCONF("test requires struct msqid64_ds to have the time_high fields");
+#elif defined(__USE_TIME64_REDIRECTS)
+TST_TEST_TCONF("test requires __USE_TIME64_REDIRECTS to be undefined");
+#else
 
 static void run(void)
 {
@@ -43,6 +47,5 @@ static struct tst_test test = {
 	.test_all = run,
 	.needs_tmpdir = 1,
 };
-#else
-TST_TEST_TCONF("test requires struct msqid64_ds to have the time_high fields");
+
 #endif
-- 
2.34.1


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

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

end of thread, other threads:[~2026-02-17  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  9:30 [LTP] [PATCH] syscalls/ipc: Skip msgctl05 when __USE_TIME64_REDIRECTS is defined Jiaying Song via ltp
2026-02-17  8:50 ` Andrea Cervesato via ltp

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.