All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avinesh Kumar via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] openposix: mq_close/2-1: Use a valid signal number for mq_notify()
Date: Sun, 18 Oct 2026 18:01:14 +0200	[thread overview]
Message-ID: <20261018160115.154430-2-avinesh.kumar@suse.com> (raw)
In-Reply-To: <20261018160115.154430-1-avinesh.kumar@suse.com>

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


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

  reply	other threads:[~2026-10-18 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:01 [LTP] [PATCH 0/2] openposix: mq_close/2-1: Fix failure on v7.3+ Avinesh Kumar via ltp
2026-10-18 16:01 ` Avinesh Kumar via ltp [this message]
2026-10-18 17:54   ` [LTP] openposix: mq_close/2-1: Use a valid signal number for mq_notify() linuxtestproject.agent
2026-10-20 10:10   ` [LTP] [PATCH 1/2] " Cyril Hrubis
2026-10-21  9:34   ` Andrea Cervesato via ltp
2026-10-18 16:01 ` [LTP] [PATCH 2/2] openposix: mq_close/2-1: Initialize sigev_signo and check for EBUSY Avinesh Kumar via ltp
2026-10-20 10:22   ` Cyril Hrubis
2026-10-21  9:34   ` Andrea Cervesato via ltp
2026-10-21  9:35   ` Andrea Cervesato via ltp

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=20261018160115.154430-2-avinesh.kumar@suse.com \
    --to=ltp@lists.linux.it \
    --cc=avinesh.kumar@suse.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 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.