From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 1E8723835688; Thu, 16 Jun 2022 13:11:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E8723835688 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix have_mpx test X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 633de7089179f455d94d0fef54c68c298f545242 X-Git-Newrev: f0d49de4be0ba22457f19c96ec2cfa787da5b507 Message-Id: <20220616131130.1E8723835688@sourceware.org> Date: Thu, 16 Jun 2022 13:11:30 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2022 13:11:30 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df0d49de4be0b= a22457f19c96ec2cfa787da5b507 commit f0d49de4be0ba22457f19c96ec2cfa787da5b507 Author: Tom de Vries Date: Thu Jun 16 15:11:26 2022 +0200 [gdb/testsuite] Fix have_mpx test =20 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. =20 The problem is that have_mpx is supposed to return 0, but it doesn't be= cause 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"]] ... =20 Fix this by matching using a regexp instead. =20 Tested on x86_64-linux. Diff: --- 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 =3D=3D 0) \ - && ![string equal $output "No MPX support\r\n"]] + && ![regexp "^No MPX support\r\n" $output]] =20 remote_file build delete $obj