Indeed: ... $ ./gdb -configuration | grep -i mpfr --without-mpfr ... On another gdb where the test passes: ... $ ./gdb --configuration | grep mpfr --with-mpfr ... This shouldn't be FAIL, just unsupported or some such.
Tentative patch: ... diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp index 40babca..9508982 100644 --- a/gdb/testsuite/gdb.base/float128.exp +++ b/gdb/testsuite/gdb.base/float128.exp @@ -32,6 +32,16 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } { clean_restart ${binfile} +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 + } +} + if ![runto_main] then { perror "couldn't run to breakpoint" continue @@ -84,7 +94,11 @@ gdb_test_multiple "print large128" "$test" { pass "$test" } -re ".* = inf.*$gdb_prompt $" { - fail "$test (GDB may be missing MPFR support!)" + if { $mpfr_supported == 0 } { + unsupported "$test (Missing MPFR support)" + } else { + fail $test + } } -re ".*$gdb_prompt $" { fail "$test" ...
patch submitted: https://sourceware.org/pipermail/gdb-patches/2020-December/173972.html
The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9cd7a95a2bb9ba9d5a6af022e5454c8ce78aee56 commit 9cd7a95a2bb9ba9d5a6af022e5454c8ce78aee56 Author: Tom de Vries <tdevries@suse.de> Date: Fri Dec 11 13:55:04 2020 +0100 [gdb/testsuite] Fix gdb.base/float128.exp with --with-mpfr=no 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. gdb/testsuite/ChangeLog: 2020-12-11 Tom de Vries <tdevries@suse.de> PR testsuite/26954 * gdb.base/float128.exp: Detect and handle no mpfr support.
Patch fixing test-case committed, marking resolved-fixed.