public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: remove MPFR detection in gdb.base/float128.exp
@ 2022-12-22 15:13 Simon Marchi
  2022-12-23  9:14 ` tdevries
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-12-22 15:13 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Pinski, Simon Marchi

I see this fail since commit 991180627851 ("Use toplevel configure for
GMP and MPFR for gdb"):

    FAIL: gdb.base/float128.exp: show configuration

The test fails to find --with-mpfr or --without-mpfr in the "show
configuration" output.  Since MPFR has become mandatory, we can just
remove that check and simplify the test to assume MPFR support is there.

Change-Id: I4f3458470db0029705b390dfefed3a66dfc0633a
---
 gdb/testsuite/gdb.base/float128.exp | 37 +----------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp
index 21a1a99f6ee7..73835942ab0c 100644
--- a/gdb/testsuite/gdb.base/float128.exp
+++ b/gdb/testsuite/gdb.base/float128.exp
@@ -73,40 +73,5 @@ gdb_test_multiple "set var f128=20.375l" "$test" {
 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"
 
-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
-    }
-}
-
 # Test that we can correctly handle the largest IEEE-128 value
-# 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 $" {
-       if { $mpfr_supported == 0 } {
-	   # If the host platform has native 128-bit float support (as is
-	   # the case for some versions of s390 and powerpc), the
-	   # "print large128" test should be passing, even without MPFR
-	   # support.  So, in those cases we should have fail here rather than
-	   # unsupported.  However, given that we don't have a way to readily
-	   # test for this, we fall back to unsupported.
-	   unsupported "$test (Missing MPFR support)"
-       } else {
-           fail $test
-       }
-    }
-    -re ".*$gdb_prompt $" {
-	fail "$test"
-    }
-}
-
+gdb_test "print large128" ".* = 1\\.18973149535723176508575932662800702e\\+4932"

base-commit: a5ce326cfeb364a33d8ee9c806780347a92b5d18
-- 
2.38.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: remove MPFR detection in gdb.base/float128.exp
  2022-12-22 15:13 [PATCH] gdb/testsuite: remove MPFR detection in gdb.base/float128.exp Simon Marchi
@ 2022-12-23  9:14 ` tdevries
  2022-12-23 16:18   ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: tdevries @ 2022-12-23  9:14 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches, Andrew Pinski

On 2022-12-22 15:13, Simon Marchi via Gdb-patches wrote:
> I see this fail since commit 991180627851 ("Use toplevel configure for
> GMP and MPFR for gdb"):
> 
>     FAIL: gdb.base/float128.exp: show configuration
> 

I'm also seeing this.

> The test fails to find --with-mpfr or --without-mpfr in the "show
> configuration" output.  Since MPFR has become mandatory, we can just
> remove that check and simplify the test to assume MPFR support is 
> there.
> 

LGTM.

Thanks,
- Tom

> Change-Id: I4f3458470db0029705b390dfefed3a66dfc0633a
> ---
>  gdb/testsuite/gdb.base/float128.exp | 37 +----------------------------
>  1 file changed, 1 insertion(+), 36 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.base/float128.exp
> b/gdb/testsuite/gdb.base/float128.exp
> index 21a1a99f6ee7..73835942ab0c 100644
> --- a/gdb/testsuite/gdb.base/float128.exp
> +++ b/gdb/testsuite/gdb.base/float128.exp
> @@ -73,40 +73,5 @@ gdb_test_multiple "set var f128=20.375l" "$test" {
>  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"
> 
> -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
> -    }
> -}
> -
>  # Test that we can correctly handle the largest IEEE-128 value
> -# 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 $" {
> -       if { $mpfr_supported == 0 } {
> -	   # If the host platform has native 128-bit float support (as is
> -	   # the case for some versions of s390 and powerpc), the
> -	   # "print large128" test should be passing, even without MPFR
> -	   # support.  So, in those cases we should have fail here rather 
> than
> -	   # unsupported.  However, given that we don't have a way to readily
> -	   # test for this, we fall back to unsupported.
> -	   unsupported "$test (Missing MPFR support)"
> -       } else {
> -           fail $test
> -       }
> -    }
> -    -re ".*$gdb_prompt $" {
> -	fail "$test"
> -    }
> -}
> -
> +gdb_test "print large128" ".* =
> 1\\.18973149535723176508575932662800702e\\+4932"
> 
> base-commit: a5ce326cfeb364a33d8ee9c806780347a92b5d18

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: remove MPFR detection in gdb.base/float128.exp
  2022-12-23  9:14 ` tdevries
@ 2022-12-23 16:18   ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-12-23 16:18 UTC (permalink / raw)
  To: tdevries; +Cc: gdb-patches, Andrew Pinski



On 12/23/22 04:14, tdevries wrote:
> On 2022-12-22 15:13, Simon Marchi via Gdb-patches wrote:
>> I see this fail since commit 991180627851 ("Use toplevel configure for
>> GMP and MPFR for gdb"):
>>
>>     FAIL: gdb.base/float128.exp: show configuration
>>
> 
> I'm also seeing this.
> 
>> The test fails to find --with-mpfr or --without-mpfr in the "show
>> configuration" output.  Since MPFR has become mandatory, we can just
>> remove that check and simplify the test to assume MPFR support is there.
>>
> 
> LGTM.
> 
> Thanks,
> - Tom

Pushed, thanks.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-23 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 15:13 [PATCH] gdb/testsuite: remove MPFR detection in gdb.base/float128.exp Simon Marchi
2022-12-23  9:14 ` tdevries
2022-12-23 16:18   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).