From: Josip Seketa <josip.seketa@gmail.com>
To: gdb-patches@sourceware.org
Cc: Tom de Vries <tdevries@suse.de>
Subject: [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp
Date: Sun, 08 Nov 2026 18:59:30 +0000 [thread overview]
Message-ID: <179416437016.1563346.4393252796548961752@gmail.com> (raw)
With the native-extended-gdbserver board, remove-inferiors.exp fails:
(gdb) run
Starting program: .../remove-inferiors
Running the default executable on the remote target failed; try "set remote exec-file"?
FAIL: gdb.multi/remove-inferiors.exp: runto: run to main
"set remote exec-file" is per inferior. The board sets it for
inferior 1, but the test removes inferior 1 and runs the program in
inferior 2, where it loads the binary with a plain "file", so the
remote side has nothing to run.
Load the binary with gdb_load instead, so that the board sets the
inferior up.
---
Tested on x86_64 GNU/Linux: native-extended-gdbserver 5 PASS 1 FAIL ->
7 PASS, also with "maint set target-non-stop on"; native-gdbserver and
unix 8 PASS -> 7 PASS (the "load binary" test is gone).
I have no FSF copyright assignment. This is my own work, not my
employer's.
gdb/testsuite/gdb.multi/remove-inferiors.exp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp
index ae2ecdffb83..2514ec392d8 100644
--- a/gdb/testsuite/gdb.multi/remove-inferiors.exp
+++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp
@@ -46,12 +46,12 @@ proc test_remove_inferiors { } {
# Test that it is possible to remove a non-active non-current inferior.
gdb_test_no_output "remove-inferiors 1" "remove non-current inferior"
- # Load binfile and start the inferior.
- set binfile_re [string_to_regexp ${binfile}]
- gdb_test "file ${binfile}" \
- [multi_line "Reading symbols from ${binfile_re}\.\.\.(" \
- "Expanding full symbols from ${binfile_re}\.\.\.)?" ] \
- "load binary"
+ # Load binfile and start the inferior. Use gdb_load, so that the
+ # board sets this inferior up too: the remote exec-file is per
+ # inferior.
+ if {[gdb_load ${binfile}] != 0} {
+ return
+ }
if {![runto_main]} {
return
--
2.56.0
next reply other threads:[~2026-11-08 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 18:59 Josip Seketa [this message]
2026-11-23 16:05 ` Rohr, Stephan
2026-11-23 19:25 ` Josip Seketa
2026-11-23 19:26 ` [PATCH v2] " Josip Seketa
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=179416437016.1563346.4393252796548961752@gmail.com \
--to=josip.seketa@gmail.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