public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix have_mpx with remote-gdbserver-on-localhost
Date: Fri,  7 Oct 2022 14:17:50 +0000 (GMT)	[thread overview]
Message-ID: <20221007141750.7003A3858D3C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=43792b0de4e1f9cbd7f38c00f7150df66b8bddea

commit 43792b0de4e1f9cbd7f38c00f7150df66b8bddea
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Oct 7 16:17:35 2022 +0200

    [gdb/testsuite] Fix have_mpx with remote-gdbserver-on-localhost
    
    With target board remote-gdbserver-on-localhost and gdb.arch/i386-mpx-call.exp
    I run into:
    ...
    FAIL: gdb.arch/i386-mpx-call.exp: upper_bnd0: continue to a bnd violation
    ...
    
    This is due to the have_mpx test which should return 0, but instead returns 1
    because the captured output:
    ...
    No MPX support
    No MPX support
    ...
    does not match the used regexp:
    ...
        set status [expr ($status == 0) \
                       && ![regexp "^No MPX support\r\n" $output]]
    ...
    which does match the captured output with native:
    ...
    No MPX support^M
    No MPX support^M
    ...
    
    Fix this by making the \r in the regexp optional.
    
    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 == 0) \
-		    && ![regexp "^No MPX support\r\n" $output]]
+		    && ![regexp "^No MPX support\r?\n" $output]]
 
     remote_file build delete $obj

                 reply	other threads:[~2022-10-07 14:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221007141750.7003A3858D3C@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).