From mboxrd@z Thu Jan 1 00:00:00 1970 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 86D80C433FE for ; Mon, 28 Mar 2022 18:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245392AbiC1TAH (ORCPT ); Mon, 28 Mar 2022 15:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245402AbiC1TAE (ORCPT ); Mon, 28 Mar 2022 15:00:04 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E0FAFD16 for ; Mon, 28 Mar 2022 11:58:19 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id g20so18037296edw.6 for ; Mon, 28 Mar 2022 11:58:19 -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; bh=Y7h2AchlhCAthHYHcLIlHiiUCH1u4tsKGd2lWHTZUlY=; b=mzL7CPaM/qH7HTC6bp0faYg2StoSqQkehQG7tEQFBD6MCSe3XcD+kHNFEbCTamS1Pw qumiplt3iKPQUj0cqZQ1kw3OIBmh4MtZBIQSgNDRgAclRYsb1/f0hyX6ry0Z4598KQwu oKmvQUQq5Y6EgdRP/JknK0Xx+pa9BsiZkYMScUwrUdgADuZbpfdM2YWBWBEJjv2cmp/Q YLIIaK9aKIX3ZAtI/NHqT8c0bXXpSU231LBgnUIOiPaogDDWWNt221MuVZWz/ufUeRN0 bwwAh9f7pWf/yo3yreuykfHUearzuagnk5PqlE74yVTBBbCA8MmNNNEF7nvrlIy9byBd Hx0Q== 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; bh=Y7h2AchlhCAthHYHcLIlHiiUCH1u4tsKGd2lWHTZUlY=; b=xji2yZx9BX7jNIz+/97gqiVfdAYct9d3CtaPdGrEuMiZqs/zbsWeIsS7xaEn2nGGcV uvxYKwTQMFqgS6g4hMWdXWvbfGBVCzbA/88yJ7cV4m5n7EduU0V1GScZFIJs/CRdz/3B 4i0yS4JvAAibLAv1O/n3b7xQ7vmWZFO4i4YLNWdKffHqBPtXM4gIcchFl0ho/n2ZfjdA bjOHFWguYtUxigP58kH+37lew6RhUCDM5vYFmbT4uQX9ePa7qO2U4Z8FdUDutbrJYgin qfH/zg0HmXGkwzcEAfobu7ZL0sjMcaQ8arvdhl+/RMxHotJM2V4kkKUnANTE183rMYu7 SO8Q== X-Gm-Message-State: AOAM532zovxRmazBMsHsVlcL/OCGH5H1MEgUvs8BAjD0v6ZzA8YnHJ/y Sw2w97/eBHij5yJmBQTmyWX40SDTZZgr/7pd/dWVoA== X-Google-Smtp-Source: ABdhPJyhJkHcV4gC2iZ87HQT2UlMmP4fn/UBsOPEcsgyAISFagHCmwwoTGCGuHLFwOJv6MS2vb9mQGfOkes3PzUe8Yk= X-Received: by 2002:a05:6402:4302:b0:419:4be8:6493 with SMTP id m2-20020a056402430200b004194be86493mr18086577edc.294.1648493897275; Mon, 28 Mar 2022 11:58:17 -0700 (PDT) MIME-Version: 1.0 References: <20220326003356.487828-1-dlatypov@google.com> In-Reply-To: From: Daniel Latypov Date: Mon, 28 Mar 2022 13:58:06 -0500 Message-ID: Subject: Re: [PATCH] Documentation: kunit: update kconfig options needed for UML coverage To: Brendan Higgins Cc: David Gow , Kees Cook , Linux Kernel Mailing List , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan , maxime@cerno.tech Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 11:54 AM 'Brendan Higgins' via KUnit Development wrote: > > On Mon, Mar 28, 2022 at 12:35 PM Daniel Latypov wrote: > > > > On Fri, Mar 25, 2022 at 9:56 PM David Gow wrote: > > > > > > > > > > > > > # Append coverage options to the current config > > > > - $ echo -e "CONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_INFO=y\nCONFIG_GCOV=y" >> .kunit/.kunitconfig > > > > + $ echo -e "CONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\nCONFIG_GCOV=y" >> .kunit/.kunitconfig > > > > $ ./tools/testing/kunit/kunit.py run > > > > > > Would we want to instead use a chain of --kconfig_add arguments? (I > > > think there are advantages either way...) > > > > I've been considering this ever since the --kconfig_add patch was accepted. > > It's more compatible w/ commands using --kunitconfig, but it also > > looks very verbose. > > E.g. it looks like > > > > $ tools/testing/kunit/kunit.py run --make_options=CC=/usr/bin/gcc-6 > > --kconfig_add=CONFIG_DEBUG_INFO=y > > --kconfig_add=CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y > > --kconfig_add=CONFIG_GCOV=y > > I don't think it's *that* much more verbose, but I see your point. I > personally prefer this, but not enough to argue about it. I personally prefer it too, but I'm biased as the person who added --kconfig_add. They're both ugly enough I'd figured I'd save the bikeshedding for another patch. > > > Neither looks very appealing to me, so I've just kept it as-is for now. > > > > Maybe there's something we can do to make this easier (e.g. allowing > > --kunitconfig to be repeated and mergable)? > > I would like --kunitconfig to be repeadable and mergable. Ack. There's some things to consider first. 1. This will conflict w/ https://patchwork.kernel.org/project/linux-kselftest/patch/20220226212325.2984807-1-dlatypov@google.com/, so I'm going to wait until that gets merged first. 2. some kconfigs can be incompatible (e.g. these options only work on UML, can't combine w/ a non-UML compatible file) How do we make this less of a footgun? We'd talked about how it'd be nice if kconfig/"make olddefconfig" could print out *why* options get dropped (either they're not visible, have unmet deps, etc.). If we had that, I'd feel more comfortable w/ repeatable kunitconfig. 3. People have the ability to do this already if they're really sure it's safe $ cat | ./tools/testing/kunit/kunit.py run --kunitconfig=/dev/stdin 4. are we committed to supporting a "uml_coverage.kunitconfig" file? As shown by the existence of this patch, we've let it get broken for a bit, at least against linux-next (afaik, it was working on torvalds/master up until the 5.18 window opened and we had some patches reworking CONFIG_DEBUG_INFO). These instructions exist so others don't have to try and re-figure out the steps/workarounds. But they're not more formally "part of KUnit" since no one has had the expertise to maintain it (and fix issues like the reliance on gcc-6), etc. Creating a kunitconfig file for this will further imply ownership.