2021-01-19 23:55:40

by Daniel Latypov

[permalink] [raw]
Subject: [PATCH] KUnit: Docs: make start.rst example Kconfig follow style.rst

The primary change is that we want to encourage people to respect
KUNIT_ALL_TESTS to make it easy to run all the relevant tests for a
given config.

Signed-off-by: Daniel Latypov <[email protected]>
---
Documentation/dev-tools/kunit/start.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index 454f307813ea..560f27af4619 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -196,8 +196,9 @@ Now add the following to ``drivers/misc/Kconfig``:
.. code-block:: kconfig

config MISC_EXAMPLE_TEST
- bool "Test for my example"
+ tristate "Test for my example" if !KUNIT_ALL_TESTS
depends on MISC_EXAMPLE && KUNIT=y
+ default KUNIT_ALL_TESTS

and the following to ``drivers/misc/Makefile``:


base-commit: 146620506274bd24d52fb1c589110a30eed8240b
--
2.30.0.296.g2bfb1c46d8-goog


2021-02-06 03:15:43

by Brendan Higgins

[permalink] [raw]
Subject: Re: [PATCH] KUnit: Docs: make start.rst example Kconfig follow style.rst

On Tue, Jan 19, 2021 at 3:52 PM Daniel Latypov <[email protected]> wrote:
>
> The primary change is that we want to encourage people to respect
> KUNIT_ALL_TESTS to make it easy to run all the relevant tests for a
> given config.
>
> Signed-off-by: Daniel Latypov <[email protected]>

Reviewed-by: Brendan Higgins <[email protected]>