From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 436AB38582BB; Mon, 15 Jan 2024 19:09:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 436AB38582BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705345744; bh=EhdXcrddqFHedPBTUIXK4FQWtYXQseir1lFiyMx05Uw=; h=From:To:Subject:Date:From; b=Broc7KnyO2LRYPzz5Zvjkb9TQlW2EGdtKYOt74RLUXAM1P34c0ecXLBDVvF+u89sA 8ATROsOUElRX4OfbCHEKDnHmIFYxH0QD52gAHrfJBlEOJC1PN3yrT2eqfmyOeZ4DTF qjD0WdtOc9TNCYPLbB45BkumpptIlj3Am9TrQXQ0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove spurious $ in save_vars X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: a73afeff18db7304495bf7c42b25f3b93645b46f X-Git-Newrev: aae436c54a514d43ae66389f2ddbfed16ffdb725 Message-Id: <20240115190904.436AB38582BB@sourceware.org> Date: Mon, 15 Jan 2024 19:09:04 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Daae436c54a51= 4d43ae66389f2ddbfed16ffdb725 commit aae436c54a514d43ae66389f2ddbfed16ffdb725 Author: Simon Marchi Date: Mon Jan 15 16:23:42 2024 +0000 gdb/testsuite: remove spurious $ in save_vars =20 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: =20 continue^M Continuing.^M /home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/deb= 12-amd64/target_board/native-extended-gdbserver/src/binutils-gdb/gdb/remot = e.c:6922: internal-error: resume: Assertion `scope_ptid =3D=3D infer= ior_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 inter= nal error) =20 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: =20 save_vars { $::GDBFLAGS } { =20 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. =20 Change-Id: I5ad32c527795fd10d0d94020e4fd15cebaca3a77 Diff: --- 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/testsui= te/gdb.multi/attach-while-running.exp index c0201418de6..eade8b42a18 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}] } { } =20 proc do_test {} { - save_vars { $::GDBFLAGS } { + save_vars { ::GDBFLAGS } { append ::GDBFLAGS " -ex \"maint set target-non-stop on\"" clean_restart $::binfile }