public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix -prompt handling in gdb_test
Date: Mon, 23 May 2022 12:50:22 +0000 (GMT)	[thread overview]
Message-ID: <20220523125022.D6F9B382D53A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=01a62a6d5fa99cffe25d35721c16e9bc81ed7389

commit 01a62a6d5fa99cffe25d35721c16e9bc81ed7389
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon May 23 14:50:02 2022 +0200

    [gdb/testsuite] Fix -prompt handling in gdb_test
    
    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
    ...
    
    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"
    ...
    
    Fix this by actually appending to opts.
    
    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]
 
     set opts {}
-    lappend "-prompt $prompt"
+    lappend opts "-prompt" "$prompt"
     if {$lbl} {
 	lappend opts "-lbl"
     }


                 reply	other threads:[~2022-05-23 12:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523125022.D6F9B382D53A@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).