* [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp
@ 2026-11-08 18:59 Josip Seketa
2026-11-23 16:05 ` Rohr, Stephan
0 siblings, 1 reply; 4+ messages in thread
From: Josip Seketa @ 2026-11-08 18:59 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom de Vries
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
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp
2026-11-08 18:59 [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp Josip Seketa
@ 2026-11-23 16:05 ` Rohr, Stephan
2026-11-23 19:25 ` Josip Seketa
2026-11-23 19:26 ` [PATCH v2] " Josip Seketa
0 siblings, 2 replies; 4+ messages in thread
From: Rohr, Stephan @ 2026-11-23 16:05 UTC (permalink / raw)
To: Josip Seketa, gdb-patches; +Cc: Tom de Vries
Hi Josip,
thanks for fixing this, I stumbled over this recently, too.
I have a small nit, see below.
Thanks
Stephan
Reviewed-By: Rohr, Stephan <stephan.rohr@intel.com>
> -----Original Message-----
> From: Josip Seketa <josip.seketa@gmail.com>
> Sent: Sunday, 8 November 2026 20:00
> 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
>
> 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
nit: I think the "," is not needed.
> + # 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
________________________________________
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 (89) 99143-0
www.intel.de
Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman
Chairperson of the Supervisory Board: Sonja Pierer
Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp
2026-11-23 16:05 ` Rohr, Stephan
@ 2026-11-23 19:25 ` Josip Seketa
2026-11-23 19:26 ` [PATCH v2] " Josip Seketa
1 sibling, 0 replies; 4+ messages in thread
From: Josip Seketa @ 2026-11-23 19:25 UTC (permalink / raw)
To: gdb-patches; +Cc: Stephan Rohr, Tom de Vries
Hi Stephan,
Thanks for the review. You are right: without the comma, the comment
states the intention better. v2 with the comma removed and your
Reviewed-By follows in this thread.
Josip
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] gdb/testsuite: set up the new inferior in remove-inferiors.exp
2026-11-23 16:05 ` Rohr, Stephan
2026-11-23 19:25 ` Josip Seketa
@ 2026-11-23 19:26 ` Josip Seketa
1 sibling, 0 replies; 4+ messages in thread
From: Josip Seketa @ 2026-11-23 19:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Stephan Rohr, Tom de Vries
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.
Reviewed-By: Stephan Rohr <stephan.rohr@intel.com>
---
Changes in v2: no comma before "so that" in the new comment (and in the
commit message), as Stephan suggested.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-23 19:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 18:59 [PATCH] gdb/testsuite: set up the new inferior in remove-inferiors.exp Josip Seketa
2026-11-23 16:05 ` Rohr, Stephan
2026-11-23 19:25 ` Josip Seketa
2026-11-23 19:26 ` [PATCH v2] " Josip Seketa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox