From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2044.outbound.protection.outlook.com [40.107.244.44]) by sourceware.org (Postfix) with ESMTPS id 5728D3858283 for ; Thu, 15 Feb 2024 14:31:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5728D3858283 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 5728D3858283 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.244.44 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1708007518; cv=pass; b=ECxUiVgIFSfTPOrn/xUNOTyKUKaryAxG9uGvH2D1ngFunncdicZ1lgUu/HyvT9Zk+5h37hClBre8XleE3yOI7z4V54KmDh/+yphDkDP/FoDQnPvrsxjsjvsT/0TneFMIztjtIrm+1Sn1OpOp3V6ODUJeNQ+VcLbfkoGp/yN8cEQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1708007518; c=relaxed/simple; bh=YeJ7zvhcrJBOcrJZ58addJYrcjvs8s2Fy9bZYmPPkDg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=lX94kLmKxSXniTYCddM1JQKKkOIA/RJJpGEbyCcjfSc3WIVUJGF9yMB/+ZtnoYyD5wAtNYkRrqS3QpJtFCdIbIGq5S0OjzLWuJH4KB/4ynkPV+iLbGnQ4ddmv2iO56qgTxnzG/LeM/o4ZwJO4MotEF6AaLXU6P+RlDnhvF0KYxI= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fx33y04kPw5HYrFV+TSNjmYatt+M3ojTHMIWWTQuLKc8OUDESwK9A3O82b4OTLcQpLq6hl/uz6Qjmq9OG4abZLCqrtloG86JX+n4NrtYH+KNYJTWYJaDrir9ixOgDtzqOjpLXeRoSNBe2A1UITfusUY/7ChC+mHZ7bLZCpa4eq+aRhY1hrCWaiu+AtqQ4MmsOw0ZSZ7h4UHAc2jV9pMbmP7c5ozZeOoDXvaWlF486QAbSWV3UAfL6lBXraW5Gb24yH2VcTeQfLvJADc7o4Mp1VRCF4eVqm1y4tQVEECNP7H/8q+QKLXtCSLPUBhsGGnplebkkXFmv7xcoGoaf0xciA== 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=O+j4dji4BQRiRX0eImzj5RrPVDbrpyJsFEKboKhUi04=; b=X7Ad+Nqk9clA/5gcno82+W2ovhGFeABiRZf0lG1lFKce6HT1M+YEc4KdyJ6hgvFRsF8RcDt2RZLebB0nz+9u16yQV+7tdcSKizKrLblqGX3Fj2BRh7x9AyQj2Hug35FslU7UBNH4QWQg7yLevga3BVRNdG6GLtzut3rpC2rED8l4V9Rz+JG6UK0vpHS0PU7X408YYAb5QSyFdPItptOC1AzHuCnESvq+nKACE5lHMxGDY0toj6BQ5BO6D13YJ685QA6MdWoBJvQEpBz0uoW1pg/AVb1lBMavZFBPWT+fZ9DEBhQC76E8LfqLVF/9tNFRQe/W6payLC2v9FhZ8Ckq5g== 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=O+j4dji4BQRiRX0eImzj5RrPVDbrpyJsFEKboKhUi04=; b=2Qj2cK8u2PvkIggvaCYuBcMYhFERFE9ZC2xG8+Zrw2b3SC1wbdumD3N7SUkIW91pXMj5aKPMX3vddOAjNErzSO0RZcgh9MSV6KC3pJadABTxkJWeG/bYAP2/yNPVSsCsjBxxxQSbaGpcWNf4yiVIgGX18RwuUYk6LngNw+spWiM= Received: from SN7PR04CA0114.namprd04.prod.outlook.com (2603:10b6:806:122::29) by PH8PR12MB7205.namprd12.prod.outlook.com (2603:10b6:510:227::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25; Thu, 15 Feb 2024 14:31:52 +0000 Received: from SN1PEPF0002529F.namprd05.prod.outlook.com (2603:10b6:806:122:cafe::46) by SN7PR04CA0114.outlook.office365.com (2603:10b6:806:122::29) 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:31:50 +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 SN1PEPF0002529F.mail.protection.outlook.com (10.167.242.6) 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:31:50 +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:31:49 -0600 Date: Thu, 15 Feb 2024 14:31:42 +0000 From: Lancelot SIX To: Guinevere Larsen CC: Subject: Re: [PATCH v2 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Message-ID: <20240215143142.tjelya5pgmlg3dxo@khazad-dum> References: <20240213110924.123394-2-blarsen@redhat.com> <20240213110924.123394-3-blarsen@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240213110924.123394-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: SN1PEPF0002529F:EE_|PH8PR12MB7205:EE_ X-MS-Office365-Filtering-Correlation-Id: 954ff605-682d-44f6-aafc-08dc2e32d905 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J4hAQCcyBSWUIfXP+5LmKjXGGHNeddafaiNEfbGUc2YhptLxQHBt/ssTLhiISuOUmieSr7Hr3Aau2sFdATgTPM3DzRXVp4E4/apj9zq5kyVYrfp57Egy5fR6zYs8uWDKy4TxOb0v5EvEz4j1XEIJ+SmVD1R4jJUaAZQ8+g0fPmTNzY1tBrm8HxfISDu5wannYA9yL4TqjuCVZ6cIxS86UyxAYfKEOyYGHSyT4EfMEhp4y5fRGZwD0eJgb7fwod2Z/CmNPFWXOJLUP8eUoMomgbUni188E9lMq+udYGE3sPuR/EiNHZ/fpSmsJmrwwnEy0gEH15GOiFW+QRCYZEmPwDAkA77nIpDf/z53iG7gbvPmJZ1F33+OnrT2zdw3hzPtWqgq/c8l+f2Ykz1Ci0iiFTsH4cih4Gp4BQXfn8o3t7f6f93rBmRmlKaKfqGE/5hm3gsN7lNatu66qIoP0S+n/uDgkgtqGsX/Nzi8ZahpHNin1xHRdpw0p6svF07qCPMFSY6e8mlMaTXRMLAe2iPdpZ5boSGvafVoHWkH2yQJMx0y0Q0X+7KwnYzBocWhLZ65LUmMNT1rBiKpAoJ6bnoMmJjOFwAx720W6aDR0MXpHRKUEr5WQPo/pzG7XmkhtH8ISio1GeKFpXtd6PhzE7893Q== 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)(346002)(136003)(376002)(396003)(39860400002)(230922051799003)(186009)(451199024)(36860700004)(64100799003)(82310400011)(1800799012)(46966006)(40470700004)(1076003)(336012)(83380400001)(82740400003)(16526019)(26005)(356005)(41300700001)(81166007)(426003)(4326008)(478600001)(2906002)(966005)(6916009)(8936002)(70586007)(6666004)(316002)(9686003)(8676002)(70206006)(5660300002)(86362001)(33716001)(84970400001)(55016003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2024 14:31:50.3568 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 954ff605-682d-44f6-aafc-08dc2e32d905 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: SN1PEPF0002529F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7205 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 List-Id: Hi Gwen, On Tue, Feb 13, 2024 at 12:09:24PM +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 | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp > index 996e020d1e8..6c638838043 100644 > --- a/gdb/testsuite/gdb.threads/threadcrash.exp > +++ b/gdb/testsuite/gdb.threads/threadcrash.exp > @@ -27,12 +27,9 @@ > 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_test_multiple "print \$_inferior_thread_count" "getting thread count" { > + -re ".* = (\[0-9]+).*" { > + set thread_count $expect_out(1,string) > gdb_assert {$thread_count == 7} > } > } Out of the box, this fails for me Running /home/lancesix/src/worktrees/gdb/upstream-master/_build/gdb/testsuite/../../../gdb/testsuite/gdb.threads/threadcrash.exp ... FAIL: gdb.threads/threadcrash.exp: test_live_inferior: $thread_count == [llength $test_list] FAIL: gdb.threads/threadcrash.exp: test_corefile: $thread_count == [llength $test_list] FAIL: gdb.threads/threadcrash.exp: test_gcore: $thread_count == [llength $test_list] Also, I think you could use get_valueof here, to make things simpler, and avoid the issue of not not consuming the entire exp buffer: proc test_thread_count {} { set thread_count [get_valueof /d \$_inferior_thread_count 0] gdb_assert {$thread_count == 7} return $thread_count } Best, Lancelot. > @@ -230,4 +227,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 >