From: Samuel Thibault Date: Tue, 7 Jul 2020 21:24:48 +0000 (+0000) Subject: tst-strsignal: fix checking for RT signals support X-Git-Tag: upstream/2.34~1708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5549370a73c45b12621a1abe58920771278a72b4;p=platform%2Fupstream%2Fglibc.git 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 --git a/string/tst-strsignal.c b/string/tst-strsignal.c index 93a46db..3f67649 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;