[LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat

Petr Vorel pvorel@suse.cz
Mon Aug 18 15:00:38 CEST 2025


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)


More information about the ltp mailing list