[LTP] [PATCH 1/2] openposix: mq_close/2-1: Use a valid signal number for mq_notify()

Avinesh Kumar avinesh.kumar@suse.com
Sun Oct 18 18:01:14 CEST 2026


From: Avinesh Kumar <avinesh.kumar@suse.com>

Linux commit 1184f5e82009 ("mqueue: reject mq_notify with signo 0")
in v7.3-rc1, makes mq_notify() with SIGEV_SIGNAL fail with EINVAL
if sigev_signo is 0.

In mq_close/2-1 test, the child registers its notification with signo 0
after the parent's mq_close(), so the call is now rejected before the
queue state is checked and the test fails on v7.3+.

Use SIGUSR1 as a valid signal.

Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
---
 .../open_posix_testsuite/conformance/interfaces/mq_close/2-1.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
index 6e704158a575..971278aee730 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
@@ -193,7 +193,7 @@ static int child_process(char *qname, int read_pipe, int write_pipe)
 	}
 	// try notify after parent closed queue - should succeed
 	se.sigev_notify = SIGEV_SIGNAL;
-	se.sigev_signo = 0;
+	se.sigev_signo = SIGUSR1;
 	rval = mq_notify(queue, &se);
 
 	// send 'd' for success and 'e' for failure
-- 
2.56.0



More information about the ltp mailing list