All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
@ 2025-08-14 15:26 Florian Schmaus via ltp
  2025-08-18 13:00 ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Schmaus via ltp @ 2025-08-14 15:26 UTC (permalink / raw)
  To: ltp

This avoids selecting signal 34 when the test is run using
musl. Signal 34 is used internally by musl as SIGSYNCCALL.
Consequently, musl's signal() will return with an error status and
errno set to EINVAL when trying to setup a signal handler for signal
34, causing the sigrelse01 test to fail.

Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for
this check.

Signed-off-by: Florian Schmaus <florian.schmaus@codasip.com>
---

Changes in v3:
    - base check on SIGRTMIN / SIGRTMAX, as suggested by Pedro Falcato

 testcases/kernel/syscalls/sigrelse/sigrelse01.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/sigrelse/sigrelse01.c b/testcases/kernel/syscalls/sigrelse/sigrelse01.c
index d1ed9d53a4dc..23c6758262bb 100644
--- a/testcases/kernel/syscalls/sigrelse/sigrelse01.c
+++ b/testcases/kernel/syscalls/sigrelse/sigrelse01.c
@@ -739,8 +739,10 @@ int choose_sig(int sig)
 
 	}
 
-	return 1;
+	if (sig < 32)
+		return 1;
 
+	return sig >= SIGRTMIN && sig <= SIGRTMAX;
 }
 
 void setup(void)
-- 
2.49.1


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

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

end of thread, other threads:[~2025-08-18 20:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 15:26 [LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat Florian Schmaus via ltp
2025-08-18 13:00 ` Petr Vorel
2025-08-18 15:35   ` Pedro Falcato
2025-08-18 20:02     ` Petr Vorel

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.