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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57CC0C3526D for ; Sat, 19 Dec 2020 16:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0FA4223A9C for ; Sat, 19 Dec 2020 16:12:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbgLSQLv (ORCPT ); Sat, 19 Dec 2020 11:11:51 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:33572 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbgLSQLu (ORCPT ); Sat, 19 Dec 2020 11:11:50 -0500 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 0BJGAkbb006938; Sun, 20 Dec 2020 01:10:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 0BJGAkbb006938 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1608394246; bh=lat0uiKUxd5PoVSVwVF/yONoUq8DBc+FK9c1SgCz/n4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mN4C+UlvPyWVROLtQYBaVIGJTFno0D1HTuJigrBgw1Y+9k/LpMVnmpN5kfuDxc8LL 1BoNjEwBjwsbkVV8C0pL8XPfHXH8R4rIls4Ie+B/gSYKYVr5d7Z+LD+/aNY2B+FkJj jUIHVlEKcBJlUYb5zwWnf+kC07BgNlKNNPElpuV1nmiE6sfLZzmkGoR/c/B26Z4w6X jN6myWNfrpLHrrphylNIBXFQSfuqLg6wXEOZYWDwn35Xdv+cwageYjAfPee+DfXX0W WE9hb3OufpXJAkkmG64O3mHznEfVXMVPiYApv3eAMvICz/C4Jtkr2FZDouaZZ0ltvx NDcdFl99WC+dA== X-Nifty-SrcIP: [209.85.215.171] Received: by mail-pg1-f171.google.com with SMTP id c22so3301456pgg.13; Sat, 19 Dec 2020 08:10:46 -0800 (PST) X-Gm-Message-State: AOAM532H1dp9qTDW+1iC5Ai9pw2hKzkUegewoltQ4ASHtvBnNBUL3J8f Q2N2Jt97Et3XxUfPE5VElQaK8STg4bmy6UpWeN4= X-Google-Smtp-Source: ABdhPJwaEL9DTLqbByNHyNky+r+lwsQWV2jCOg6YIv+t30w3ce0Brb7UMAn92ciokoZuz9KFvbJK2M3faC60G0jRKIw= X-Received: by 2002:a65:6a16:: with SMTP id m22mr8779173pgu.175.1608394245527; Sat, 19 Dec 2020 08:10:45 -0800 (PST) MIME-Version: 1.0 References: <20201208152857.2162093-1-geert+renesas@glider.be> <20201208152857.2162093-2-geert+renesas@glider.be> In-Reply-To: <20201208152857.2162093-2-geert+renesas@glider.be> From: Masahiro Yamada Date: Sun, 20 Dec 2020 01:10:08 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] Documentation/kbuild: Document COMPILE_TEST dependencies To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , Michal Marek , Jonathan Corbet , Arnd Bergmann , Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, Dec 9, 2020 at 12:29 AM Geert Uytterhoeven wrote: > > Document best practises for using COMPILE_TEST dependencies. > > Signed-off-by: Geert Uytterhoeven > --- > Documentation/kbuild/kconfig-language.rst | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst > index 1cf1aebdd6cdf8fa..2b746332d8aa6bce 100644 > --- a/Documentation/kbuild/kconfig-language.rst > +++ b/Documentation/kbuild/kconfig-language.rst > @@ -553,6 +553,17 @@ with "depends on m". E.g.:: Both applied to linux-kbuild. Thanks. I replaced the two-spaces between sentences because the majority in this file adopts one-space between sentences. (I still see some inconsistencies, though.) > > limits FOO to module (=m) or disabled (=n). > > +Compile-testing > +~~~~~~~~~~~~~~~ > +If a config symbol has a dependency, but the code controlled by the config > +symbol can still be compiled if the dependency is not met, it is encouraged to > +increase build coverage by adding an "|| COMPILE_TEST" clause to the > +dependency. This is especially useful for drivers for more exotic hardware, as > +it allows continuous-integration systems to compile-test the code on a more > +common system, and detect bugs that way. > +Note that compile-tested code should avoid crashing when run on a system where > +the dependency is not met. > + > Kconfig recursive dependency limitations > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > -- > 2.25.1 > -- Best Regards Masahiro Yamada