From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>
Cc: Mark Wielaard <mark@klomp.org>
Subject: Re: [PATCH] Implement ${board}_{exec,spawn} for native-extended-gdbserver
Date: Wed, 04 Feb 2015 13:59:00 -0000 [thread overview]
Message-ID: <54D225AD.2050401@redhat.com> (raw)
In-Reply-To: <54D21931.8040806@redhat.com>
On 02/04/2015 02:05 PM, Pedro Alves wrote:
> On 02/04/2015 12:20 AM, Sergio Durigan Junior wrote:
>> -# By default, dejagnu makes the board remote unless the board name
>> -# matches localhost. Force it to be NOT remote.
>> -global board
>> -global board_info
>> -set board_info($board,isremote) 0
>
> I don't think we can/should remove this. That'll make
> "is_remote" checks all over the testsuite return true,
> and thus skip tests that weren't skipped before. E.g.,
> solib-display.exp.
I've confirmed this.
> I think we need to instead do here what ${board}_spawn
> is already doing. That is, remove any target variant
> specifications from $board, like:
>
> --- a/gdb/testsuite/boards/native-extended-gdbserver.exp
> +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp
> @@ -27,7 +27,9 @@ load_board_description "gdbserver-base"
> # matches localhost. Force it to be NOT remote.
> global board
> global board_info
> -set board_info($board,isremote) 0
> +# Remove any target variant specifications from the name.
> +set baseboard [lindex [split $board "/"] 0]
> +set board_info($baseboard,isremote) 0
>
> I'm testing that.
It works. I've pushed the patch below now, to unblock the builder.
More could/should be done though. A number of boards do "set_board_info isremote 0",
so should be failing in the same way. Sounds like it'd be good to have a
shared file all those boards would source, and we'd move
native-extended-gdbserver.exp's version there. (TBC, I'm not planning on
doing that myself.)
---
From 42d9e5288b6576b56f3f803901433b88ee863bc6 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Wed, 4 Feb 2015 14:53:24 +0100
Subject: [PATCH] Fix '--target_board=native-extended-gdbserver/-m32'
Running the testsuite with the native-extended-gdbserver.exp board and
passing a variant spec, like
make check RUNTESTFLAGS="--target_board=native-extended-gdbserver/-m32"
results in dejagnu trying to open a rsh connection to
"native-extended-gdbserver", which of course is wrong. The point of
this board is running things locally.
The issue is that the native-extended-gdbserver board does not clear
the "isremote" flag properly.
Reported by Sergio at:
https://sourceware.org/ml/gdb-patches/2015-02/msg00067.html
testsuite/
2015-02-04 Pedro Alves <palves@redhat.com>
* boards/native-extended-gdbserver.exp: Remove any target variant
specifications from the board name before clearing the isremote
flag from board_info.
---
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/boards/native-extended-gdbserver.exp | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2657987..fcc16cb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-04 Pedro Alves <palves@redhat.com>
+
+ * boards/native-extended-gdbserver.exp: Remove any target variant
+ specifications from the board name before clearing the isremote
+ flag from board_info.
+
2015-01-31 Doug Evans <xdje42@gmail.com>
* gdb.base/maint.exp <maint print type argc>: Update expected output.
diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp
index 57503db..8d299ef 100644
--- a/gdb/testsuite/boards/native-extended-gdbserver.exp
+++ b/gdb/testsuite/boards/native-extended-gdbserver.exp
@@ -27,7 +27,9 @@ load_board_description "gdbserver-base"
# matches localhost. Force it to be NOT remote.
global board
global board_info
-set board_info($board,isremote) 0
+# Remove any target variant specifications from the name.
+set baseboard [lindex [split $board "/"] 0]
+set board_info($baseboard,isremote) 0
set_board_info sockethost "localhost:"
--
1.9.3
next prev parent reply other threads:[~2015-02-04 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 23:21 Sergio Durigan Junior
2015-02-04 13:06 ` Pedro Alves
2015-02-04 13:59 ` Pedro Alves [this message]
2015-02-06 8:45 ` Doug Evans
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=54D225AD.2050401@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark@klomp.org \
--cc=sergiodj@redhat.com \
/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