* [committed][gdb/testsuite] Fix have_mpx test
@ 2022-06-16 13:11 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-06-16 13:11 UTC (permalink / raw)
To: gdb-patches
Hi,
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.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix have_mpx test
---
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 75efc4a62d1..4bc5f4f144c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -8479,7 +8479,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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-16 13:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 13:11 [committed][gdb/testsuite] Fix have_mpx test Tom de Vries
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).