From patchwork Wed Oct 4 21:36:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 23335 Received: (qmail 64742 invoked by alias); 4 Oct 2017 21:36:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 64732 invoked by uid 89); 4 Oct 2017 21:36:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=H*Ad:D*br X-HELO: mail-oi0-f48.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PsdTngLf2cMLniSn34cJZRcje6Qt20vbmjR9dn41Dw8=; b=cvV/Dlc2xjIW3xslZHEQT+QfbHCrZtN5AcsmwJfpzaj5S6YnE3xc7okQYf5lK+B275 UAE0XIiI4kQornGfmBPekTd6XDNDrd2xLFBrzHRtyfhwkvy6oYqTUFiXGrf3UOxylBBF IuELRaioce5V6stSA5IMazPqcNNsB3KDld0Xr+xKkJInYcTIDOKUEN9fuE5D2TVhRXld bMioTKcMyh6e4JsXK1te9FQWCxAMZ4YEYgYvM/1ZHz6pEmcBOnBMtNmwjL2J6+TmulnO GXUs5LDMCgtNTU7fQCIex41MRLLYWfXSV5685rWDXg2MyJy1CgcYphV6fQMS1PqYf0Jj nNVw== X-Gm-Message-State: AMCzsaVRnpaofSHflk0wKVskiNxm6tKA+g3WebuvaI9mQDtwtXN2zWp+ I1ZWZU8e4JJRaXfzfefXIl3UY01C0GrBnV7QOoQ= X-Google-Smtp-Source: AOwi7QCO6I+glg6HXVD/vCTI08k9AYXl9tDqgqyylWTITTP2sewFOpFieLYWYYCan4niKwsvUpq84S/wcoopy6l69c0= X-Received: by 10.202.243.69 with SMTP id r66mr9582349oih.337.1507153009462; Wed, 04 Oct 2017 14:36:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <54af455b-0332-495d-3e10-0992e98e0102@redhat.com> References: <20171003140307.22359-1-gabriel@inconstante.eti.br> <20171003161028.116fd41a@keller.br.ibm.com> <54af455b-0332-495d-3e10-0992e98e0102@redhat.com> From: "H.J. Lu" Date: Wed, 4 Oct 2017 14:36:48 -0700 Message-ID: Subject: Re: [PATCH] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm To: Florian Weimer Cc: Joseph Myers , "Gabriel F. T. Gomes" , libc-alpha@sourceware.org On 10/4/17, Florian Weimer wrote: > On 10/04/2017 03:15 PM, Joseph Myers wrote: >> On Wed, 4 Oct 2017, H.J. Lu wrote: >> >>> This is what I checked in. >> >> This fix doesn't seem to be on 2.26 branch, but needs to go there as the >> original patch went there. >> >> I don't think using an int count of errors and returning it from do_test >> is a good coding pattern, because if the count reaches 77 it will result >> in a spurious UNSUPPORTED result. Of course in this particular test it >> can't reach 77, but a better pattern is either a boolean error state (set >> to true rather than using ++, given the warning quoted here), or a count >> but with do_test returning errors != 0. > > Agreed. Note that TEST_VERIFY allows the test to continue after a > failure, and it also arranges for a non-zero exit status (even across > fork, but currently not across dlopen). It's usually a good alternative > to such error variables. > > Thanks, > Florian > i am testing this patch and will backport these 2 patches to 2.26 branch. From 758f1bfa2a1bccb52f1b3e97444a367d35aceaee Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 4 Oct 2017 14:31:16 -0700 Subject: [PATCH] test-math-iscanonical.cc: Return errors != 0 Since not all non-zero error counts are errors, return errors != 0 instead. * math/test-math-iscanonical.cc (do_test): Return errors != 0. --- ChangeLog | 4 ++++ math/test-math-iscanonical.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4d94f133dc..c1fd8a7993 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-10-04 H.J. Lu + + * math/test-math-iscanonical.cc (do_test): Return errors != 0. + 2017-10-04 Joseph Myers * sysdeps/ieee754/dbl-64/s_fma.c: Include . diff --git a/math/test-math-iscanonical.cc b/math/test-math-iscanonical.cc index 8ced7a73b4..4cfb1c5055 100644 --- a/math/test-math-iscanonical.cc +++ b/math/test-math-iscanonical.cc @@ -42,7 +42,7 @@ do_test (void) #if __HAVE_DISTINCT_FLOAT128 check_type<_Float128> (); #endif - return errors; + return errors != 0; } #include -- 2.13.6