From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Handle unreachable network in server-connect.exp
Date: Wed, 18 Sep 2019 23:16:00 -0000 [thread overview]
Message-ID: <26c1539c-8aef-0977-9706-652595620854@suse.de> (raw)
In-Reply-To: <871rwdthw0.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
On 18-09-19 23:27, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> So, I'm attaching an updated patch that does not modify the existing
> Tom> semantics of gdb_target_cmd.
>
> Tom> 2019-09-14 Tom de Vries <tdevries@suse.de>
>
> Tom> * lib/gdbserver-support.exp (gdb_target_cmd_ext): Return 2 (meaning
> Tom> UNSUPPORTED) for 'Network is unreachable' message. Factor out of ...
> Tom> (gdb_target_cmd): ... here.
> Tom> * gdb.server/server-connect.exp: Use gdb_target_cmd_ext, handle return
> Tom> value 2.
>
> Thanks you for doing this. This is ok.
I did not find any FAILs when testing this, but in fact there were errors.
Fixed with this commit.
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-testsuite-Fix-gdb_target_cmd.patch --]
[-- Type: text/x-patch, Size: 1238 bytes --]
gdb/testsuite/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp:
[gdb/testsuite] Fix gdb_target_cmd
In commit 81dc3ab594 "[gdb/testsuite] Handle unreachable network in
server-connect.exp" a regression was introduced in gdb_target_cmd, causing
ERRORs like this:
...
ERROR: tcl error sourcing src/gdb/testsuite/gdb.server/abspath.exp.
ERROR: wrong # args: should be "gdb_target_cmd {$args}"
while executing
"gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport"
...
Fix the argument passing in gdb_target_cmd.
---
gdb/testsuite/lib/gdbserver-support.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 2ad53c1f60..00f46c8264 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -112,8 +112,8 @@ proc gdb_target_cmd_ext { targetname serialport {additional_text ""} } {
# Like gdb_target_cmd_ext, but returns 0 on success, 1 on failure.
-proc gdb_target_cmd { $args } {
- set res [gdb_target_cmd_ext $args]
+proc gdb_target_cmd { args } {
+ set res [eval gdb_target_cmd_ext $args]
return [expr $res == 0 ? 0 : 1]
}
prev parent reply other threads:[~2019-09-18 23:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-14 10:23 Tom de Vries
2019-09-17 15:40 ` Sergio Durigan Junior
2019-09-17 18:01 ` Tom Tromey
2019-09-18 11:56 ` Tom de Vries
[not found] ` <871rwdthw0.fsf@tromey.com>
2019-09-18 23:16 ` Tom de Vries [this message]
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=26c1539c-8aef-0977-9706-652595620854@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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