From patchwork Fri Oct 20 09:21:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 13430356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 866ABC001DF for ; Fri, 20 Oct 2023 09:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376572AbjJTJXB (ORCPT ); Fri, 20 Oct 2023 05:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376625AbjJTJWs (ORCPT ); Fri, 20 Oct 2023 05:22:48 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF88D7B; Fri, 20 Oct 2023 02:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697793742; x=1729329742; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=gMmsR6/ENqtT3Uvb9ko3vE65+B2JJ9QgLROGyaGVV0A=; b=B58OmVugLlpFBaDf0F7m5Brnh7ImOX90Z0rUcQGzbIy2Bh/vJnHgKVZp FNlm7UvfBqG/sq6A1gRCwITLUwNxTjAEhbKj4drE9jDR5UQnt08Uq3SCU FqYrkD02TaVuUTJuQAA7JJuvSIPK2K7p+xLmC5Jqi/URp4KfAeUowhB1p z+P6EFb3Up5KUscFPdB4z3P7d2R4xZG3Gg8cEFIOkcsWd+oGfyZ3CSdpc 0wQYUc9w70M1ZtBflx2NVTlRhQv93h/t1odO4qMR0ORHC+Oqc3dblt0UR 6q2zO1ZSLINquvst7zGlPZnkS36CsIDXl61bLDYzESxCwnOIN9jHE3nTm Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="390347422" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="390347422" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 02:22:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="823180631" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="823180631" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Oct 2023 02:22:20 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 20 Oct 2023 02:22:19 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 20 Oct 2023 02:22:19 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 20 Oct 2023 02:22:19 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 20 Oct 2023 02:22:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QRn9DfgpSJsRuTKB0AuONhdICCzl3XD0JQsr1/yYnjk0hTaMwHTNnPzvp5oGSBsuwnchicRtA1Giy1Y8c7XLenW2EKvXRWOo95bNZ8CN/ci7MIXjdzBgDtsbjOoRvPpgtJXDTXVv53FflCXWiI4I/xNvflBcbzlP5U0ZDU5GCijgI77TnQbPzyBmLWGBfOemMD0W05AvRzqJE2ly8V/rDXZJqoVRrdmgBaaoXYymIm33XSbfIEHS/3cLGaT0Y4s+y4kD9CK8Df9OsibFfREItUUOeXcuN+nCSZQq4WFPZHc9dsOI05kgoOpLg4zxG9ow8U3UryxnlwORqKndUwDGgw== 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=a4Avd15+BPlGH49zWpb2CGvOa5Ab1hUPzNBPlqAUlag=; b=Yy7SoNVZF6XlhHhO4PfSLqNSRkpGkjHXP/CZUxF6JwSZbrKbMs4CYE9K3cUOrhB8OBQvUQBfMJFaYHkHVl8VthDVYL97a2GXidpO2Ll259ot6tTwyqGoK3jH7ezZailNIy/briNoXroYripOGHYZpxgyBq5cEp1LKnZC8Fq4AX/7i3arAIlv81m1LYhSrD3KqBvSbMHahTcoS75WeGcPGjR9rPYvXRCxsvc6I7yzpwwdPlIN0+yWSk3UagoMRASubvCEVW47E2d0AVdm+7V5EfiWRLdcIINv7dr5BAKc4xy/aIfw9xbjqYruC2sNLaazKdmoTVLslSFh1de90aZOXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by PH8PR11MB6877.namprd11.prod.outlook.com (2603:10b6:510:22b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 09:22:11 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::cc5d:d2c9:b39a:3de7]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::cc5d:d2c9:b39a:3de7%3]) with mapi id 15.20.6907.025; Fri, 20 Oct 2023 09:22:11 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= To: , , , , CC: Tom Rix , Nick Desaulniers , Nathan Chancellor , Johannes Berg , Anton Ivanov , Richard Weinberger , Jonathan Corbet , "David Gow" , Brendan Higgins , =?utf-8?q?Micha=C5=82_Winiarsk?= =?utf-8?q?i?= Subject: [PATCH 1/2] arch: um: Add Clang coverage support Date: Fri, 20 Oct 2023 11:21:58 +0200 Message-ID: <20231020092159.2486063-2-michal.winiarski@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231020092159.2486063-1-michal.winiarski@intel.com> References: <20231020092159.2486063-1-michal.winiarski@intel.com> X-ClientProxiedBy: WA2P291CA0010.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1e::16) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|PH8PR11MB6877:EE_ X-MS-Office365-Filtering-Correlation-Id: da00d876-bd90-499e-33e0-08dbd14e0a63 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i5eBQJ9+Ow/AbgV1igtYwYU9QHKkgZskxOr7OsHMYZLr8dXVPOkzRL7WgEmhE334hkALaGqZ/c5C/JPoBlqSHDTPjVQ9sPYlpcWNiDRlWIvAe3OgVaUOuSXuXwuWV1SoJEraFUezBztnpCxMEAmX9ZybHE6sxbN2Xf0XNHXprU18+bsYM4IIxRsZs4dRraUX6YsuAAlEr9d78N3UAS28QknWN/IACIe6zbLZ82eFHl+gUIlj/J5OtJyTkl0jf77zKAZ1BDKwsWmUmx56D37rGmW1aTJn+vPcAO7WfaxLxR/k1wX/KZlB0E+u84HDSrjWbym3/m10huJd4230RAPF/l2bzR6DWIaE2O88LinzXNd1pIAEML3kADGci6c8Wg0CiFtYUQjG9CGYk/YxEVfDrql5f9cc3IL0qoW6xEFhMByZwKOILd/mBDF3uz0bP3/I8z7aJF4Q2IkewY+DjfZcmw16sBAPt1mQC7Qj5rH0gvSxr/mslm0B6TpVVPPY50EoVi4w8Lw1vca6KA/YZk/WXrClcY+rdZLtemz5hIj9YluI6/OTGni3kKFrwrW+p46l X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5373.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(396003)(346002)(366004)(136003)(376002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(2906002)(5660300002)(82960400001)(36756003)(86362001)(4744005)(7416002)(26005)(478600001)(6506007)(6486002)(316002)(2616005)(1076003)(6512007)(8676002)(4326008)(107886003)(8936002)(41300700001)(6666004)(54906003)(66946007)(66556008)(66476007)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?epqGn1opyExrycVtcNy9qYbYknzs?= =?utf-8?q?gu+mvKRcDCrjsCoyx1Ob9veD2xP6gkifisjt10szKSD9YP0Wj2iZtSvSS0Hnydmo1?= =?utf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2u7L7H0RBr9HJnUrUcwlMVYxrPr1qDzaiJsHn6JIcZo7jKNcBF+JlbEzmHwR2nwdt?= =?utf-8?q?KE59NdEki9A4V3HmK3Lope9XVEww3IWT0Jxe/QMxWN2/yGa59hSGb+2Bt1DLtPu2B?= =?utf-8?q?ElCja6kMU7TZfCT26S6xr4vVo89gnvp/0eh+VUUmwAAp5M954Av2Jvp+3ZhhVnGLi?= =?utf-8?q?vG1l2ngGgntPRRsuwkl3r3cU8NyreQdvAZa+H7QQrftoDszBAdkIIrB0tzU9U7n+L?= =?utf-8?q?NNed3Lbk9NW80asgTqCDSIres/A3N79FZURauHBAHelifg73oWfVa+k28M2H9+3uN?= =?utf-8?q?Xe0A6wibHFjU6LgPDqKjKY+YThP0uCIZHunGGQyoQ5kNWpOfxyL2vfSNVckFQBSHL?= =?utf-8?q?+isyHsAJ+yRA7tN3Aqoud9tAs2KNhhc76/fr75FZNMYkibtuAFjt/Qw4LdrbDw7wl?= =?utf-8?q?atUYKvi6YHy2l4Xc5WgAH1fqCFjaYS5y5Iq/cyPITkjLBdg9wyFsZUI64sJt3m6ua?= =?utf-8?q?tgHKAaOsC1Ek9s2ZDwNhQV7tKOdr0jMwN/kfta14tRWhS8Thnn+xWZSDp3L9tUDeO?= =?utf-8?q?qcj676yIhZGLolTBadUuSDwaSw+zBV9ayA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: da00d876-bd90-499e-33e0-08dbd14e0a63 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 09:22:11.6099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dVn5He83dNFOu/VJR6CJjv705GiBe0ttpLa10jWdvZCM/lM5GDUxLSHRomRHq8G0D6hTvfikfm6b+jbTl37AKeyj13Xe8S7Ugjl6a3suS6g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6877 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Clang uses a different set of command line arguments for enabling coverage. Signed-off-by: Michał Winiarski Tested-by: David Gow --- arch/um/Makefile-skas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/um/Makefile-skas b/arch/um/Makefile-skas index ac35de5316a6..67323b028999 100644 --- a/arch/um/Makefile-skas +++ b/arch/um/Makefile-skas @@ -4,7 +4,12 @@ # GPROF_OPT += -pg + +ifdef CONFIG_CC_IS_CLANG +GCOV_OPT += -fprofile-instr-generate -fcoverage-mapping +else GCOV_OPT += -fprofile-arcs -ftest-coverage +endif CFLAGS-$(CONFIG_GCOV) += $(GCOV_OPT) CFLAGS-$(CONFIG_GPROF) += $(GPROF_OPT) From patchwork Fri Oct 20 09:21:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 13430357 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB2D0C004C0 for ; Fri, 20 Oct 2023 09:23:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376552AbjJTJXC (ORCPT ); Fri, 20 Oct 2023 05:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376761AbjJTJWt (ORCPT ); Fri, 20 Oct 2023 05:22:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28F11726; Fri, 20 Oct 2023 02:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697793742; x=1729329742; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=1m5rhtKzGFKo17wJSpmLAnTXQJF+wAV+CBZeDs8PfH4=; b=IB6xhURK1q2qJlzIEJdupchUUbAiJVr5MNdzeI9dg2enoU+zfEgNBD9K QuNP1Ab6SyeIyvXjEwKC0J1ENdrsCnWWPgJlEHoJ+scv0OBfyTfcvNvGZ PfDEEH83mT/eGrtRu6h+EZhFAxHPOWxi0MOQooAI1JvRYBxOsxRvG8jns hw2zePp5mciTV0lAnWDHgC/inb0VBza7WBpYA32D6qAUGM/nkzCrjyTzO XH205ehgqK9dINyH3p2HTyIyNHz2p9iM+8gvAxMh0TVQGDjYBjpWI1fm0 KmxoKoobWeMqCyyFwTZhsbjxV0z6NXFttzXEf4IgQIxnwzC9p701MDcq5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="450690376" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="450690376" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 02:22:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="1088690975" X-IronPort-AV: E=Sophos;i="6.03,238,1694761200"; d="scan'208";a="1088690975" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Oct 2023 02:22:21 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 20 Oct 2023 02:22:20 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 20 Oct 2023 02:22:20 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 20 Oct 2023 02:22:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b23UDiyjoOXtpJIjj50/IJwcCyT0EEexAiPY6oxNs8YOsfw5jyOp+spnlMmQKrJrQhSrv9Rc5GGH58MZKuVbE4iOkUB+zKNhOHcDdf/HBWsYEr8a0Mk55gbVkTkRzCU9WNK58FGy8umiU5miEcJW86WW/GV6N+RBPgeglZhNUWFRYkeus9WP3FqJwnDkyPem5ehNgkT4u9vDHsVbHVfTmjUSBbc5o87XCsYk4YHsSag1N61ZDjDmN9PSh8f5lSyINXqnTl5Ik0B6wy6AGJxIg4KMBwRuvZ3Uh+NGdUhkdrQkOjqiEIUed9rhZ1RP5Q1yQzLessJAn08sBpfdsOKgFg== 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=fWHWOug2betCR+iG4WmIhP4k/VBkTB1sRifIfTpQJG4=; b=E5vtZcP5mnqBE0rh4qzZ3+werrf3PmXItlAkEAh8/F9ko0XYfzQX1h4thHrwJSm4+RsUJDmt0VHbf9d0n56EG9RP+oSukE5NPPFQwQ4JEI0l5mjP12iaHyotCMTYZlKuRvTSyxpIEsxdeQtvbZvgC0aIGNHJ9zLaD1KQRmMvdgZ8iZczhh+1y188db/awlLX+Xx3bTJvY/MCwxtVfADVRXWxJG49n/2t+kiymTUqf6CCR7dBKJkfQPYscreigXIorvUMzL+8PlZk1uAliR9Ec3wLS0DOzc5b0xm7DRJnBfyM6w8URbbxYk5e+VFxZcr14REgc2H3t3F6cmYQpJrlBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by PH8PR11MB6877.namprd11.prod.outlook.com (2603:10b6:510:22b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 09:22:15 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::cc5d:d2c9:b39a:3de7]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::cc5d:d2c9:b39a:3de7%3]) with mapi id 15.20.6907.025; Fri, 20 Oct 2023 09:22:15 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= To: , , , , CC: Tom Rix , Nick Desaulniers , Nathan Chancellor , Johannes Berg , Anton Ivanov , Richard Weinberger , Jonathan Corbet , "David Gow" , Brendan Higgins , =?utf-8?q?Micha=C5=82_Winiarsk?= =?utf-8?q?i?= Subject: [PATCH 2/2] Documentation: kunit: Add clang UML coverage example Date: Fri, 20 Oct 2023 11:21:59 +0200 Message-ID: <20231020092159.2486063-3-michal.winiarski@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231020092159.2486063-1-michal.winiarski@intel.com> References: <20231020092159.2486063-1-michal.winiarski@intel.com> X-ClientProxiedBy: FR3P281CA0186.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a4::13) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|PH8PR11MB6877:EE_ X-MS-Office365-Filtering-Correlation-Id: 29a3d30d-4f25-4277-7e91-08dbd14e0c74 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xvy61vmBV0br+JEAmhc0/7T31+IpQjEb6zWbITG+gbqLfQq0Bvu8O+M8W0Vojax3arpkxDcrUuGufN3arELv5cSMwtXMEtzOCL9lv1MQvpQpOePXLSnlSKXtE0Cm5ocf2GS08TBIY3XPCJNFF9i9ylodgJl9vQhNdb4+f+FS3tap2H0x8Y80xYT2ooT1wsK3PdqH3Ys94NWES8Xdj84fdHOx0noV8F5pGW5hHBUqS+d13nPlZYwOXEB43wGN3khwX1tYEvJMZ0qLPmjG4vYbxq4LbdrU2wtuJnWXfQxkPMWXxBI9OXPbM+XoVbfs0BFXFv4z8CdorkM+Yk+i3kOKiy3EbDQwvJAsPil/wl6tpAjpFmBhHVWIq76ESmp7tZt/OPCJ3LTeRiogQE6F+c6Fmbj2VuVjXe427tGzWChB12ooQLpm2P4rXhS3OiC2+tefgXUtqH5o1VmV6pxj0dz2wvGmxOsqbo3B4hF8IwdSwM3qv2ZOfPoW3/dcW6QGHqWehuIgrB0HFtsxslBIFhLbYELwz5VnrHcSZDQDPbznA+eyXRopudQFe65Nr/2nLvA9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5373.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(396003)(346002)(366004)(136003)(376002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(2906002)(5660300002)(82960400001)(36756003)(86362001)(7416002)(26005)(478600001)(83380400001)(6506007)(6486002)(316002)(2616005)(1076003)(6512007)(8676002)(4326008)(107886003)(8936002)(41300700001)(6666004)(54906003)(66946007)(66556008)(66476007)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Bv3X0OHlu4epImNImGoY5FLJ1qHr?= =?utf-8?q?Wel40YSJhmZWS0i6a2649AV7P5LKdO88GrbeVO6WyBSx6t5zKUhPYi2rDo+S9j8Mh?= =?utf-8?q?cT6qIOamARMCZh7Rvea2/Qi/J3vKFwWPRd2haBwyCrShZF5jIXO1kfjSdRFzlv35b?= =?utf-8?q?wAb5TaluEUI7GtK49wgSanSnuk6OMTCrqxZk8V2y+tnvFZalD6Rj2ItGbMvpIjG/3?= =?utf-8?q?SrXZoTF3nHlIX37PT3O+nlGW6a1/+92QW+G7ue7HwrtyWMgT9/ePFRHZWZUg9jjr2?= =?utf-8?q?yPFTkfB0hB48TL3pEA0FBIkduzDJO+EI2EsQoKYg3u+rime0pRcJOkJw3z5zLUzPw?= =?utf-8?q?sabLHz/gKeS86TQHZXq1Rf0oANyqwd5NEExqmZcsrx+6WAUa7LCA5ZMBNajXUrcZO?= =?utf-8?q?JcSnPqLvQKucRYpVxqH9wf1j4Uf1upTzxf5Oge72T7Vln9yK+jfak5sxs5LGRStr+?= =?utf-8?q?gyDp3nwECrbNCVZdIicpuF4xBumc2prsYtGfxllOJW50xiQT25BwhX9mcqQGlJ0mM?= =?utf-8?q?ZziuZYprFAMPZyunI7Fcy5MAGWSvaiTbRFQPlDCZ/cRNd4qplMCSYHixDecb71w41?= =?utf-8?q?CMzs8OTNfpQf2MhLFL6Vjsjjz7nT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ipypAwqMYicN6HyycV6BghdKq5B6cvYI?= =?utf-8?q?GWggqj4M7mirfCdqERAFYvlvymIzf5TikA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 29a3d30d-4f25-4277-7e91-08dbd14e0c74 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 09:22:15.0725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LJlSKd8oASG7LkW35fZmY9uK4NiH672ltyhIYqAWwnjTA8MDxRVwwIR1dZ/dFt8e4pLE18qqTOiIGI4stCI3Kk/NZ6z5/uugmcT/mrZ6+XQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6877 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org LLVM-based toolchain is using a different set of tools for coverage. Add an example that produces output in lcov format. Signed-off-by: Michał Winiarski Reviewed-by: David Gow --- Documentation/dev-tools/kunit/running_tips.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/dev-tools/kunit/running_tips.rst b/Documentation/dev-tools/kunit/running_tips.rst index 766f9cdea0fa..9f69c122dee7 100644 --- a/Documentation/dev-tools/kunit/running_tips.rst +++ b/Documentation/dev-tools/kunit/running_tips.rst @@ -139,6 +139,17 @@ If your installed version of gcc doesn't work, you can tweak the steps: $ ./tools/testing/kunit/kunit.py run --make_options=CC=/usr/bin/gcc-6 $ lcov -t "my_kunit_tests" -o coverage.info -c -d .kunit/ --gcov-tool=/usr/bin/gcov-6 +Alternatively, LLVM-based toolchain can also be used: + +.. code-block:: bash + + # Build with LLVM and append coverage options to the current config + $ $ ./tools/testing/kunit/kunit.py run --make_options LLVM=1 --kunitconfig=.kunit/ --kunitconfig=tools/testing/kunit/configs/coverage_uml.config + $ llvm-profdata merge -sparse default.profraw -o default.profdata + $ llvm-cov export --format=lcov .kunit/vmlinux -instr-profile default.profdata > coverage.info + # The coverage.info file is in lcov-compatible format and it can be used to e.g. generate HTML report + $ genhtml -o /tmp/coverage_html coverage.info + Running tests manually ======================