From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oEDWFo+YWmQmfwQAWB0awg (envelope-from ) for ; Tue, 09 May 2023 15:01:35 -0400 Received: by simark.ca (Postfix, from userid 112) id 5B6FC1E11E; Tue, 9 May 2023 15:01:35 -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=QQQsGviH; 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=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 EDC591E0D4 for ; Tue, 9 May 2023 15:01:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A1993857708 for ; Tue, 9 May 2023 19:01:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A1993857708 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683658894; bh=BM02u0fXDTxYTF08aV2UZESYq3+g7vPtEkY8EjXSK8k=; 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=QQQsGviH3iYII1G97whVMhp9z1wgc00FXMNXsrSJmFgrRbxDDuaNAl26jwwdeKXDk o3Tcmr7z/AQrhwyWlq3yIWVZJ5aQ2MPmQxw3Wq+shzGbK2XUkcAU8Y7Kh+m1+Ei3ov EwJef8113wwEb7CxwnKtAirYnaPGqanzsM0O84Fk= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 2F8A23858C33 for ; Tue, 9 May 2023 19:01:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F8A23858C33 Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CD34E1E0D4; Tue, 9 May 2023 15:01:13 -0400 (EDT) Message-ID: <10ba4b3e-19e0-2889-47de-67667db21af1@simark.ca> Date: Tue, 9 May 2023 15:01:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v3] gdb tests: Allow for "LWP" in thread IDs from info threads. Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20230418201305.61272-1-jhb@FreeBSD.org> In-Reply-To: <20230418201305.61272-1-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 4/18/23 16:13, John Baldwin wrote: > Several tests assume that the first word after a thread ID in 'info > threads' output is "Thread". However, several targets use "LWP" > instead such as the FreeBSD and NetBSD native targets. The Linux > native target also uses "LWP" if libthread_db is not being used. > > Add a tdlabel_re global variable as a regular-expression for a thread > label in `info threads' that matches either "thread" or "LWP". > > Some other tests in the tree don't require a specific word, and > some targets may use other first words (e.g. OpenBSD uses "thread" > and Ravenscar threads use "Ravenscar Thread"). That LGTM, I don't really see another way: Approved-By: Simon Marchi One nit is that I prefer to use the ${::tdlabel_re} notation instead of the global keyword, but it's not a dealbreaker. And just one question: > diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp > index 14db2511d40..a5b7ccf4ba5 100644 > --- a/gdb/testsuite/gdb.trace/report.exp > +++ b/gdb/testsuite/gdb.trace/report.exp > @@ -380,7 +380,7 @@ proc use_collected_data { data_source } { > > # There is always a thread of an inferior, either a live one or > # a faked one. > - gdb_test "info threads" "\\* ${decimal} (process|Thread) \[0-9\.\]+\[ \t\].*" > + gdb_test "info threads" "\\* ${decimal} ${tdlabel_re} \[0-9\.\]+\[ \t\].*" This one said "process" as well, I guess it's not important? Simon