* [PATCH v2] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
@ 2026-04-20 8:07 Tankut Baris Aktemur
2026-04-28 14:46 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: Tankut Baris Aktemur @ 2026-04-20 8:07 UTC (permalink / raw)
To: gdb-patches
This revision addresses Guinevere's review comment and does not skip
the test when the target is extended-remote.
Regards,
Baris
====
When executed with the native-extended-gdbserver board file, we get
FAIL: gdb.base/save-history.exp: check history contents
This is because the history file contains an extra line for the
command 'target extended-remote ...'. Address this in the test.
---
gdb/testsuite/gdb.base/save-history.exp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gdb/testsuite/gdb.base/save-history.exp b/gdb/testsuite/gdb.base/save-history.exp
index bb7a56b2a72..afdd5f696a0 100644
--- a/gdb/testsuite/gdb.base/save-history.exp
+++ b/gdb/testsuite/gdb.base/save-history.exp
@@ -30,6 +30,13 @@ gdb_test_no_output "save history $filename" \
set expected "set height 0\n"
append expected "set width 0\n"
+
+# There is an additional target connection command with the
+# extended-remote board file.
+if {[target_info gdb_protocol] == "extended-remote"} {
+ append expected "target extended-remote $gdbserver_gdbport\n"
+}
+
append expected "print 23\n"
append expected "save history $filename\n"
--
2.34.1
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
2026-04-20 8:07 [PATCH v2] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver Tankut Baris Aktemur
@ 2026-04-28 14:46 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2026-04-28 14:46 UTC (permalink / raw)
To: Tankut Baris Aktemur; +Cc: gdb-patches
>>>>> Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> writes:
> This revision addresses Guinevere's review comment and does not skip
> the test when the target is extended-remote.
This is ok.
Approved-By: Tom Tromey <tom@tromey.com>
> set expected "set height 0\n"
> append expected "set width 0\n"
> +
> +# There is an additional target connection command with the
> +# extended-remote board file.
> +if {[target_info gdb_protocol] == "extended-remote"} {
> + append expected "target extended-remote $gdbserver_gdbport\n"
> +}
No need to spend more time on this, but it seems like there could be
other target boards that add other commands, or we may conceivably add
commands to the test suite prologue, and what would really be nice is
something a bit more robust. But OTOH it seems like a lot of work for
something pretty marginal.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-28 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-20 8:07 [PATCH v2] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver Tankut Baris Aktemur
2026-04-28 14:46 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox