public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] gdb/testsuite: remove spurious $ in save_vars
@ 2024-01-15 19:09 Simon Marchi
  2024-01-15 19:14 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2024-01-15 19:09 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

I noticed that running the whole testsuite in serial mode (which means
all the .exp files are ran in the same TCL environment, one after the
other) with the native-extended-gdbserver board caused some weird
failures, for instance a lot of internal errors in the reverse tests,
like:

    continue^M
    Continuing.^M
    /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/deb12-amd64/target_board/native-extended-gdbserver/src/binutils-gdb/gdb/remot        e.c:6922: internal-error: resume: Assertion `scope_ptid == inferior_ptid' failed.^M
    A problem internal to GDB has been detected,^M
    further debugging may prove unreliable.^M
    ----- Backtrace -----^M
    FAIL: gdb.reverse/break-precsave.exp: run to end of main (GDB internal error)

This only happens after running gdb.multi/attach-while-running.exp.
That test does not restore GDBFLAGS properly when it's done, it leaves
`-ex \"maint set target-non-stop on\""` in there, which breaks some
subsequent tests.  The problem is that this line:

    save_vars { $::GDBFLAGS } {

should not use a `$` before the variable name.  Passes the content of
`::GDBFLAGS` to save_vars, which is not what we want.  We want to pass
the `::GDBFLAGS` string.  Fix that.

Change-Id: I5ad32c527795fd10d0d94020e4fd15cebaca3a77
---
 gdb/testsuite/gdb.multi/attach-while-running.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.multi/attach-while-running.exp b/gdb/testsuite/gdb.multi/attach-while-running.exp
index c0201418de65..eade8b42a18e 100644
--- a/gdb/testsuite/gdb.multi/attach-while-running.exp
+++ b/gdb/testsuite/gdb.multi/attach-while-running.exp
@@ -43,7 +43,7 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 proc do_test {} {
-    save_vars { $::GDBFLAGS } {
+    save_vars { ::GDBFLAGS } {
 	append ::GDBFLAGS " -ex \"maint set target-non-stop on\""
 	clean_restart $::binfile
     }

base-commit: a73afeff18db7304495bf7c42b25f3b93645b46f
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pushed] gdb/testsuite: remove spurious $ in save_vars
  2024-01-15 19:09 [pushed] gdb/testsuite: remove spurious $ in save_vars Simon Marchi
@ 2024-01-15 19:14 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2024-01-15 19:14 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 1/15/24 14:09, Simon Marchi wrote:
> I noticed that running the whole testsuite in serial mode (which means
> all the .exp files are ran in the same TCL environment, one after the
> other) with the native-extended-gdbserver board caused some weird
> failures, for instance a lot of internal errors in the reverse tests,
> like:
> 
>     continue^M
>     Continuing.^M
>     /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/deb12-amd64/target_board/native-extended-gdbserver/src/binutils-gdb/gdb/remot        e.c:6922: internal-error: resume: Assertion `scope_ptid == inferior_ptid' failed.^M
>     A problem internal to GDB has been detected,^M
>     further debugging may prove unreliable.^M
>     ----- Backtrace -----^M
>     FAIL: gdb.reverse/break-precsave.exp: run to end of main (GDB internal error)

Since hitting an internal error is always a GDB bug, I filed this bug
here (although I don't plan to work on it).

https://sourceware.org/bugzilla/show_bug.cgi?id=31246

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-15 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 19:09 [pushed] gdb/testsuite: remove spurious $ in save_vars Simon Marchi
2024-01-15 19:14 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).