From patchwork Tue Jul 7 21:36:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1324761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B1bP40WMZz9sQt for ; Wed, 8 Jul 2020 07:36:56 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F2A0385E005; Tue, 7 Jul 2020 21:36:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [185.233.100.1]) by sourceware.org (Postfix) with ESMTPS id 20B353858D35 for ; Tue, 7 Jul 2020 21:36:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 20B353858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 729932714; Tue, 7 Jul 2020 23:36:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8zS4d18FpACZ; Tue, 7 Jul 2020 23:36:48 +0200 (CEST) Received: from function (lfbn-bor-1-797-11.w86-234.abo.wanadoo.fr [86.234.239.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 9C8952597; Tue, 7 Jul 2020 23:36:48 +0200 (CEST) Received: from samy by function with local (Exim 4.94) (envelope-from ) id 1jsvGh-003yOc-Hm; Tue, 07 Jul 2020 23:36:47 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] tst-strsignal: fix checking for RT signals support Date: Tue, 7 Jul 2020 23:36:47 +0200 Message-Id: <20200707213647.947105-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * 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. --- 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;