From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 7003A3858D3C; Fri, 7 Oct 2022 14:17:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7003A3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665152270; bh=nvQlKC6+GFNfck+XQNojNf8JYpoEMvut2k5m44MFT58=; h=From:To:Subject:Date:From; b=xsOJw86lcWXbG9xFjQbYSNOeS9VKXHK6QzY1fJ0aRwmLVkBBrqPQUPCEqlZG+BPk2 NlptELF4h29BuY6SL2N9Dxkk18R0MCBMjJmpodS+DbNlDYbcfKAt62+sHXpfpdZmI9 kw0f7XRVca/gYTtdFU945681lw69KDwwXTIYf3ek= 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 with remote-gdbserver-on-localhost X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 7fe3f841453c46b367aec9a130c3b6e0a580effa X-Git-Newrev: 43792b0de4e1f9cbd7f38c00f7150df66b8bddea Message-Id: <20221007141750.7003A3858D3C@sourceware.org> Date: Fri, 7 Oct 2022 14:17:50 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D43792b0de4e1= f9cbd7f38c00f7150df66b8bddea commit 43792b0de4e1f9cbd7f38c00f7150df66b8bddea Author: Tom de Vries Date: Fri Oct 7 16:17:35 2022 +0200 [gdb/testsuite] Fix have_mpx with remote-gdbserver-on-localhost =20 With target board remote-gdbserver-on-localhost and gdb.arch/i386-mpx-c= all.exp I run into: ... FAIL: gdb.arch/i386-mpx-call.exp: upper_bnd0: continue to a bnd violati= on ... =20 This is due to the have_mpx test which should return 0, but instead ret= urns 1 because the captured output: ... No MPX support No MPX support ... does not match the used regexp: ... set status [expr ($status =3D=3D 0) \ && ![regexp "^No MPX support\r\n" $output]] ... which does match the captured output with native: ... No MPX support^M No MPX support^M ... =20 Fix this by making the \r in the regexp optional. =20 Tested on x86_64-linux, with native and target board remote-gdbserver-on-localhost. 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 d60dceffd3f..99a6de6f724 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -8636,7 +8636,7 @@ gdb_caching_proc have_mpx { set status [lindex $result 0] set output [lindex $result 1] set status [expr ($status =3D=3D 0) \ - && ![regexp "^No MPX support\r\n" $output]] + && ![regexp "^No MPX support\r?\n" $output]] =20 remote_file build delete $obj