From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) by sourceware.org (Postfix) with ESMTPS id 226053858C54 for ; Fri, 4 Nov 2022 15:57:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 226053858C54 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-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=arwuPrVX1yMJ5ARy+AacyzYP9KFKVVe44KF4oJ/DTdRKlrdP6yeVL1Oab8iCIiWVeTyFPFtMDQx0VTsiwZLzq7WgwiNlQCai7od2zkAWs5ZczrnMhDfZ4tRCPnIXNcUGjHKAaN5lrFpR0K4qQvXoz/QwqOEcZo4hcPFBM+HDvhKCz47KpcAN+/DEM/yZ2QQdl/TgZ6Y0kWjpj7yVdfORq3meBnVoMFSCXkmT59o+kaE9xAP6/LVO4rlQPhFUDTCA9rTcELSZymr7QgYhD6Fp8xXGCxTBPS/ABlpn5n2f+C3rYvABQE6Uiph1rs1Dj68b+No4wJz3/st8tFfgVrAHEQ== 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=5hJ2mHi/okkpET1fMlFEy4q+Y8k2FPPdLtkKhaRRwEA=; b=N5hAl2/lqoLx/xIPNGFOzroG4vK3qlWfakNhpce0Z8Dr44Sb7CUP6oh3fnILL1xWUnJmSYoYOAYJXIuCFSo8FWSxQ9O3RVe0rYtAndwUkcgJOqh8s3BcQFiuGCQHTZeAt4WOxpP6CSfXH68vgAabDkjZWiPmxqMROSFYDQH1aepoMY2QkWF7M69yKoRixxNjsfyGBqwqrhvD02latsqemhMP8tOPIZVantsq/PlnuwJU3Bz1yWwryeorWrVUnbSAaXWKOGcrEMOWqn8S3Ln2wEbK+GmrTik1mR75uBkyRcS/GfWA23ejqL4inuPqDnw0MVHM2NpQy3LhUObRWCANIw== 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 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=5hJ2mHi/okkpET1fMlFEy4q+Y8k2FPPdLtkKhaRRwEA=; b=G/qoIxgy+AmMR99k8umPtQQvdwPEx24JVBEUgyBS8BIU9mNfSPVKQ88k9MpQ/PBk/HZeBvlZ1hP0y5xluzRf1PTRPXJi0CA6ZORJYfsFoChckttrH0SbuwVXpVOBN+v61IRjDTUmI7NhS0Zzbi0gxR4vXaLT2qIcUsKDgaspDcI= Received: from MW4PR04CA0145.namprd04.prod.outlook.com (2603:10b6:303:84::30) by CH0PR12MB5153.namprd12.prod.outlook.com (2603:10b6:610:b8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Fri, 4 Nov 2022 15:57:26 +0000 Received: from CO1NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:303:84:cafe::dd) by MW4PR04CA0145.outlook.office365.com (2603:10b6:303:84::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.23 via Frontend Transport; Fri, 4 Nov 2022 15:57:25 +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 CO1NAM11FT050.mail.protection.outlook.com (10.13.174.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5791.20 via Frontend Transport; Fri, 4 Nov 2022 15:57:25 +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; Fri, 4 Nov 2022 10:57:23 -0500 From: Lancelot SIX To: CC: , Lancelot SIX Subject: [PATCH] [testsuite] gdb.base/dlmopen: Fix test name and use gdb_attach Date: Fri, 4 Nov 2022 15:57:03 +0000 Message-ID: <20221104155703.756252-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT050:EE_|CH0PR12MB5153:EE_ X-MS-Office365-Filtering-Correlation-Id: 10741f84-c63e-4064-9041-08dabe7d447a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nvO4StDqNBECrVVje3FltTe2AK+CrXUUEFVx15rkWVvZ0t1INQCTjlzEuuBB6yoCPFSqg7h3oJhNs9SHEp9tA2NnXGJmOl0/i47HbEQjIzMxQoERx5E1M0uyUBdazgx7BqKtIgqYMfvfIPuDQmoVXqtgV34Z8GIYV8CXdCmlSPVKvnIvvp8tme/rTo4KYEIjcmNRSYKmY5XHrn5EL8DPSnMV1trYOnRRQWMOeBfAHp/kx7pYB//rJJtVd1AkIuD+DcAW6njdSdzo5ivk7HzSQ70HfUl78p6ioZaH6GmE2UNvwSZ4MGHykWf7kNH8iqy/+DqJQUg/71ypjPn2lSJBsjjWU9OPQIHDydlw0u+DmFaaKbVGIHHGjMuDHR7wEhIuUKb7QY0bVeEGDf5mJ7pICav0oeByvHrZH+BHriCRfNYwqu/4G0VpRk/fX71+THKPlr31qttcCjaXJIOk9VBCJGoKIlrYVmdmpLEUfvwxmWfZgMmA3IANoaD9OJJFLJumgx8tWy9GUt1UXz6/Kxza47eWZ9Kz95JPoPydNb/OSK499sWgjvl5v0WwRv9hYhztJPio2ibKbQl3QfRp0Oe/scFUHfPcWN7GEMEodPjiw4GzB2oTE7Rjeyqlvd3b7NQSBud66DGOdkrUh+V/HzgQHypbnxw8MVN8Bq+Gf1T9d4rdul/MiTt5eI6FjIxO2G8cKBGnfl9l+POUGYU205cU0yvsrgb+2PSZsZp5yYh7w80fT8PPjRivlOZ6Ev5US/T+Ky/Hk0UL0V8nPVJQIg3+AFMygrUAzBd/Kggt1KIMbOXSdY+W5aJbN7MANHWz1yE8mzBdBhbaJ0qWmp4sv5DB0ML7vAsRjmSd2tYC7y+T318PoTl1sLPa1rnU6hSgqhRy 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)(136003)(346002)(396003)(376002)(39860400002)(451199015)(46966006)(36840700001)(40470700004)(316002)(8676002)(8936002)(54906003)(6916009)(36860700001)(36756003)(5660300002)(70586007)(40460700003)(7696005)(4326008)(41300700001)(26005)(70206006)(47076005)(83380400001)(1076003)(2616005)(16526019)(356005)(186003)(81166007)(336012)(82740400003)(40480700001)(82310400005)(426003)(86362001)(6666004)(478600001)(2906002)(84970400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2022 15:57:25.3856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10741f84-c63e-4064-9041-08dabe7d447a 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: CO1NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5153 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 List-Id: One test name in gdb.base/dlmopen.exp changes from run to run since it includes a process id: PASS: gdb.base/dlmopen.exp: attach 3442682 This is not convenient do diff gdb.sum files to compare test runs. Fix by using gdb_attach helper function to handle attaching to the process as it produce a constant test name. While at it also check gdb_attach's return value to only run the rest of the test if the attach was successful. --- gdb/testsuite/gdb.base/dlmopen.exp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.base/dlmopen.exp b/gdb/testsuite/gdb.base/dlmopen.exp index a80db75f9ac..9a2c9d78636 100644 --- a/gdb/testsuite/gdb.base/dlmopen.exp +++ b/gdb/testsuite/gdb.base/dlmopen.exp @@ -159,16 +159,16 @@ set test_spawn_id [spawn_wait_for_attach $binfile] set testpid [spawn_id_get_pid $test_spawn_id] # Attach. -gdb_test "attach $testpid" "Attaching to program.*, process $testpid.*" +if { [gdb_attach $testpid] } { + with_test_prefix "attach" { + # Remove the pause. We no longer need it. + gdb_test "print wait_for_gdb = 0" "\\\$1 = 0" -with_test_prefix "attach" { - # Remove the pause. We no longer need it. - gdb_test "print wait_for_gdb = 0" "\\\$1 = 0" + # Set the same breakpoints again. This time, however, we do not allow the + # breakpoint to be pending since the library has already been loaded. + gdb_breakpoint $srcfile_lib:$bp_inc + gdb_breakpoint $srcfile:$bp_main - # Set the same breakpoints again. This time, however, we do not allow the - # breakpoint to be pending since the library has already been loaded. - gdb_breakpoint $srcfile_lib:$bp_inc - gdb_breakpoint $srcfile:$bp_main - - test_dlmopen + test_dlmopen + } } base-commit: b0119424d19afcf80997ad5f3128d7ec68e1fafa -- 2.34.1