Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tankut Baris Aktemur <tankutbaris.aktemur@amd.com>
To: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb, testsuite: fix gdb.multi/remove-inferiors.exp for remote targets
Date: Fri, 17 Jul 2026 07:46:48 -0500	[thread overview]
Message-ID: <20260717124648.858343-1-tankutbaris.aktemur@amd.com> (raw)
In-Reply-To: <20260416162303.2764834-1-tankut.baris.aktemur@intel.com>

Kindly pinging.

Baris

> From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
>
> When running gdb.multi/remove-inferiors.exp with the native-gdbserver
> board file, we see
> 
>   WARNING: Timed out waiting for EOF in server after monitor exit
> 
> Fix this by switching back to inferior 2 at the end of the test.
> 
> When running with native-extended-gdbserver, we see
> 
>   FAIL: gdb.multi/remove-inferiors.exp: runto: run to main
> 
> Fix this by setting remote exec-file before running to main.
> 
> After this patch, we see
> 
>   # of expected passes            10
> 
> for all three of default, native-gdbserver, native-extended-gdbserver
> board files.
> 
> ---
>  gdb/testsuite/gdb.multi/remove-inferiors.exp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp
> index c991ea59193..75402e26974 100644
> --- a/gdb/testsuite/gdb.multi/remove-inferiors.exp
> +++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp
> @@ -21,7 +21,7 @@ if { [build_executable ${testfile}.exp ${binfile} "${srcfile}" {debug}] != 0 } {
>  
>  proc switch_to_inferior { num message } {
>      gdb_test "inferior ${num}" \
> -	     "\\\[Switching to inferior ${num} \\\[<null>\\\] \\\(<noexec>\\\)\\\]" \
> +	     "\\\[Switching to inferior ${num} .*" \
>  	     "${message}"
>  }
>  
> @@ -52,6 +52,8 @@ proc test_remove_inferiors { } {
>  	[multi_line "Reading symbols from ${binfile_re}\.\.\.(" \
>  	     "Expanding full symbols from ${binfile_re}\.\.\.)?" ] \
>  	"load binary"
> +    gdb_test_no_output "set remote exec-file ${binfile}" \
> +	"set remote exec-file"
>  
>      if {![runto_main]} {
>  	return
> @@ -65,6 +67,10 @@ proc test_remove_inferiors { } {
>      gdb_test "remove-inferiors 2" \
>  	     "warning: Can not remove active inferior 2." \
>  	     "can't remove active inferior"
> +
> +    # Back to inferior 2 for the target to be exited properly, in case
> +    # it is remote.
> +    switch_to_inferior 2 "back to second inferior"
>  }
>  
>  test_remove_inferiors
> -- 
> 2.34.1

      reply	other threads:[~2026-07-17 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 16:23 Tankut Baris Aktemur
2026-07-17 12:46 ` Tankut Baris Aktemur [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=20260717124648.858343-1-tankutbaris.aktemur@amd.com \
    --to=tankutbaris.aktemur@amd.com \
    --cc=gdb-patches@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