[LTP] [PATCH v2] sigrelse01: Check if signal 34 is available for musl compat

Pedro Falcato pfalcato@suse.de
Wed Aug 13 17:26:24 CEST 2025


On Fri, Aug 08, 2025 at 06:34:57PM +0200, Florian Schmaus via ltp wrote:
> Do not select 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.
> 
> Since musl provides no preprocessor macro, we check for the
> availability of signal 34 by attempting to setup a signal handler. If
> signal() returns SIG_ERR with errno set to EINVAL then we assume the
> signal is unavailable. Knowing signal 34 is available with glibc, we
> perform this check only if __GLIBC__ is not defined.
>

This is wrong, the libc can use whatever (RT) signals it wants, and you're
supposed to check for their availability using SIGRTMIN. This applies for
both musl *and* glibc. The only difference is that glibc only needs 32 and 33,
whereas musl also needs 34 (for now).

So, the correct fix would be to exclude all signals outside of [SIGRTMIN, SIGRTMAX]

-- 
Pedro


More information about the ltp mailing list