From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 1/2] Documentation/kbuild: Document COMPILE_TEST dependencies
Date: Tue, 8 Dec 2020 16:28:56 +0100 [thread overview]
Message-ID: <20201208152857.2162093-2-geert+renesas@glider.be> (raw)
In-Reply-To: <20201208152857.2162093-1-geert+renesas@glider.be>
Document best practises for using COMPILE_TEST dependencies.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
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.::
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
next prev parent reply other threads:[~2020-12-08 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 15:28 [PATCH 0/2] Documentation/kbuild: Document COMPILE_TEST and platform dependencies Geert Uytterhoeven
2020-12-08 15:28 ` Geert Uytterhoeven [this message]
2020-12-08 15:44 ` [PATCH 1/2] Documentation/kbuild: Document COMPILE_TEST dependencies Arnd Bergmann
2020-12-19 16:10 ` Masahiro Yamada
2020-12-08 15:28 ` [PATCH 2/2] Documentation/kbuild: Document platform dependency practises Geert Uytterhoeven
2020-12-08 15:43 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201208152857.2162093-2-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).