public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/vineet/arc-port-latest] tst-strsignal: fix checking for RT signals support
@ 2020-07-09 16:36 Vineet Gupta
0 siblings, 0 replies; only message in thread
From: Vineet Gupta @ 2020-07-09 16:36 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5549370a73c45b12621a1abe58920771278a72b4
commit 5549370a73c45b12621a1abe58920771278a72b4
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Tue Jul 7 21:24:48 2020 +0000
tst-strsignal: fix checking for RT signals support
* string/tst-strsignal.c (do_test): Actually check that RT signals are
available by comparing SIGRTMAX to SIGRTMIN. Check that SIGRTMAX is 64
before testing for a message reporting 65 for SIGRTMAX+1.
Diff:
---
string/tst-strsignal.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/string/tst-strsignal.c b/string/tst-strsignal.c
index 93a46dbc78..3f6764989f 100644
--- a/string/tst-strsignal.c
+++ b/string/tst-strsignal.c
@@ -34,10 +34,12 @@ do_test (void)
TEST_COMPARE_STRING (strsignal (SIGINT), "Interrupt");
TEST_COMPARE_STRING (strsignal (-1), "Unknown signal -1");
#ifdef SIGRTMIN
- TEST_COMPARE_STRING (strsignal (SIGRTMIN), "Real-time signal 0");
+ if (SIGRTMIN < SIGRTMAX)
+ TEST_COMPARE_STRING (strsignal (SIGRTMIN), "Real-time signal 0");
#endif
#ifdef SIGRTMAX
- TEST_COMPARE_STRING (strsignal (SIGRTMAX+1), "Unknown signal 65");
+ if (SIGRTMAX == 64)
+ TEST_COMPARE_STRING (strsignal (SIGRTMAX+1), "Unknown signal 65");
#endif
xsetlocale (LC_ALL, "pt_BR.UTF-8");
@@ -45,10 +47,12 @@ do_test (void)
TEST_COMPARE_STRING (strsignal (SIGINT), "Interrup\xc3\xa7\xc3\xa3\x6f");
TEST_COMPARE_STRING (strsignal (-1), "Sinal desconhecido -1");
#ifdef SIGRTMI
- TEST_COMPARE_STRING (strsignal (SIGRTMIN), "Sinal de tempo-real 0");
+ if (SIGRTMIN < SIGRTMAX)
+ TEST_COMPARE_STRING (strsignal (SIGRTMIN), "Sinal de tempo-real 0");
#endif
#ifdef SIGRTMAX
- TEST_COMPARE_STRING (strsignal (SIGRTMAX+1), "Sinal desconhecido 65");
+ if (SIGRTMAX == 64)
+ TEST_COMPARE_STRING (strsignal (SIGRTMAX+1), "Sinal desconhecido 65");
#endif
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-09 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 16:36 [glibc/vineet/arc-port-latest] tst-strsignal: fix checking for RT signals support Vineet Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).