Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp588282iog; Fri, 24 Jun 2022 09:46:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLMPSQFVwlhxN5VJvG3BC0thINjzCrWHfpP2ahHdOkhAfF323u+SUGeHsz8DU9cGKZHivq X-Received: by 2002:a17:90b:4382:b0:1ea:f4b6:1e29 with SMTP id in2-20020a17090b438200b001eaf4b61e29mr4985631pjb.159.1656089171069; Fri, 24 Jun 2022 09:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656089171; cv=none; d=google.com; s=arc-20160816; b=VAO/og8lDxdSthjddZSczBXbXn29s9l6++XeHVRMnL8LaquymNU74c/pQH9ooJIMAD 4eR8NdDghlzWIyaMNRXt0YPeAOGOwGz03CtQAAcppkELSP+8lzYl54E+69DAxRko9tnj MQUBE/+7Aup1OP1d8zaqlcwWzEVoijhxfr7m+ULem+qscmwy4XUQugGJw1XrRwWtvLaz N/eyl+sdHEiJ1FnTxbuFuvxru3tz4mtUtda/hp/CzLt49J4Z4R8Tp3NB8Fw3EU2UPQuF /GviuF+KSH4bEcjfVnYAywr5W4seHehkaJvAe2Py7RX8JuuCHOja8a59sA6lVh/XCM8r ZRNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vwqux9HBY2fym7y4v9sHiA/8CttUFnIIaCazdcNKSY4=; b=D5j7mqVFEImkiAtMzBzcANoJ5OfxNAQDV2MGG3yFI+EXXCTPfgmEeTCXNzcGfLMHCQ 4RTuKp9iE90kOX9Yie6El3xdpyz1hWmjUy6NjLpZhPiEDm9aN1F70jo7Cf0xDKc1vCdw TZUsaVzpQ++zA5QSl23s9VMdnTRrG2mgoEz4fsHitE75O3ByOwQUcg1uGl1+6gwzjIe4 Qg1EgiWFiKGBOGSNdQ79durOa66/rO4IH8/ppQY7/FJgGjZT4afMI1vtWQgWm9Lwd63E pSfO8JeUEzujMRWtoO8D5BcPtiu+P/wNGWYWOCDWrhuJCK26k0z01HsSQ5FyuBsTV8LF qYbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s2y9G3Co; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l69-20020a638848000000b0040d299c23d8si3331327pgd.415.2022.06.24.09.45.58; Fri, 24 Jun 2022 09:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s2y9G3Co; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231408AbiFXQN2 (ORCPT + 99 others); Fri, 24 Jun 2022 12:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbiFXQN0 (ORCPT ); Fri, 24 Jun 2022 12:13:26 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2BC133EA0 for ; Fri, 24 Jun 2022 09:13:21 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id z11so4142048edp.9 for ; Fri, 24 Jun 2022 09:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vwqux9HBY2fym7y4v9sHiA/8CttUFnIIaCazdcNKSY4=; b=s2y9G3CoATFd63g+bc+p0PBExbmQzhhXtpMJSMqLFmAc+8H+VoxN5ZKfLuVWyyaPks OvOaBeatWiR/9Btp6HtadPnrZtBj7KS4q98+SNz728ys5bYfJNJ7nIAW6BPGr7/iNVE0 DdnEMMfOXqQ8JNKyj7MbIZVacdpXmAHBU275tK2969RwMOglJ6TeDpyJbrfPlFcEAl6Y C1Jf4CC5F5DZpKC8VAGTvd94SI29XyU48BQ/J9eergk2efSTCip6jL06w3BkoYE3glmG U/X3QyE7mBJf1MS9neexQl0XWhz0S7Q4hOl36Ty4Dp608U+P3dRIa0ANTG9u060xzZjJ hdjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vwqux9HBY2fym7y4v9sHiA/8CttUFnIIaCazdcNKSY4=; b=nNwjSgN21noOn3w1s4ssFQxmU7NfR2Ray1ZdoD3Bw77xsXYtH0lHjmYGF5j/eydErV O4J0Z0+TomFe4SACoHDYevSu7QQZgi+4eo+kN5NS1G2RrQRXU7RTX/sBMPVJudNuGil2 sa3lA+6kLf1XQoM1tnUi/Bv3Y9oH2CllIlyMNVi6ZLfEEUipJFPh4kizO+Y+kMcYzmoL n4xu4n7TFSjdH9nVswmxWYnwzb5aNtsYRY7CZ3u0Ni15YtiCrXSH/cUyGpM/u62fg59K V1KeFC3d2o8H3dJr7kb0ZQtLYi+paxZ9eWni6lnQyFvTldz8vHo5TilXqbayepoY687c Xxsg== X-Gm-Message-State: AJIora8tIpNDKlcb3I3vp9OYYOBOy6xibCtKtRwwtLwHdFV4cYTRKIJx 23lJz50bPsnc+PKL8L/S1DeOq0/YjVaO29H8wfSWjA== X-Received: by 2002:a05:6402:5188:b0:437:618c:c124 with SMTP id q8-20020a056402518800b00437618cc124mr3067044edd.233.1656087200237; Fri, 24 Jun 2022 09:13:20 -0700 (PDT) MIME-Version: 1.0 References: <20220624001247.3255978-1-dlatypov@google.com> <20220624001247.3255978-2-dlatypov@google.com> <6e46976d-bcf3-e7fd-cd30-bc25c67c5518@usp.br> In-Reply-To: <6e46976d-bcf3-e7fd-cd30-bc25c67c5518@usp.br> From: Daniel Latypov Date: Fri, 24 Jun 2022 09:13:08 -0700 Message-ID: Subject: Re: [PATCH 2/2] kunit: add coverage_uml.config to enable GCOV on UML To: =?UTF-8?B?TWHDrXJhIENhbmFs?= Cc: David Gow , Brendan Higgins , Linux Kernel Mailing List , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 7:12 AM Ma=C3=ADra Canal wrote= : > > On 6/24/22 04:55, 'David Gow' via KUnit Development wrote: > > On Fri, Jun 24, 2022 at 8:12 AM 'Daniel Latypov' via KUnit Development > > wrote: > >> > >> Now that kunit.py's --kunitconfig is repeatable, let's create a file t= o > >> hold the various options needed to enable coverage under UML. > >> > >> This can be used like so: > >> $ ./tools/testing/kunit/kunit.py run \ > >> --kunitconfig=3Dtools/testing/kunit/configs/all_tests_uml.config \ > >> --kunitconfig=3Dtools/testing/kunit/configs/coverage_uml.config \ > >> --make_options=3DCC=3D/usr/bin/gcc-6 > >> > >> which on my system is enough to get coverage working [1]. > >> > > It's great to see this coming to KUnit! As I was testing this series, I > wasn't able to generate the coverage stats with GCC11. I got a linking > error from ld: > > ERROR:root:/usr/bin/ld: > /usr/lib/gcc/x86_64-redhat-linux/11/libgcov.a(_gcov.o): in function > `mangle_path': > (.text+0x19f0): multiple definition of `mangle_path'; > fs/seq_file.o:/home/mairacanal/linux/.kunit/../fs/seq_file.c:441: first > defined here > collect2: error: ld returned 1 exit status > > By changing the name of the function to `seq_mangle_path`, it is > possible to solve the linking error and run the tests. But, anyway, no > .gcda files are generated. > > I checked out, and this is a known issue that was already discussed in > this series [1] (but I guess it didn't move on). There's the two main issues I knew about and that you noted. * no gcda files produced (gcc 7+) * seq_mangle_path (I don't remember, gcc 8 or 9+?) The latter can be worked around locally fairly easily, as you also found. The former is due to how the exit handlers work, iirc. I didn't know about [1], but it also mentions the exit handlers issue. However, from the sounds of [2], it seems like it might be a dead end for n= ow :\ So I wouldn't hold onto hope of using modern GCC versions with this. [2] https://lore.kernel.org/all/d36ea54d8c0a8dd706826ba844a6f27691f45d55.ca= mel@sipsolutions.net/ Daniel