From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LQqXD/KDXWiNgyAAWB0awg (envelope-from ) for ; Thu, 26 Jun 2025 13:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959090; bh=DCs3Zg0kiM74MG0+IJNY3/GUiRBM7zyBBjKW8QyBeLs=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ro9lRybo8t3GIk8Sq2U23qyr8QZP8vv5fbYJCtkEDR4DpW4SHp7gkzYtLa67Ye1G+ /eQQBPFOlYd30b1q0EITWUK5C2FvCJQGbB0NJ27+OFuQswelq7S5VHGJ5nZhP4jsNw q4WPCiMW3RqxqARs9LJcMopUIFHEZ/HN9q1bQii8= Received: by simark.ca (Postfix, from userid 112) id 2F0CF1E11E; Thu, 26 Jun 2025 13:31:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=BeoPy5K8; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=k6BjN4dL; dkim-atps=neutral Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BA5B51E0C2 for ; Thu, 26 Jun 2025 13:31:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E7003854A92 for ; Thu, 26 Jun 2025 17:31:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E7003854A92 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=BeoPy5K8; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=k6BjN4dL Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id D2FAB385B511 for ; Thu, 26 Jun 2025 17:30:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2FAB385B511 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2FAB385B511 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750959046; cv=none; b=OZ6IPLc76Uzl7Hon4g5dfvsJoTHSoXbfdtYfRb3S5uUfJHrMgEvwFojUFHBoSIHp16KdRJThI/nUhraJTWjO6rynWhKDywWQ5Gg4dSrH0cpokz3Y9M7hfTLTwoLiXoRjybN4ZKYkstT+VQEs0GjGuej/el5CQXuZU9yjrGOKZSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750959046; c=relaxed/simple; bh=DCs3Zg0kiM74MG0+IJNY3/GUiRBM7zyBBjKW8QyBeLs=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=loTS09cNmzzNQoky7jRxZN64ywnROMO0JOQPSJVctYqgmiV7GgEwen5oM3Yv/ESHereJiBoGtRaET5VkdAV6h8TlHkLP0kHD65mYma7/uapzSHxseTg+6UtRLKbKfWmylZYtqw0Qbz0jbUTTLzHDk7At5uIlmqEBf+7ug+W2Bxo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2FAB385B511 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959046; bh=DCs3Zg0kiM74MG0+IJNY3/GUiRBM7zyBBjKW8QyBeLs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=BeoPy5K8N5jXlU/e52EMqL6xjqxWzcPj8QULAJWIfE4zVoWu9JEFU3jRqaZ8mRebe ao4FHC+JQ9KsS6G6Y8Hofwq9G7ETTrJVwasmG1NcUapU5AX2FgFQpE/SThLEIzq3fm i6usjHlrPm8e5kh/j65tswyTj0kgmQzY6fmj9aTk= Received: by simark.ca (Postfix, from userid 112) id 1404F1E11F; Thu, 26 Jun 2025 13:30:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959045; bh=DCs3Zg0kiM74MG0+IJNY3/GUiRBM7zyBBjKW8QyBeLs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=k6BjN4dLpwiA6MdW76QG47vdlqSdJgOxXXSN7FzG/IiDm5Yf0shxneivlgOolhYii RR7shI1iG8Glxr/GEV15SqYA1BtsDrP3MMuMxHLuA+LBCvDCs6mVqUi2okODlRSHMV N93RIt0e1vm7o6tJrVb0gowaeyGBAKrQWbEyrdOs= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D3A991E0C2; Thu, 26 Jun 2025 13:30:44 -0400 (EDT) Message-ID: Date: Thu, 26 Jun 2025 13:30:44 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/6] gdb/testsuite: check that "info shared" and "info linker-namespaces" before running don't crash To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <20250616193443.16703-1-simon.marchi@efficios.com> <2755ce98-0513-4138-bea5-b6e6f035bcae@palves.net> Content-Language: en-US From: Simon Marchi In-Reply-To: <2755ce98-0513-4138-bea5-b6e6f035bcae@palves.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2025-06-20 14:12, Pedro Alves wrote: > On 2025-06-16 20:32, Simon Marchi wrote: >> This patch is new in v3. >> >> While writing my solib_ops C++ification series, I broke this, and it >> didn't seem to be caught by the testsuite. Add a test for those. >> >> The exact message for "info linker-namespaces" varies depending on the >> solib_ops of the target architecture (whether ops->num_active_namespaces >> is nullptr or not). For now, just accept any message (a crash will >> still be caught). A later patch in this series will make the message >> consistent and update this test. >> >> Change-Id: I6bce2ff317447bbf321fc9cbd2d42c3dcea0c683 >> --- >> gdb/testsuite/gdb.base/dlmopen-ns-ids.exp | 5 +++++ >> gdb/testsuite/gdb.base/info-shared.exp | 3 +++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp >> index 94b4a6e50bcf..8613056a7c8b 100644 >> --- a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp >> +++ b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp >> @@ -169,6 +169,11 @@ proc_with_prefix test_conv_vars {} { >> proc test_info_linker_namespaces {} { >> clean_restart $::binfile >> >> + # Check that "info linker-namespaces" while the inferior is not running >> + # doesn't crash. >> + gdb_test "info linker-namespaces" ".*" \ > > You can write "" instead of ".*". It'd be the same, a leading ".*" is already implied. Thanks, fixed. Simon