From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CtZBAamvd2KjEwUAWB0awg (envelope-from ) for ; Sun, 08 May 2022 07:55:21 -0400 Received: by simark.ca (Postfix, from userid 112) id ECA221E220; Sun, 8 May 2022 07:55:20 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=UkZGky5z; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 77E1D1E15D for ; Sun, 8 May 2022 07:55:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 58160385800E for ; Sun, 8 May 2022 11:55:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58160385800E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652010919; bh=66OfSTtRqhm2jmMcqmDoFdbJRvdxXhZtVBlXd3bgDgY=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=UkZGky5zPrKp1X0SDqIA8NbgA/FF99+l9IGMTSHtblDZk7R6pEr4IDLzpHVaz/+fW 72pjSScPxEEdT+7PHHfYuE5c/R/QGmwCzZoOm0TF84xPMNG1VH+yKhn2lZmQHrWn2y /g8yFyqJPe6051V1Mf9pwjNmVhOmrSOTQ+ahwPlg= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 0F5BE3858C54 for ; Sun, 8 May 2022 11:55:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F5BE3858C54 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 4912B21BB0; Sun, 8 May 2022 11:54:59 +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 3332513B12; Sun, 8 May 2022 11:54:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id VQ/VCpOvd2K3PwAAMHmgww (envelope-from ); Sun, 08 May 2022 11:54:59 +0000 Message-ID: <516fb025-9727-fd3a-b421-dbf00ac4433f@suse.de> Date: Sun, 8 May 2022 13:54:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [committed][gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with check-readmore Content-Language: en-US To: gdb-patches@sourceware.org References: <20220501083627.GA8512@delia.home> In-Reply-To: <20220501083627.GA8512@delia.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 5/1/22 10:36, Tom de Vries wrote: > Hi, > > When running test-case gdb.threads/fork-plus-threads.exp with check-readmore, > I run into: > ... > [Inferior 11 (process 7029) exited normally]^M > [Inferior 1 (process 6956) exited normally]^M > FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \ > inferior 1 exited (timeout) > ... > > The problem is that the regexp consuming the "Inferior exited normally" > messages: > - consumes more than one of those messages at a time, but > - counts only one of those messages. > > Fix this by adopting a line-by-line approach, which deals with those messages > one at a time. > > Tested on x86_64-linux with native, check-read1 and check-readmore. > > Any comments? > Committed. Thanks, - Tom > [gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with check-readmore > > --- > gdb/testsuite/gdb.threads/fork-plus-threads.exp | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp > index 26fbef72941..c05ac4a5a03 100644 > --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp > +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp > @@ -88,23 +88,15 @@ proc do_test { detach-on-fork } { > > set test "inferior 1 exited" > gdb_test_multiple "" $test { > - -re "Cannot remove breakpoints" { > + -re "^Cannot remove breakpoints" { > set saw_cannot_remove_breakpoints 1 > exp_continue > } > - -re "Thread \[^\r\n\]+ stopped\\." { > + -re "^\\\[Thread \[^\r\n\]+ stopped\\." { > set saw_thread_stopped 1 > exp_continue > } > - -re "(Thread|LWP) \[^\r\n\]+ exited" { > - # Avoid timeout with check-read1 > - exp_continue > - } > - -re "New (Thread|LWP) \[^\r\n\]+" { > - # Avoid timeout with check-read1 > - exp_continue > - } > - -re "Inferior ($::decimal) \(\[^\r\n\]+\) exited normally" { > + -re "^\\\[Inferior ($::decimal) \(\[^\r\n\]+\) exited normally\\\]" { > set infnum $expect_out(1,string) > incr num_inferior_exits_seen > incr inferior_exits_seen($infnum) 1 > @@ -115,6 +107,10 @@ proc do_test { detach-on-fork } { > exp_continue > } > } > + -re "^\[^\r\n]*\r\n" { > + # Skip line. > + exp_continue > + } > } > > # Verify that we got all the inferior exits we expected.