RE: [PATCH] gdb, testsuite: fix gdb.multi/remove-inferiors.exp for remote targets
"Aktemur, Baris" <[email protected]> Thu, 30 Jul 2026 16:56:07 +0000
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <DM4PR12MB6470246F9338032208A2BBCCF8C92@DM4PR12MB6470.namprd12.prod.outlook.com> |
AMD General Kindly pinging. Thanks. Baris > > From: Tankut Baris Aktemur <[email protected]> > > > > 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}] !=3D 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