From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2075.outbound.protection.outlook.com [40.92.99.75]) by sourceware.org (Postfix) with ESMTPS id BE83338378F0 for ; Wed, 14 Dec 2022 07:43:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE83338378F0 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=hotmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kj1ewx1gBO3gKEDuqIBGcpvh9QGfTYn5yWMCJbWa6GaN2ZrnXGo/Q1DhrKygoUfsTO1rsnTZwhMF521Dze1ioHoJKvFwOoSasAEd0x14MX7ou/JRZb2DD0heMdlEN1/5pmSpDRravquh0KWX5Bmj6j7/qYpPuMC2+eP/p3TOU9z9J4YcZ7X8Pvj/uomxlzPsN0dD0tY9cUM8/Jhcufd3N7cZHbihBB8dZ2vQOOmp2EtiAtIImskNnKz/hQ54sXW80ko93S3xMoPB5jJOJrufPbJorEHlHeBWiRA4h0On4N56EYDGjo0dbZbfo/jGIX2PHDCORqK1Ls9VTLEBXAFlzw== 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=mQDi3q5Nif42/ZKu89zRTF4Tj+ZCwOWUkNbqLAQuJZM=; b=S9YjTdwtALXut8TMj1rPZsk2niBaeok7jPiVSRx7/x7dPGw2wAvwFXvkP+h7Jy8L9v4h5De92parfYyyabW1ofmHd8E8FOph5eu4VfEps07gqGd/xAJqY5PQv4cnkokBfkrZP7rjfQ4Tz7LSOKpL7m8wV/utojsmjiJa09V6+lP95buUwgxRQKTIvVLucV3E4aPdeQjvF5JTmY1fwVEde4t/N4WeRCIKLLxnksIcngzwwtOYRJKyNjP0+0I4wTyNfogKQdk6u5KBGEES1cxV/dOgnIOp4vw5sYYNxZiWbgM0h8g9oNEmn3AtMtRQgjk1p90SiCon4iQGh5qwbqeCtw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mQDi3q5Nif42/ZKu89zRTF4Tj+ZCwOWUkNbqLAQuJZM=; b=XIeAsUOOj3KvR9NZrgX8JC8eBZbJoJsnVHDMKIaygxR3HeRw/dO7/SFQ3QEL9TatTButr8uPzNxjEkqzO3wnlA8zCwUZ+AN5RbpmD6YPxfkaA27sXspUhb1cpCWwDL/dApMkyhqL8yKZsX0noLrv0G+3zeAfEt7XJpqFmW7s8scuPoxi3nJCxv5LLyja/ianaP/eNdnjyIcy9SsDNdnXFDC7K7j2siJLiDrab8eCgQjlJzraZJpR4ZzOeJcWoDvtqsqderRU4B87HIhxrIaYEyWT/RsGNka2RPPIAOJibq3+U32u0hatpt+Aql9w+6nct5FhfFor+EqzVafG8znwTw== Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) by OS3P286MB1879.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:171::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Wed, 14 Dec 2022 07:43:55 +0000 Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::c90:199b:e178:3fa4]) by OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::c90:199b:e178:3fa4%7]) with mapi id 15.20.5880.019; Wed, 14 Dec 2022 07:43:55 +0000 From: Enze Li To: Tom Tromey Cc: Enze Li via Gdb-patches , enze.li@gmx.com Subject: Re: [PATCH] gdb/testsuite: add untested message to skip_debuginfod_tests References: <87zgbre0w8.fsf@tromey.com> Date: Wed, 14 Dec 2022 15:43:24 +0800 In-Reply-To: <87zgbre0w8.fsf@tromey.com> (Tom Tromey's message of "Tue, 13 Dec 2022 09:14:47 -0700") Message-ID: Content-Type: text/plain X-TMN: [cx4XeWkK5raW+2nFgLNh9rFTyvTQybiW] X-ClientProxiedBy: SG2PR02CA0096.apcprd02.prod.outlook.com (2603:1096:4:90::36) To OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) X-Microsoft-Original-Message-ID: <871qp2ctwj.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3P286MB2152:EE_|OS3P286MB1879:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b868463-ebc5-40aa-184c-08dadda6f381 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hcyF7Q663eVQcJE1u4ixYPHrHkCoq7JSGAlQXJCdlE1IMMgea8fb0iX7DTTrKEYad3wNo5X/r5z+h3TdPgFW31FgMw1OtEa3k2OHDK0sEBPdzLPt4goYJI7TH6pcdfd1aroin9n2Q2KW6gxTtkUkUZfjuQ5CwOjtx/WsKTt0ppZ2bcEvG+0KHf9QfO7qynwbwg8eC9XcxtCIu6U235unMN88EjdLwzTrMiXCAyAsGqRlMGRGC/bl1djLX6x45h4pZaICToMHhedJdGmENOYrOvKL+WU/66A+NuPlNtnQlf7PQZ6eZ6Fd6pcdbP8L47q3t7Dc7JWAKyePUnnFqS0tnudA6lQCUdTpXwps21hfpcNprrTJF+B1IBj+gK9U4VYUDKL2CPoYGbsCjXWLejW33vBrMamvs8mnCv+wNMXmM6jXPXjiqaQYHxVpqQsK+zeCt+DC1zWRVnxZHfwS2O4lUSEgJlvLXL/he8hDQ5m+bwzIcCVCDkz97Nppg+6DPjD4LGD+jbZQMF6aVAt5AxzR7o0A/k6yLtQOg88u8ckhVvnSCybSNxvyGnPRGbSgm700IADSRNfiS9yLUKWa3VnovDFWo0uYXtBKqE4GPDEfXBtESySEtXiXR/UFt5D9huKbpfCBf/pw9QNheh0tw5TJ7Q== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?N/Ud4VHjKFc/TDJbRadrDL6D0LHliJFeza24c1rqXBUGFKjmLl4St+oCehM9?= =?us-ascii?Q?eLoSdCLKkSEhq51B5d9ZORBPjjtyqwuhg87+ojmO8iacBgFSatADap4RNGfl?= =?us-ascii?Q?HIeKk3ts5FerOcJuFPjTiTgKkRqrTRWBIMIW8H/LGcfvJBPdp3nwa9o7/qBZ?= =?us-ascii?Q?KZibYGlp/SpsxonJMOcwIA7a+N5JO5vexH7jy4vksAbO1i5B8LA7BAQQ2+EV?= =?us-ascii?Q?zm5/9eb38Sybv1NErrArkjohMmE5X8pNlgQDUl7MaK+QP2xHgPyRZsS2oCXo?= =?us-ascii?Q?jM0v6AbPZKPgsSSklgTgI0xbXPjXn348sdUL55ONi8a/EcwRD4FwjZzVwS6k?= =?us-ascii?Q?r33i6B9nJf8u6ZhUvzTghl5IA+iFwtnx9zXehTL/qf5xJhlZYbfyaRyV5PmB?= =?us-ascii?Q?EIK5CLDZ0+qqwYZVgma6Za7wdN/jUGaZEKmmbkPslMXUQD4GRb2dY8xbHf8Y?= =?us-ascii?Q?/LNF5ALPmgCcpN20YdbuKLVYQBIoeTMKp+//wgwaz2PjKj1M2mu1MQoRp+kN?= =?us-ascii?Q?81ROFzY/yNVxt8/+Ks1liuuSxOe9OVNFWHzayOJ16LbNxX6+iLSsHaKr8qqA?= =?us-ascii?Q?my7oyT08e1zBxAb2IyvfO4j69R42sfsuLMThlXZgnYfE4iEtWlTOhSY5DRYj?= =?us-ascii?Q?G9j2kEI+bqlDY9h/J4YtzYmARA47UVP3pHH3I4a1lfyTNBu5kRWJXThMuNaO?= =?us-ascii?Q?Aevj3S/Bp6Y6rNKItB0oSHFc24tIOxWTZz6hcHXl1gLF5l4oovU0AlJeFuMb?= =?us-ascii?Q?Y1S4429KeuqENfOiBuR9UESZBWcl3BFvv/o4gsq+j8EyEszjqD/ECUM5IRRz?= =?us-ascii?Q?8S6/PMe8zpCfT7M9r/VNMfHfhs9g7T8sncHBiK4nraS2V4N2z26JHZELzPbR?= =?us-ascii?Q?yo8p80yJ/qwE1DG0HynAMKko7dfhmsS6O9Sg8Vw6v4GZNgWuKTReO4iuxESf?= =?us-ascii?Q?iHx2DzxzwPlOzKGd3j0wzsPC6D9UuBz/2Hd1PspL9Z4dg7dyaBq6qCNDSiT3?= =?us-ascii?Q?SYpylYJ9CqTC+E5qWHvEpIBnoTlKWweUjeLIkUUX2eOyiJ7aSVOKYlVXBSab?= =?us-ascii?Q?cwlgW2VRaEENxfOvi9rZXOTFka9Hfe8kDMvdntpIehJLaJB01E3Maxm+bOeV?= =?us-ascii?Q?o8I3wAdrI48OfLLf3UG6jQzEuy7FJ0Ua/GBPGOX1JIQILSK4dXaF9IrBP50M?= =?us-ascii?Q?5BoBuvhYGmvo1d43uqCSc+qy/5Wet3PyWENdu1+be5dQMwJoVr0UO3DLHwaJ?= =?us-ascii?Q?t2DHi0i/9yKB4kRsVK5o1UdQsr04UnAoWGFinwMtgg=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-05f45.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 1b868463-ebc5-40aa-184c-08dadda6f381 X-MS-Exchange-CrossTenant-AuthSource: OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2022 07:43:55.1147 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3P286MB1879 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Dec 13 2022 at 09:14:47 AM -0700, Tom Tromey wrote: >>>>>> "Enze" == Enze Li via Gdb-patches writes: > > Enze> proc skip_debuginfod_tests {} { > Enze> - if [is_remote host] { > Enze> + if { [is_remote host] } { > Enze> + untested "does not work on remote host" > Enze> return true > Enze> } Thanks for your swift replay. :) > > Do any of the other skip_ procs call untested? Hmmm...Not many. Actually, from the skip_debuginfod_tests, I see an untested message "cannot find curl". It provides detailed information when running the testcase. Then I thought other spots in the same procedure may benifit from it. lib/debuginfod-support.exp:proc skip_debuginfod_tests {} { lib/debuginfod-support.exp- if [is_remote host] { lib/debuginfod-support.exp- return true lib/debuginfod-support.exp- } lib/debuginfod-support.exp- lib/debuginfod-support.exp- if { [which debuginfod] == 0 } { lib/debuginfod-support.exp- return true lib/debuginfod-support.exp- } lib/debuginfod-support.exp- lib/debuginfod-support.exp- if { [which curl] == 0 } { lib/debuginfod-support.exp- untested "cannot find curl" lib/debuginfod-support.exp- return true lib/debuginfod-support.exp- } Except this, three unsupported messages were found in skip_* procedure. > I suspect this should be done somewhere else, and/or it's a pervasive > problem when a prerequisite is not met. > > Tom If the way of my previous patch is unconventional, how about this? ================================================================= --- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp +++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp @@ -20,7 +20,24 @@ standard_testfile main.c load_lib dwarf.exp load_lib debuginfod-support.exp -if { [skip_debuginfod_tests] } { return -1 } +set skip_ret [skip_debuginfod_tests] +if { $skip_ret < 0 } { + switch $skip_ret { + -1 { + untested "does not work on remote host" + } + -2 { + untested "cannot find debuginfo" + } + -3 { + untested "cannot find curl" + } + -4 { + untested "GDB was not configured with debuginfod" + } + } + return -1 +} set sourcetmp [standard_output_file tmp-${srcfile}] set outputdir [standard_output_file {}] --- a/gdb/testsuite/lib/debuginfod-support.exp +++ b/gdb/testsuite/lib/debuginfod-support.exp @@ -18,17 +18,16 @@ # Return true if the debuginfod tests should be skipped, otherwise, return # false. proc skip_debuginfod_tests {} { - if [is_remote host] { - return true + if { [is_remote host] } { + return -1 } if { [which debuginfod] == 0 } { - return true + return -2 } if { [which curl] == 0 } { - untested "cannot find curl" - return true + return -3 } # Skip testing if gdb was not configured with debuginfod. @@ -39,10 +38,10 @@ proc skip_debuginfod_tests {} { if { [string first "with-debuginfod" \ [eval exec $::GDB --quiet $::INTERNAL_GDBFLAGS \ --configuration]] == -1 } { - return true + return -4 } - return false + return 0 } # Create two directories within the current output directory. One directory ================================================================= Best Regards, Enze