From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 38FA438387ED for ; Mon, 23 May 2022 12:01:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38FA438387ED Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2AC0A21A70; Mon, 23 May 2022 12:01:15 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0C96F139F5; Mon, 23 May 2022 12:01:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DWXMAYt3i2KlLgAAMHmgww (envelope-from ); Mon, 23 May 2022 12:01:15 +0000 Message-ID: Date: Mon, 23 May 2022 14:01:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [pushed] Support -prompt and -lbl in gdb_test (Re: [PATCH 5/5] Make gdb_test's question non-optional if specified) Content-Language: en-US From: Tom de Vries To: Pedro Alves , Tom Tromey Cc: gdb-patches@sourceware.org References: <20220330192929.3161015-1-pedro@palves.net> <20220330192929.3161015-6-pedro@palves.net> <87o7zxeaa6.fsf@tromey.com> <87sfp7kc78.fsf@tromey.com> <8def622c-5396-d1e1-dfbb-a5732dd8183a@palves.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 12:01:18 -0000 On 5/23/22 12:48, Tom de Vries wrote: > On 5/18/22 13:01, Pedro Alves wrote: >> diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp >> b/gdb/testsuite/gdb.base/ui-redirect.exp >> index 13bc964f46c..4ed82ae63bf 100644 >> --- a/gdb/testsuite/gdb.base/ui-redirect.exp >> +++ b/gdb/testsuite/gdb.base/ui-redirect.exp >> @@ -117,12 +117,10 @@ with_test_prefix "debugging" { >>       gdb_test "set logging enabled on" \ >>       "Copying output to /dev/null.*Copying debug output to /dev/null\\." >> -    set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: >> exit\r\n$" >> -    gdb_test_multiple "continue" "continue" -prompt $prompt { >> -    -re "Continuing.*\\\[infrun\\\] .*\\\[infrun\\\] .*Breakpoint >> \[0-9\]+, foo.*$prompt$" { >> -        pass $gdb_test_name >> -    } >> -    } >> +    gdb_test \ >> +    -prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: >> exit\r\n$" \ >> +    "continue" \ >> +    "Continuing.*\\\[infrun\\\] .*\\\[infrun\\\] .*Breakpoint >> \[0-9\]+, foo.*" >>       gdb_test "set debug infrun 0" >>       gdb_test "set logging enabled off" "Done logging to /dev/null\\." > > I'm running 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 > ... > > I'm assuming it's related to this change. That's confirmed, reproduces reliably with read1, and is fixed by reverting the patch. Looks like this in gdb_test: ... lappend "-prompt $prompt" ... has no effect. This fixes it: ... 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" } ... Thanks, - Tom