From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WUI1Hv0q9F94NwAAWB0awg (envelope-from ) for ; Tue, 05 Jan 2021 04:01:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 672751F0AA; Tue, 5 Jan 2021 04:01:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 63E851E965 for ; Tue, 5 Jan 2021 04:01:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B73F385803C; Tue, 5 Jan 2021 09:01:47 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 83BEF385802B for ; Tue, 5 Jan 2021 09:01:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 83BEF385802B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A60FEAD11; Tue, 5 Jan 2021 09:01:44 +0000 (UTC) To: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org References: <20201216204737.900975-1-simon.marchi@efficios.com> <20201216204737.900975-3-simon.marchi@efficios.com> <3ad3b11f-8a72-cd1d-a138-59c47300f147@polymtl.ca> From: Tom de Vries Subject: Re: [PATCH v2 3/3] gdb: introduce scoped debug prints Message-ID: Date: Tue, 5 Jan 2021 10:01:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <3ad3b11f-8a72-cd1d-a138-59c47300f147@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 1/4/21 6:02 PM, Simon Marchi via Gdb-patches wrote: > >> With this patch, gdb.threads/stepi-random-signal.exp becomes flaky. I folded >> this little fixup in the patch: >> >> commit 49c94827cbbe802726f177bc61c6c9d830907ffa >> Author: Simon Marchi >> Date: Tue Dec 22 16:33:40 2020 -0500 >> >> fixup >> >> Change-Id: Ibd2f622df3e76c873fcf82bca7c4c7900654647e >> >> diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp >> index 9a8b38c2acf5..689de8fdc632 100644 >> --- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp >> +++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp >> @@ -86,12 +86,13 @@ if {$prev_addr == ""} { >> set seen 0 >> >> set test "stepi" >> -if {[gdb_test_multiple "stepi" "$test" { >> +set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" >> +if {[gdb_test_multiple "stepi" "$test" -prompt $prompt { >> -re {\[infrun\] handle_signal_stop: random signal} { >> set seen 1 >> exp_continue >> } >> - -re "$gdb_prompt $" { >> + -re "$prompt$" { >> } >> }] != 0} { >> return >> >> >> Simon >> > > > I pushed this series, including this fix. Hi Simon, starting this commit, I run into: ... 51 callme ();^M gdb_expect_list pattern: // [infrun] infrun_async: enable=0^M (gdb) [infrun] fetch_inferior_event: exit^M FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step (pattern 6 + sentinel) (timeout) ... which before the commit was: ... 51 callme ();^M gdb_expect_list pattern: // [infrun] infrun_async: enable=0^M (gdb) PASS: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step ... Using patch below, the test passes for me again. [ I first tried to override $gdb_prompt for the duration of gdb_test_sequence using save_vars, but there's the invariant that the gdb_prompt variable has an implicit " " after it, which gdb_test_sequence adds, so that didn't work. ] Thanks, - Tom diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb /testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp index fe842531977..2b3aec6562e 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp @@ -102,12 +102,15 @@ gdb_test "set scheduler-locking off" gdb_test "set debug infrun 1" set test "step" -gdb_test_sequence $test $test { +send_gdb "$test\n" +set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" +gdb_expect_list $test $prompt { "need to step-over" "resume_1: step=1," "signal arrived while stepping over breakpoint" "stepped to a different line" "callme" + "" } set cnt_after [get_value "args\[$my_number\]" "get count after step"]