From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 46PTF5ZEkmDAeAAAWB0awg (envelope-from ) for ; Wed, 05 May 2021 03:09:10 -0400 Received: by simark.ca (Postfix, from userid 112) id 22E131F11C; Wed, 5 May 2021 03:09:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 09DE71E01F for ; Wed, 5 May 2021 03:09:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2EB203851C3D; Wed, 5 May 2021 07:09:08 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 62CE7385781B for ; Wed, 5 May 2021 07:09:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 62CE7385781B 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 604DDAD21 for ; Wed, 5 May 2021 07:09:04 +0000 (UTC) Date: Wed, 5 May 2021 09:08:53 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with readnow Message-ID: <20210505070851.GA11045@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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" Hi, When running test-case gdb.threads/fork-plus-threads.exp with target board readnow, I run into: ... [LWP 9362 exited]^M [New LWP 9365]^M [New LWP 9363]^M [New LWP 9364]^M FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \ inferior 1 exited (timeout) ... There is code in the test-case to prevent timeouts with readnow: ... -re "Thread \[^\r\n\]+ exited" { # Avoid timeout with check-read1 exp_continue } -re "New Thread \[^\r\n\]+" { # Avoid timeout with check-read1 exp_continue } ... but this doesn't trigger because we get LWP rather than Thread. Fix this by making these regexps accept LWP as well. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with readnow gdb/testsuite/ChangeLog: 2021-05-05 Tom de Vries * gdb.threads/fork-plus-threads.exp: Handle "New LWP " and "LWP exited" messages. --- gdb/testsuite/gdb.threads/fork-plus-threads.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp index f5cfb279ce7..7fe3c603bcd 100644 --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp @@ -87,11 +87,11 @@ proc do_test { detach-on-fork } { set saw_thread_stopped 1 exp_continue } - -re "Thread \[^\r\n\]+ exited" { + -re "(Thread|LWP) \[^\r\n\]+ exited" { # Avoid timeout with check-read1 exp_continue } - -re "New Thread \[^\r\n\]+" { + -re "New (Thread|LWP) \[^\r\n\]+" { # Avoid timeout with check-read1 exp_continue }