From patchwork Wed Jun 20 13:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 27946 Received: (qmail 96447 invoked by alias); 20 Jun 2018 13:39:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 96433 invoked by uid 89); 20 Jun 2018 13:39:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Still, 7519 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Jun 2018 13:39:13 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5KDTFll090906 for ; Wed, 20 Jun 2018 09:39:11 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jqnx56fp1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Jun 2018 09:39:11 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jun 2018 14:39:09 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 20 Jun 2018 14:39:06 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5KDd5aN27918372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 Jun 2018 13:39:05 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE22C4C059; Wed, 20 Jun 2018 14:30:04 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD08B4C058; Wed, 20 Jun 2018 14:30:04 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.152.213.77]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 20 Jun 2018 14:30:04 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 5B634D80294; Wed, 20 Jun 2018 15:39:05 +0200 (CEST) Subject: Re: New FAIL gdb.base/float128.exp on ppc64le [Re: [RFC v2][2/2] Target FP: Make use of MPFR if available] To: jan.kratochvil@redhat.com (Jan Kratochvil) Date: Wed, 20 Jun 2018 15:39:05 +0200 (CEST) From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, sergiodj@redhat.com (Sergio Durigan Junior) In-Reply-To: <20180620125031.GA1067098@host1.jankratochvil.net> from "Jan Kratochvil" at Jun 20, 2018 02:50:31 PM MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18062013-0016-0000-0000-000001DE1EEE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062013-0017-0000-0000-00003232336D Message-Id: <20180620133905.5B634D80294@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-20_06:, , signatures=0 Jan Kratochvil wrote: > On Wed, 20 Jun 2018 14:33:30 +0200, Ulrich Weigand wrote: > > A result of "inf" instead of the large number is exactly the problem that > > is fixed by using MPFR. So I'm wondering: is the GDB that shows the FAIL > > actually built against MPFR? If at build time MPFR was not detected, > > then this failure is exactly what you'd expect ... > > Thanks for the heads up, our GDB build was really missing this dependency. Ah good, that explains it. > Still maybe the testcase should contain such explanation of the FAIL. Agreed. The attached patch adds a comment, and also updates the FAIL message to indicate possible lack of MPFR support as reason. Does this look good to you? > Moreover maybe it could be an XFAIL. I guess ... On the other hand, it does indicate a real bug in GDB; if it had been an XFAIL, you probably wouldn't have noticed missing MPFR support in your build now. Bye, Ulrich testsuite/ChangeLog: * gdb.base/float128.exp: Add comment and improved fail message to the failure case of "print large128" test. diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp index 4c322b8ab3..26cabac776 100644 --- a/gdb/testsuite/gdb.base/float128.exp +++ b/gdb/testsuite/gdb.base/float128.exp @@ -75,5 +75,19 @@ gdb_test "print ld" ".* = 10\\.375.*" "the value of ld is changed to 10.375" gdb_test "print f128" ".* = 20\\.375.*" "the value of f128 is changed to 20.375" # Test that we can correctly handle the largest IEEE-128 value -gdb_test "print large128" ".* = 1\\.18973149535723176508575932662800702e\\+4932" "print large128" +# Note: If we get "inf" instead of the correct result, we may have run into +# an internal overflow. This typically happens on host platforms without +# native IEEE-128 support where GDB was built without MPFR support. +set test "print large128" +gdb_test_multiple "print large128" "$test" { + -re ".* = 1\\.18973149535723176508575932662800702e\\+4932.*$gdb_prompt $" { + pass "$test" + } + -re ".* = inf.*$gdb_prompt $" { + fail "$test (GDB may be missing MPFR support!)" + } + -re ".*$gdb_prompt $" { + fail "$test" + } +}