From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8dYwMr8hzmUEGx8AWB0awg (envelope-from ) for ; Thu, 15 Feb 2024 09:37:51 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=jS7fpHtB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C02C81E0D2; Thu, 15 Feb 2024 09:37:51 -0500 (EST) 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 AC1DA1E030 for ; Thu, 15 Feb 2024 09:37:49 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D937384DB5E for ; Thu, 15 Feb 2024 14:37:48 +0000 (GMT) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2053.outbound.protection.outlook.com [40.107.96.53]) by sourceware.org (Postfix) with ESMTPS id C83C2384D169 for ; Thu, 15 Feb 2024 14:37:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C83C2384D169 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C83C2384D169 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.96.53 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1708007848; cv=pass; b=bJC0aO5fNqaWPC2skoWX/eZ7ON8nMSoiJdg7tg6AgwOqvHIaGkBbU/rumjQdg0h4XklBKEGinTOOoIsujSPd7YBR4yGld8gmEcKQrEwiGFZLSOFEqo10YR7tMt4KoOmffvY8yNHtnA3irgXAE+OOwDnfDXqwsOMKQ8jsd5lYtP8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1708007848; c=relaxed/simple; bh=WRqekh411h8dXzg0w1HnYnjwVOlxhQXilWr75CJ0o88=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=TI+efDeP4kQSCVMkWAEDfoKZuyeQ/QR3QyYn0zGmGRTUrBdi5SvHTYdZWgSkf6kBK2S/A2YdgF3fEPNa5OjsdVcGAMwFeLM35I7dBPTOSkqOm4onxAl46QzvaljTkl69RgL2Qwj8djw0mW4zMKJo5/g7AU0bXlPyEZQBxDy23go= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UXIQMr/El+2wzReGUUkcoR+zVq+8NUc8ryqcz9EKgTA8F2Quv7DiJ82zXQiZrsnA8DswIwLyugRHbZq/NbXtRJhb+73bzrgzYfDFnWR+ubHXiKrtuK58S7kiljWL/j9ehvs1A9ZCy8OsOBDw7f5zUUmepoL1DHO9P0XKfxLfJkqauSdCOrFjGY4sb7rn+66eTnk3DYjxtYgHn5pyT8oVzsRbTfL7bpiWyxPN0Z02vEnTzOi7CGwS8qVfHJx5KRJveoPuORM4C8weslwQz6goZ8sW47IlxOFuEk7n6hsjj7h4aeyzu93wUOxSXvdr5ndhUa2qZGvoD4+2TFQRXRafAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qqRn9kVyGNUBtpkm8fWuShsrhkwxLS9tCOoJBI83s1Q=; b=iL2yA74LKZvukCk5K8O1BT0aBLmtHgZM6LQB/GrWmiRfWOu8XhjzGgR61M4yIMH6geAbzr9YCMz0LjitaFtoh5762FqlKNVmzvgY4xq4UKLdc2cbnoom0aLdBsAYx1J7wa04ZserPZqdfiDiEnScxxQMR0Jc6jTFmO8TJXXeSKmnIYHwjpTguBwJmx5yEzWqvlUHd5Dna6iwfHB69o8vw44x40p9o2e71XO+vbeN+lvR3ZwUVS4emhMF+9n8uOnaA1FzyFWA+ZZgR4gXhiAUD6NpiyttoecM1BhUJ+93/LtpaE69UFoMpyTepvXyYjQJ9/2otfstDx9uJXISt8hBXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qqRn9kVyGNUBtpkm8fWuShsrhkwxLS9tCOoJBI83s1Q=; b=jS7fpHtBNKo9ibY6+d+iuAP3BgQ5MdVgNwa0yFR+f+HvGpG3faDrldvyXZ8hi+z698pwZWqAy7YBrVTxcKws8UXzIINN9c5FZ93HPCvMoikmTwVI06kHgKsnzLEUERog+guxyKi5XifkcDdN7voFeB9kn+DgA7Aq64kN98O9RLY= Received: from BY5PR17CA0017.namprd17.prod.outlook.com (2603:10b6:a03:1b8::30) by CH2PR12MB4037.namprd12.prod.outlook.com (2603:10b6:610:7a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.27; Thu, 15 Feb 2024 14:37:23 +0000 Received: from DS2PEPF0000343C.namprd02.prod.outlook.com (2603:10b6:a03:1b8:cafe::23) by BY5PR17CA0017.outlook.office365.com (2603:10b6:a03:1b8::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39 via Frontend Transport; Thu, 15 Feb 2024 14:37:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS2PEPF0000343C.mail.protection.outlook.com (10.167.18.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Thu, 15 Feb 2024 14:37:22 +0000 Received: from khazad-dum (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 15 Feb 2024 08:37:21 -0600 Date: Thu, 15 Feb 2024 14:37:15 +0000 From: Lancelot SIX To: Guinevere Larsen CC: Subject: Re: [PATCH v3 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Message-ID: <20240215143715.qs5msbi77qlzmkup@khazad-dum> References: <20240214091712.223928-2-blarsen@redhat.com> <20240214091712.223928-3-blarsen@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240214091712.223928-3-blarsen@redhat.com> X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343C:EE_|CH2PR12MB4037:EE_ X-MS-Office365-Filtering-Correlation-Id: ad644741-fcaf-4aef-67ec-08dc2e339f3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0luS2xrH5a0bGFOvP4baey2jl4MC+DnTXBHYgFCAABsz2t32LyejtvTTQSEIR79Z6LbNMi1lTZKBe/LNObEaLVZLAZDrDIDMQZa1OfFhbBdkrbM4XI9+jwRB8/c6lB9Pjk0139BY7S76sFr5/AR/sW4FHW6HxFkovwYvmIJOJg9sCguWB66f47KS9I1ufZTeLZ6VxsadWyTHwH2fXaBD3X7zU9Wzu56TFRK1WzPfZHKkON1XLSNWgkgbUgYBZWWkefXy6ug1NYw3qcQ/2Amp3gyCLK8K5FSudt4zQwJMu08ouskxAlhs9omTcj2QyI8WCsYraUMEj5hpcJLliL+WHzfAeA+s+4cs9GqcKwa5Sb0ilDb/bvLpsenV/GfdySDLelhPSkjLjXM41USZ+dNQZgDXrsMaeOK+gtTtBmeoDrD6LjX5C4tZTduEDghhQ+98LLsf9IpKpt9Cd57xxgVg+auk5FxntALYW4ZKTnjrI+RY74sKAS37SKwefxPC6j404H7B5UbsYeMmnVmplmNtOZ3fYY5fsDhA5zNOghrxEoJLGmqqS01/IIy4cHOC0vE6mJaz047CdepYj3ejNW+a1TTp/xdqo//g/kyvJkRo+QhH2d+OawSa+lfoTVUb4jPvBcUZdSysmv9AoUz31y3FPA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(136003)(346002)(376002)(39860400002)(230922051799003)(186009)(451199024)(36860700004)(64100799003)(1800799012)(82310400011)(46966006)(40470700004)(5660300002)(41300700001)(316002)(2906002)(426003)(336012)(83380400001)(1076003)(16526019)(356005)(81166007)(86362001)(82740400003)(26005)(4326008)(8936002)(70206006)(8676002)(70586007)(6916009)(478600001)(6666004)(84970400001)(966005)(9686003)(33716001)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2024 14:37:22.8863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad644741-fcaf-4aef-67ec-08dc2e339f3e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF0000343C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4037 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 Oups, I replied to the V2 before I saw a V3 was available and the V3 addresses the point I raised! Please discard my previous message, and FWIW this version looks good to me. Reviewed-By: Lancelot Six On Wed, Feb 14, 2024 at 10:17:12AM +0100, Guinevere Larsen wrote: > There are 2 issues with the test gdb.threads/threadcrash.exp on arm > targets, both relating to issues in how the targets handles gcores. The > first is that the test fails to cout the number of threads in the > inferior and the second is that GDB can't properly backtrace from a > gcore. > > The first error is fixed on this commit by getting the convenience > variable _inferior_thread_count as opposed to calculating it based on > the output of "info threads" > > For the second, this test just emits a single xfail referring back to PR > corefiles/31294, which tracks the issues with gcores in 32-bit arm > targets. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31294 > --- > gdb/testsuite/gdb.threads/threadcrash.exp | 29 ++++++----------------- > 1 file changed, 7 insertions(+), 22 deletions(-) > > diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp > index 996e020d1e8..bf4534179e2 100644 > --- a/gdb/testsuite/gdb.threads/threadcrash.exp > +++ b/gdb/testsuite/gdb.threads/threadcrash.exp > @@ -20,26 +20,6 @@ > # a gcore. > > > -# Check that the inferior has 7 threads, and return the number of threads (7). > -# We return the thread count so that, even if there is some error in the test, > -# the final log doesn't get flooded with failures. > - > -proc test_thread_count {} { > - set thread_count 0 > - > - gdb_test_multiple "info threads" "getting thread count" -lbl { > - -re "Thread" { > - incr thread_count > - exp_continue > - } > - -re "$::gdb_prompt " { > - gdb_assert {$thread_count == 7} > - } > - } > - > - return $thread_count > -} > - > # Use 'thread apply all backtrace' to check if all expected threads > # are present, and stopped in the expected locations. Set the global > # TEST_LIST to be the a list of regexps expected to match all the > @@ -123,7 +103,8 @@ proc thread_apply_all {} { > > proc do_full_test {} { > global test_list > - set thread_count [test_thread_count] > + set thread_count [get_valueof "" "\$_inferior_thread_count" 0] > + gdb_assert {$thread_count == 7} > > thread_apply_all > > @@ -230,4 +211,8 @@ test_live_inferior > > test_corefile > > -test_gcore > +if { [is_aarch32_target] } { > + kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294" > +} else { > + test_gcore > +} > > -- > 2.43.0 >