[LTP] [PATCH v3] sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
Florian Schmaus
florian.schmaus@codasip.com
Thu Aug 14 17:26:59 CEST 2025
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
More information about the ltp
mailing list