From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] [gdb/testsuite] Use gdb_exit_cleanup a bit more
Date: Sun, 27 Sep 2026 09:52:16 +0100 [thread overview]
Message-ID: <87pkxz13gf.fsf@redhat.com> (raw)
In-Reply-To: <20260919084237.1045724-3-tdevries@suse.de>
Tom de Vries <tdevries@suse.de> writes:
> I ran into trouble running test-case gdb.base/quit-live.exp using a remote
> host configuration:
> - host board local-remote-host
> - target board remote-gdbserver-on-localhost.
>
> The problem is that the test-case makes gdb quit without updating
> gdb_spawn_id. Consequently, default_gdb_exit tries to exit gdb.
> It does so by sending quit to gdb and waiting for it to exit, which get us:
> ...
> ERROR: : spawn id exp9 not open
> ...
>
> Fix this using gdb_exit_cleanup. Likewise in gdb.threads/killed.exp.
> ---
> gdb/testsuite/gdb.base/quit-live.exp | 1 +
> gdb/testsuite/gdb.threads/killed.exp | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/gdb/testsuite/gdb.base/quit-live.exp b/gdb/testsuite/gdb.base/quit-live.exp
> index 14f87f9b7f8..8dae4fe2aca 100644
> --- a/gdb/testsuite/gdb.base/quit-live.exp
> +++ b/gdb/testsuite/gdb.base/quit-live.exp
> @@ -152,6 +152,7 @@ proc quit_with_live_inferior {appear_how extra_inferior quit_how} {
> gdb_test_multiple "" $test {
> eof {
> pass $test
> + gdb_exit_cleanup
There's another place in this test script which detects eof from GDB,
but you've not added the gdb_exit_cleanup call there.
Should we also be patching that location? If not why not? And if the
answer is there's a good reason why not, then I think it is worth
mentioning in the commit message, and as a comment at that location in
the code.
Thanks,
Andrew
next prev parent reply other threads:[~2026-09-27 8:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 8:42 [PATCH 0/3] [gdb/testsuite] Fix gdb.base/quit-live.exp for remote host Tom de Vries
2026-09-19 8:42 ` [PATCH 1/3] [gdb/testsuite] Add gdb_exit_cleanup Tom de Vries
2026-09-27 8:52 ` Andrew Burgess
2026-09-19 8:42 ` [PATCH 2/3] [gdb/testsuite] Use gdb_exit_cleanup a bit more Tom de Vries
2026-09-27 8:52 ` Andrew Burgess [this message]
2026-09-28 8:59 ` Tom de Vries
2026-09-19 8:42 ` [PATCH 3/3] [gdb/testsuite] Fix gdb.base/quit-live.exp for remote host Tom de Vries
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=87pkxz13gf.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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