Hi David,
On Sat, 27 Jun 2026 at 10:29, David Gow <[email protected]> wrote:
> Add a note to the Kconfig section of style.rst to use 'depends on' rather
> than 'selects' for dependencies, as this can cause users of
> CONFIG_KUNIT_ALL_TESTS to suddenly grow unexpected dependencies.
>
> Signed-off-by: David Gow <[email protected]>
Thanks for your patch!
> --- a/Documentation/dev-tools/kunit/style.rst
> +++ b/Documentation/dev-tools/kunit/style.rst
> @@ -164,9 +164,10 @@ This Kconfig entry must:
> * be visible only if ``CONFIG_KUNIT_ALL_TESTS`` is not enabled.
> * have a default value of ``CONFIG_KUNIT_ALL_TESTS``.
> * have a brief description of KUnit in the help text.
> -
> -If we are not able to meet above conditions (for example, the test is unable
> to
> -be built as a module), Kconfig entries for tests should be tristate.
> +* depend on the feature being tested, rather than selecting it (so that
> + enabling ``CONFIG_KUNIT_ALL_TESTS`` does not enable unrelated
> functionality).
> +* be ``tristate``, unless there is a specific reason that the test cannot be
> + built as a module.
The addition of the second bullet is not mentioned in the commit message
(but I strongly agree with adding it ;-)
>
> For example, a Kconfig entry might look like:
>
\
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds