gdb/gdb-testsuite-fix-have_mpx-test.patch
Tom de Vries 3608b5ef76 - Maintenance script qa-remote.sh:
* Make rpm matching yet more precise.
- Update patch:
  * gdb-tdep-fix-powerpc-ieee-128-bit-format-arg-passing.patch
- Add patches:
  * gdb-handle-pending-c-after-rl_callback_read_char.patch
  * gdb-testsuite-fix-have_mpx-test.patch
  * gdb-symtab-fix-handling-of-dw_tag_unspecified_type.patch
  * gdb-testsuite-fix-gdb.dwarf2-dw2-unspecified-type-foo.c-with-m32.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=333
2022-09-27 11:02:05 +00:00

42 lines
1.1 KiB
Diff

[gdb/testsuite] Fix have_mpx test
When testing on openSUSE Leap 15.4 I ran into this FAIL:
...
FAIL: gdb.arch/i386-mpx-map.exp: NULL address of the pointer
...
and likewise for all the other mpx tests.
The problem is that have_mpx is supposed to return 0, but it doesn't because
it tries to match this output:
...
builtin_spawn -ignore SIGHUP temp/20294/have_mpx-2-20294.x^M
No MPX support^M
No MPX support^M
...
using:
...
&& ![string equal $output "No MPX support\r\n"]]
...
Fix this by matching using a regexp instead.
Tested on x86_64-linux.
---
gdb/testsuite/lib/gdb.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3bfd59109bc..25c1572a53a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -8364,7 +8364,7 @@ gdb_caching_proc have_mpx {
set status [lindex $result 0]
set output [lindex $result 1]
set status [expr ($status == 0) \
- && ![string equal $output "No MPX support\r\n"]]
+ && ![regexp "^No MPX support\r\n" $output]]
remote_file build delete $obj