From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [committed][gdb/testsuite] Split up multi-exec test-cases
Date: Fri, 15 May 2020 16:27:57 +0200 [thread overview]
Message-ID: <09500827-599d-4ef6-eea0-3f74118b530e@suse.de> (raw)
In-Reply-To: <456ce125-df9d-6ca7-d08d-9dae83aaed10@redhat.com>
On 14-05-2020 19:04, Pedro Alves wrote:
> On 5/14/20 4:25 PM, Tom de Vries wrote:
>> (gdb) spawn gdbserver --once localhost:2592 outputs/gdb.base/align/align^M
>> Process outputs/gdb.base/align/align created; pid = 6946^M
>> Listening on port 2592^M
>> target remote localhost:2592^M
>> Remote debugging using localhost:2592^M
>> warning: Mismatch between current exec-file outputs/gdb.base/align/c/align^M
>> and automatically determined exec-file outputs/gdb.base/align/align^M
>> exec-file-mismatch handling is currently "ask"^M
>> Load new symbol table from "outputs/gdb.base/align/align"? (y or n) Quit^M
>> (gdb) ERROR: test suppressed
>> ...
>
> No objection to the splitting, but the issue above should really be
> fixed.
> It's a systematic issue, and requiring a file split to address it
> seems like a heavy burden to me.
Agreed, not all locations where we run into this problem can be
fixed/worked-around like that, I just saw an opportunity to trivially
reduce test-case complexity with substantial failcount reduction payoff.
> Maybe we should disable exec-file-mismatch
> detection from within gdb_target_cmd? At least, until we have buildid detection.
> But that won't work on all hosts, either. Like, this fixes align.exp for me:
>
> diff --git c/gdb/testsuite/lib/gdbserver-support.exp w/gdb/testsuite/lib/gdbserver-support.exp
> index a2cc80f28d7..fc79f1d60c6 100644
> --- c/gdb/testsuite/lib/gdbserver-support.exp
> +++ w/gdb/testsuite/lib/gdbserver-support.exp
> @@ -52,7 +52,7 @@ proc gdb_target_cmd_ext { targetname serialport {additional_text ""} } {
>
> set serialport_re [string_to_regexp $serialport]
> for {set i 1} {$i <= 3} {incr i} {
> - send_gdb "target $targetname $serialport\n"
> + send_gdb "with exec-file-mismatch off -- target $targetname $serialport\n"
> gdb_expect 60 {
> -re "A program is being debugged already.*ill it.*y or n. $" {
> send_gdb "y\n"
>
That's neat, I tried myself this:
...
diff --git a/gdb/testsuite/lib/gdbserver-support.exp
b/gdb/testsuite/lib/gdbserver-support.exp
index a2cc80f28d..66c9bf8549 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -58,6 +58,11 @@ proc gdb_target_cmd_ext { targetname serialport
{additional_text ""} } {
send_gdb "y\n"
exp_continue
}
+ -re "Load new symbol table from \[^\r\n\]*\\? \\(y or n\\) $" {
+ send_gdb "y\n"
+ gdb_test "" ""
+ return 0
+ }
-re "unknown host.*$gdb_prompt" {
verbose "Couldn't look up $serialport"
}
...
but I think your solution is better.
Thanks,
- Tom
next prev parent reply other threads:[~2020-05-15 14:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 15:25 Tom de Vries
2020-05-14 15:32 ` Tom Tromey
2020-05-14 16:28 ` Tom de Vries
2020-05-14 17:14 ` Pedro Alves
2020-05-15 12:51 ` [committed][gdb/testsuite] Rename *.exp.in to *.exp.tcl Tom de Vries
2020-05-14 17:04 ` [committed][gdb/testsuite] Split up multi-exec test-cases Pedro Alves
2020-05-15 14:27 ` Tom de Vries [this message]
2020-05-18 14:13 ` Pedro Alves
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=09500827-599d-4ef6-eea0-3f74118b530e@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=palves@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