mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
[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.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user