From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id D6F9B382D53A; Mon, 23 May 2022 12:50:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6F9B382D53A Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix -prompt handling in gdb_test X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 735dfe028c93f20026339f3eeeadacac82fe7963 X-Git-Newrev: 01a62a6d5fa99cffe25d35721c16e9bc81ed7389 Message-Id: <20220523125022.D6F9B382D53A@sourceware.org> Date: Mon, 23 May 2022 12:50:22 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 12:50:22 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D01a62a6d5fa9= 9cffe25d35721c16e9bc81ed7389 commit 01a62a6d5fa99cffe25d35721c16e9bc81ed7389 Author: Tom de Vries Date: Mon May 23 14:50:02 2022 +0200 [gdb/testsuite] Fix -prompt handling in gdb_test =20 With check-read1 I run into: ... [infrun] maybe_set_commit_resumed_all_targets: not requesting commit-resumed for target native, no resumed threads^M (gdb) FAIL: gdb.base/ui-redirect.exp: debugging: continue [infrun] fetch_inferior_event: exit^M ... =20 The problem is that proc gdb_test doesn't pass down the -prompt option = to proc gdb_test_multiple, due to a typo making this lappend without effect: ... set opts {} lappend "-prompt $prompt" ... =20 Fix this by actually appending to opts. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 720418beac2..a6780d8d634 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1393,7 +1393,7 @@ proc gdb_test { args } { set user_code [join $user_code] =20 set opts {} - lappend "-prompt $prompt" + lappend opts "-prompt" "$prompt" if {$lbl} { lappend opts "-lbl" }