Message ID | 20221109232945.2016705-1-lancelot.six@amd.com |
---|---|
State | Committed |
Commit | f735116b3fb6dc30912e969d6e8c1b15bbaef510 |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3EA2638356A6 for <patchwork@sourceware.org>; Wed, 9 Nov 2022 23:30:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EA2638356A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668036640; bh=Jbu5dBrAnLpUNfztjpFbhBnUwAOQ8MLSRvAD7KZOokA=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=svthyWKKv3+c0I8TXYQKNZ3g6PqrGiHm1PoDI3rCzTzXJOc22pImGwHALg0j1jdz9 tzGFgj0GkrgxiTS+S0cW58cmuMZMBYZDBtSWmR4Mc1dbLbjdNJpRoQvrbDuARhOMD6 kO1Kdu3GUxtbNVCW9S+3ha0pT27QeNBbue5BaltI= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.61]) by sourceware.org (Postfix) with ESMTPS id 70E023858D1E for <gdb-patches@sourceware.org>; Wed, 9 Nov 2022 23:30:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 70E023858D1E ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=apA0X4zSDoMbqrUMW9kf1ctX1GBgRmRAAUUmk+USe2mEyZATrE6RAq91z2onVHidro6hdxdzxSKZ3wimlvkpeGX3pSbbek5iucX2E+Slj3zE7Ng3Dw/HMXRIuDSG8lRs7A5UeVb7sO3mjwOu8VxhmEqECHY7/iclbkmE2jDhrPeNg7or+NmdHKYOXt4r8DEq5TOIFfAwEwmztjrejIkEEc/QOLSLEMH17e6b6K5tCgJHAJQBirkH80bzTBjPpGWMkKO+aE4Nj67XzMON6Hky1v48tq16oDc5LASqVwABotVHod7cDbvIeVfX1lZ5ogbLtue1YTIYYgF32itKiH+1Zw== 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=Jbu5dBrAnLpUNfztjpFbhBnUwAOQ8MLSRvAD7KZOokA=; b=S8IlK3B07RAM+gOufK7HxZR/AoDm/EgQ28Mt0LsnQo0idM0HAsg+ahmDq8kl0oSFq+5dMNHXh3o9sknvYwiyy9WA1WCibNiGBOGXYCrh5LsB3fl1xzX9PFd4VQ96H27bJt7+X2P3lzO/5DMfvlFW/cSKwLHyhQX2oYyy9jV5nnDSZoJropACkU7++2KWO3IEKb/58s5BQkft1TKrYbx4daafvazUFSirqAeisgv9tYQESUMLWOxROZmvXLCV+P5NPNnHpI6H1/1KmcYrD8N9gciydlIBsQyZrU7uezgnEHRhIZTGlSiaCbj3vKKK7/AEJZeWXp8L2gyImBek+zwEaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org 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 Received: from BN0PR04CA0210.namprd04.prod.outlook.com (2603:10b6:408:e9::35) by DM4PR12MB6447.namprd12.prod.outlook.com (2603:10b6:8:bf::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Wed, 9 Nov 2022 23:30:09 +0000 Received: from BN8NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e9:cafe::eb) by BN0PR04CA0210.outlook.office365.com (2603:10b6:408:e9::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Wed, 9 Nov 2022 23:30:09 +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 BN8NAM11FT037.mail.protection.outlook.com (10.13.177.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5813.12 via Frontend Transport; Wed, 9 Nov 2022 23:30:09 +0000 Received: from khazad-dum.amd.com (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.2375.31; Wed, 9 Nov 2022 17:30:07 -0600 To: <gdb-patches@sourceware.org> CC: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com> Subject: [PATCH] gdb/testsuite: Fix rtld-step-nodebugsym.exp Date: Wed, 9 Nov 2022 23:29:45 +0000 Message-ID: <20221109232945.2016705-1-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: BN8NAM11FT037:EE_|DM4PR12MB6447:EE_ X-MS-Office365-Filtering-Correlation-Id: 35d2022d-a55b-48cc-2820-08dac2aa574d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yLyIUxdvQOVQhWiXryM4XsjS9lXCkQF4wtLCtbuRkqj7VgFeac4PKbNN0Bl8jDmnp4v0JITQNb+u7eBHdEb7GCamXDpvILDLpLhW9suAmcYtRs4W8yLxZCdty4IuUwy8in28y1Us+qMwUwM74yo9cPC17e6Tl+y70npZJ0UjJXGdkFCRcG0Qf/wS0nCTolV/vCLplNwfQkG+4l3o1AJ6oyv2XTYAzcHWO/sUJEeVlY5/bZ/h5CM7d6iScdofih66TzbPfIfP2palao6tYXAvIvwAAMfLviqy4pOgldIeemwv7JAEKN2c+YRjhsMNQcPXGGI8KfOEkrSd4JcSr2qhRz3hHP80JxgAlgQFvZQyuatR2q6OzwwQiE0xei1+bwRJkwtagmSiZCSPeNZavQYbbClLNFDSNDbtKxAnmUXbzUfyAKhoSyc8zU8cyL6gjWBFHZTTqentFOkfDDyQlQks6/vWthH4rdl0gUs+Skg3HBeJGCdhPiXe8ErmQ+65WALzXIkBlvvJXuKSt7yBQKKp4jZ3t8M95WeVfgJJZfZhn+eMXpldTwooyHUbHMY/MEo23wvJzmcMMOx4omlIiIbQn2Nr4eTz6UWLdxaO375+v9yLfb+lDNaPfepPwmJ4wqwUtqX1huqUKZFf4IZPybLKALQwqEjB4lLRPpS4KvtK1iWZqv3rW6/AWj5ZF1OD5cGGKFQDAhaAjklXHftKU44u696bZix3h/Vrf9Jl5ojCdhAakoS/CmhCrYftq5wOZ8Jh+baC6gunV7KW7iMtww7cz4lMJCpJvQYyAobkDlaVeCEpybikfV4EkSgepXblDY/fHGxrw+jRnqeDMGVybUrNZw== 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:(13230022)(4636009)(396003)(346002)(376002)(39860400002)(136003)(451199015)(40470700004)(46966006)(36840700001)(36756003)(84970400001)(86362001)(16526019)(36860700001)(8936002)(356005)(81166007)(1076003)(2906002)(26005)(5660300002)(83380400001)(82740400003)(426003)(186003)(2616005)(336012)(70586007)(47076005)(6916009)(70206006)(54906003)(316002)(4326008)(41300700001)(8676002)(82310400005)(40480700001)(966005)(6666004)(7696005)(40460700003)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2022 23:30:09.0780 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35d2022d-a55b-48cc-2820-08dac2aa574d 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: BN8NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6447 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Lancelot SIX <lancelot.six@amd.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdb/testsuite: Fix rtld-step-nodebugsym.exp
|
|
Commit Message
Lancelot SIX
Nov. 9, 2022, 11:29 p.m. UTC
The test case introduced in bafcc335266 (Fix stepping in rtld without debug symbol) fails on some systems as reported by PR/29768. This can be seen if the system does not have debug info for the libc: (gdb) step^M Single stepping until exit from function main,^M which has no line number information.^M hello world[Inferior 1 (process 48203) exited normally]^M (gdb) PASS: gdb.base/rtld-step-nodebugsym.exp: step continue^M The program is not being run.^M (gdb) FAIL: gdb.base/rtld-step-nodebugsym.exp: continue until exit (the program is no longer running) Without glibc debug info, GDB steps until the program finishes, and then "gdb_continue_to_end" fails. As this test was designed to check that GDB does not crash in the "step" command, the continue does not carry real meaning to the test. Replace it by "print 0" so we still check that after the step command GDB is still alive, which is what we care about. Tested on Ubuntu-22.04 x86_64, with and without libc6-dbg. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29768 --- gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) base-commit: bafcc335266708d5fd62159df90d139d00666ca8
Comments
On 11/9/22 18:29, Lancelot SIX via Gdb-patches wrote: > The test case introduced in bafcc335266 (Fix stepping in rtld without > debug symbol) fails on some systems as reported by PR/29768. This can > be seen if the system does not have debug info for the libc: > > (gdb) step^M > Single stepping until exit from function main,^M > which has no line number information.^M > hello world[Inferior 1 (process 48203) exited normally]^M > (gdb) PASS: gdb.base/rtld-step-nodebugsym.exp: step > continue^M > The program is not being run.^M > (gdb) FAIL: gdb.base/rtld-step-nodebugsym.exp: continue until exit (the program is no longer running) > > Without glibc debug info, GDB steps until the program finishes, and > then "gdb_continue_to_end" fails. > > As this test was designed to check that GDB does not crash in the "step" > command, the continue does not carry real meaning to the test. > > Replace it by "print 0" so we still check that after the step command > GDB is still alive, which is what we care about. > > Tested on Ubuntu-22.04 x86_64, with and without libc6-dbg. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29768 > --- > gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp > index 1c8fa478cb8..80ff1572c1a 100644 > --- a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp > +++ b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp > @@ -29,4 +29,6 @@ if { ![runto_main] } { > > gdb_test "step" "Single stepping until exit from function.*" > > -gdb_continue_to_end "" continue 1 > +# GDB used to crash while doing the step command. Check that this bug is > +# fixed and that GDB is still alive at this point. > +gdb_test "print 0" "= 0" In theory, the gdb_test for step expects to see a (gdb) prompt at the end, and I suppose that GDB would crash before printing that prompt. So the test would catch the problem even without that "print 0". But I don't mind the extra safety: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
> > In theory, the gdb_test for step expects to see a (gdb) prompt at the > end, and I suppose that GDB would crash before printing that prompt. So > the test would catch the problem even without that "print 0". But I > don't mind the extra safety: Hi, Thanks for spotting the issue and for the review. If GDB crashes, we always have an unresolved test case reported in the testsuite summary. However, with this extra "p 0", the output during the test run is slightly more verbose as runtest complains it cannot issue the command, which I find slightly easier to spot. I'll push this fix shortly. Best, Lancelot
diff --git a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp index 1c8fa478cb8..80ff1572c1a 100644 --- a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp +++ b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp @@ -29,4 +29,6 @@ if { ![runto_main] } { gdb_test "step" "Single stepping until exit from function.*" -gdb_continue_to_end "" continue 1 +# GDB used to crash while doing the step command. Check that this bug is +# fixed and that GDB is still alive at this point. +gdb_test "print 0" "= 0"