sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
PATCH v3 1/1 sigrelse01: Select signals based on SIGRTMIN/SIGRTMAX for musl compat
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.
---
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(-)
testcases/kernel/syscalls/sigrelse/sigrelse01.c +3 -1
@@ -739,8 +739,10 @@ int choose_sig(int sig) } -return 1 ; +if (sig <32 ) +return 1 ; +return sig >=SIGRTMIN && sig <=SIGRTMAX ; }void setup (void )
Signature · 5 lines
2.49.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Florian, Pedro,
Quoted 5 lines
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).
Quoted 2 lines
Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for this check.
nit: @Florian instead of the above I'll add:
@Pedro Can I merge with your RBT?
Kind regards,
Petr
Quoted 24 lines
---
Changes in v3:
- base check on SIGRTMIN / SIGRTMAX, as suggested by Pedro Falcatotestcases/kernel/syscalls/sigrelse/sigrelse01.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/kernel/syscalls/sigrelse/sigrelse01.c +3
-1@@ -739,8 +739,10 @@ int choose_sig(int sig) } -return 1 ; +if (sig <32 ) +return 1 ; +return sig >=SIGRTMIN && sig <=SIGRTMAX ; }void setup (void )
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 13 lines · Petr Vorel
Hi Florian, Pedro,
Quoted 5 lines
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 <[email protected]>Tested-by Petr Vorel <[email protected]>
Quoted 7 lines
Quoted 2 lines
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 <[email protected]>@Pedro Can I merge with your RBT?
Assuming you mean Reviewed-by, yep, all fine by me.
Signature · 4 lines
Pedro -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Florian, Pedro,
Quoted 17 lines · Petr Vorel
Quoted 15 lines
Hi Florian, Pedro,
Quoted 5 lines
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 <[email protected]>Tested-by Petr Vorel <[email protected]>Quoted 2 lines
Thanks to Pedro Falcato for suggesting using SIGRTMIN and SIGRTMAX for this check.
Quoted 6 lines
Quoted 4 lines
nit: @Florian instead of the above I'll add:
Suggested-by Pedro Falcato <[email protected]>@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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp