* [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
* Re: [LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
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
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2025-08-18 13:00 UTC (permalink / raw)
To: Florian Schmaus; +Cc: Pedro Falcato, ltp
Hi Florian, Pedro,
> 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.
+1, now it works on both glibc and musl (and hopefully in the rest of libc).
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
> Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for
> this check.
nit: @Florian instead of the above I'll add:
Suggested-by: Pedro Falcato <pfalcato@suse.de>
@Pedro Can I merge with your RBT?
Kind regards,
Petr
> ---
> 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)
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
2025-08-18 13:00 ` Petr Vorel
@ 2025-08-18 15:35 ` Pedro Falcato
2025-08-18 20:02 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: Pedro Falcato @ 2025-08-18 15:35 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Mon, Aug 18, 2025 at 03:00:38PM +0200, Petr Vorel wrote:
> Hi Florian, Pedro,
>
> > 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.
>
> +1, now it works on both glibc and musl (and hopefully in the rest of libc).
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Tested-by: Petr Vorel <pvorel@suse.cz>
>
> > Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for
> > this check.
>
> nit: @Florian instead of the above I'll add:
> Suggested-by: Pedro Falcato <pfalcato@suse.de>
>
> @Pedro Can I merge with your RBT?
Assuming you mean Reviewed-by, yep, all fine by me.
--
Pedro
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
2025-08-18 15:35 ` Pedro Falcato
@ 2025-08-18 20:02 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2025-08-18 20:02 UTC (permalink / raw)
To: Pedro Falcato; +Cc: ltp
Hi Florian, Pedro,
> On Mon, Aug 18, 2025 at 03:00:38PM +0200, Petr Vorel wrote:
> > Hi Florian, Pedro,
> > > 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.
> > +1, now it works on both glibc and musl (and hopefully in the rest of libc).
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Tested-by: Petr Vorel <pvorel@suse.cz>
> > > Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for
> > > this check.
> > nit: @Florian instead of the above I'll add:
> > Suggested-by: Pedro Falcato <pfalcato@suse.de>
> > @Pedro Can I merge with your RBT?
> Assuming you mean Reviewed-by, yep, all fine by me.
Thank you both! Patch merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [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.