* [PATCH] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
@ 2026-04-17 10:35 Tankut Baris Aktemur
2026-04-17 12:54 ` Guinevere Larsen
0 siblings, 1 reply; 3+ messages in thread
From: Tankut Baris Aktemur @ 2026-04-17 10:35 UTC (permalink / raw)
To: gdb-patches
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 ...'. To keep the test
straightforward, skip it if using the extended-remote target.
---
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..5ca47f3bc1f 100644
--- a/gdb/testsuite/gdb.base/save-history.exp
+++ b/gdb/testsuite/gdb.base/save-history.exp
@@ -19,6 +19,13 @@
require {!is_remote host}
+# A remote server adds extra setup commands in history. To keep the
+# test straighforward, skip extended-remote target.
+if {[target_info gdb_protocol] == "extended-remote"} {
+ unsupported "test not aimed for extended-remote target"
+ return
+}
+
gdb_start
# Get something in history.
--
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] 3+ messages in thread* Re: [PATCH] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
2026-04-17 10:35 [PATCH] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver Tankut Baris Aktemur
@ 2026-04-17 12:54 ` Guinevere Larsen
2026-04-17 13:33 ` Aktemur, Tankut Baris
0 siblings, 1 reply; 3+ messages in thread
From: Guinevere Larsen @ 2026-04-17 12:54 UTC (permalink / raw)
To: Tankut Baris Aktemur, gdb-patches
On 4/17/26 7:35 AM, Tankut Baris Aktemur wrote:
> 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 ...'. To keep the test
> straightforward, skip it if using the extended-remote target.
> ---
> 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..5ca47f3bc1f 100644
> --- a/gdb/testsuite/gdb.base/save-history.exp
> +++ b/gdb/testsuite/gdb.base/save-history.exp
> @@ -19,6 +19,13 @@
>
> require {!is_remote host}
>
> +# A remote server adds extra setup commands in history. To keep the
> +# test straighforward, skip extended-remote target.
> +if {[target_info gdb_protocol] == "extended-remote"} {
> + unsupported "test not aimed for extended-remote target"
> + return
> +}
> +
> gdb_start
>
> # Get something in history.
I feel like the test would be equally straight forward to make the
following change instead (comment omitted because I was lazy in local
testing):
--- a/gdb/testsuite/gdb.base/save-history.exp
+++ b/gdb/testsuite/gdb.base/save-history.exp
@@ -30,6 +30,9 @@ gdb_test_no_output "save history $filename" \
set expected "set height 0\n"
append expected "set width 0\n"
+if {[target_info gdb_protocol] == "extended-remote"} {
+ append expected "target extended-remote localhost:2345\n"
+}
append expected "print 23\n"
append expected "save history $filename\n"
--
Cheers,
Guinevere Larsen
It/she
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [PATCH] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver
2026-04-17 12:54 ` Guinevere Larsen
@ 2026-04-17 13:33 ` Aktemur, Tankut Baris
0 siblings, 0 replies; 3+ messages in thread
From: Aktemur, Tankut Baris @ 2026-04-17 13:33 UTC (permalink / raw)
To: Guinevere Larsen, gdb-patches
On Friday, April 17, 2026 2:54 PM, Guinevere Larsen wrote:
> On 4/17/26 7:35 AM, Tankut Baris Aktemur wrote:
> > 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 ...'. To keep the test
> > straightforward, skip it if using the extended-remote target.
> > ---
> > 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..5ca47f3bc1f 100644
> > --- a/gdb/testsuite/gdb.base/save-history.exp
> > +++ b/gdb/testsuite/gdb.base/save-history.exp
> > @@ -19,6 +19,13 @@
> >
> > require {!is_remote host}
> >
> > +# A remote server adds extra setup commands in history. To keep the
> > +# test straighforward, skip extended-remote target.
> > +if {[target_info gdb_protocol] == "extended-remote"} {
> > + unsupported "test not aimed for extended-remote target"
> > + return
> > +}
> > +
> > gdb_start
> >
> > # Get something in history.
>
> I feel like the test would be equally straight forward to make the
> following change instead (comment omitted because I was lazy in local
> testing):
>
> --- a/gdb/testsuite/gdb.base/save-history.exp
> +++ b/gdb/testsuite/gdb.base/save-history.exp
> @@ -30,6 +30,9 @@ gdb_test_no_output "save history $filename" \
>
> set expected "set height 0\n"
> append expected "set width 0\n"
> +if {[target_info gdb_protocol] == "extended-remote"} {
> + append expected "target extended-remote localhost:2345\n"
We cannot hardcode the port number but it should be possible to use
$gdbserver_gdbport. I'll run a parallel make-check to test.
-Baris
> +}
> append expected "print 23\n"
> append expected "save history $filename\n"
>
> --
> Cheers,
> Guinevere Larsen
> It/she
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] 3+ messages in thread
end of thread, other threads:[~2026-04-17 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17 10:35 [PATCH] gdb, testsuite: fix gdb.base/save-history.exp for native-extended-gdbserver Tankut Baris Aktemur
2026-04-17 12:54 ` Guinevere Larsen
2026-04-17 13:33 ` Aktemur, Tankut Baris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox