From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IFXTLu0d0l+GPwAAWB0awg (envelope-from ) for ; Thu, 10 Dec 2020 08:09:01 -0500 Received: by simark.ca (Postfix, from userid 112) id ABC3B1F0A9; Thu, 10 Dec 2020 08:09:01 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5D5031E590 for ; Thu, 10 Dec 2020 08:09:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9EE51383F855; Thu, 10 Dec 2020 13:09:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EE51383F855 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607605740; bh=4qWlADgyrkwGoWSfl83db1l01vWIzgztn2wO8782vRQ=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OEj7YArIJTgpbiKyCOvnT42PpbdahFuVa72NWIcDaarWa4ijV4lT5IaR9ExfUViX6 EtEmZyBo+iLG8YNDYvI50RtCu5g/94ohebVsYiyS6l4ZiuusVZdtjBQbQVqh7uSzu1 K/pnMPB4NlKJetB2aXivEwAm1IwkKGd6/wdWJ+Pg= Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by sourceware.org (Postfix) with ESMTPS id E60DE383F851 for ; Thu, 10 Dec 2020 13:08:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E60DE383F851 Received: by mail-qt1-x82e.google.com with SMTP id z9so3529589qtn.4 for ; Thu, 10 Dec 2020 05:08:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4qWlADgyrkwGoWSfl83db1l01vWIzgztn2wO8782vRQ=; b=HHYK3RTsj+ZtQr6aEXu7XJtJWi01WByr8PXE6y8zL2eMHRj+8342u8hSRIaEOUy3LL xqoV2sj3H/hTN7NLyA1zdBtwMPc2Zu/Rr0S9LjQZqBnYenLLhtPQgYaY5l1bEYtNmh4E SlqEb5tI4lYfl+N5lsEa9jzkU6Q6BtnQhQ1GHWmi1hwv/z4Fq6OVEI2gxy9CjOaAeEQ7 oK87CGfLPlKj/QA5kXI2r+DCRabr+B8eMsiUlu+073TeiQWqhvST+x7wjobO/oEFOICI rtSa/jmBBAdSKzJvQm5/6zPPkFH8n3JIDMYeXmRGwZ0TNQe13xIQWSp3+bLVVVzuyKOp oTtQ== X-Gm-Message-State: AOAM532fnVO7fCDgXVlWvEZ7BjqB98DIMlw6kfCYAsz+rn6mzo7+3fr3 6b+vNJKieI37mT9wU0SmQM0yDDoejw9XGg== X-Google-Smtp-Source: ABdhPJzVD/3iOa9tS2J2pCuMrsb20LAdREQSdyLAqcFIBolXnKilMnZwFXiJJSMPfhZ7T4oonDPv4g== X-Received: by 2002:ac8:4e05:: with SMTP id c5mr9011241qtw.359.1607605736888; Thu, 10 Dec 2020 05:08:56 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:370e:d0ac:8d1:89b2:5272? ([2804:7f0:8284:370e:d0ac:8d1:89b2:5272]) by smtp.gmail.com with ESMTPSA id p75sm3354767qka.72.2020.12.10.05.08.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 05:08:56 -0800 (PST) Subject: Re: [PATCH][gdb/testsuite] Fix gdb.base/float128.exp with --with-mpfr=no To: Tom de Vries , gdb-patches@sourceware.org References: <20201210125334.GA1267@delia> Message-ID: <8175f4fe-dcb5-8580-85f9-a1af1a79221b@linaro.org> Date: Thu, 10 Dec 2020 10:08:53 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201210125334.GA1267@delia> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: Ulrich Weigand Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/10/20 9:53 AM, Tom de Vries wrote: > Hi, > > When configuring gdb using --with-mpfr=no and running test-case > gdb.base/float128.exp, we run into: > ... > FAIL: gdb.base/float128.exp: print large128 (GDB may be missing MPFR support!) > ... > > Fix this by detecting that gdb was build without mpfr using the show > configuration command, and changing the FAIL into UNSUPPORTED. > > Tested on x86_64-linux. > > Any comments? Would it be more convenient to turn this into a reusable check across all tests? Something like "supports_128_floats"? Then again, if only this particular test will use it, it may not be worth it. > > Thanks, > - Tom > > [gdb/testsuite] Fix gdb.base/float128.exp with --with-mpfr=no > > gdb/testsuite/ChangeLog: > > 2020-12-10 Tom de Vries > > PR testsuite/26954 > * gdb.base/float128.exp: Detect and handle no mprf support. > > --- > gdb/testsuite/gdb.base/float128.exp | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp > index 40babcadc1..66f4d89c12 100644 > --- a/gdb/testsuite/gdb.base/float128.exp > +++ b/gdb/testsuite/gdb.base/float128.exp > @@ -78,13 +78,34 @@ gdb_test "print f128" ".* = 20\\.375.*" "the value of f128 is changed to 20.375" > # 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 mpfr_supported -1 > +gdb_test_multiple "show configuration" "" { > + -wrap -re "--with-mpfr\r\n.*" { > + set mpfr_supported 1 > + } > + -wrap -re "--without-mpfr\r\n.*" { > + set mpfr_supported 0 > + } > +} > + > 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!)" > + if { $mpfr_supported == 0 } { > + if { [istarget "s390*-*-*"] || [istarget "powerpc*-*-*"] } { > + # Some of these archs have native 128-bit float support, in > + # which case this should be passing, even without MPFR support. > + fail $test > + } else { > + unsupported "$test (Missing MPFR support)" > + } > + } else { > + fail $test > + } > } > -re ".*$gdb_prompt $" { > fail "$test" >