diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-05-02 13:06:38 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-05-08 17:39:49 +0300 |
commit | 78227fa03c6854e8ca23911309c763d909653c6e (patch) | |
tree | 5532ae503672eca3e690662b38f8f0964a28583b | |
parent | e30f65c4b3d671115bf2a9d9ef142285387f2aff (diff) | |
download | linux-78227fa03c6854e8ca23911309c763d909653c6e.tar.xz |
Documentation: kunit: Modular tests should not depend on KUNIT=y
When the documentation was updated for modular tests, the dependency on
"KUNIT=y" was forgotten to be updated, now encouraging people to create
tests that cannot be enabled when the KUNIT framework itself is modular.
Fix this by changing the dependency to "KUNIT".
Document when it is appropriate (and required) to depend on "KUNIT=y".
Fixes: c9ef2d3e3f3b ("KUnit: Docs: make start.rst example Kconfig follow style.rst")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r-- | Documentation/dev-tools/kunit/start.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index c736613c9b19..9619a0440930 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -256,9 +256,12 @@ Now we are ready to write the test cases. config MISC_EXAMPLE_TEST tristate "Test for my example" if !KUNIT_ALL_TESTS - depends on MISC_EXAMPLE && KUNIT=y + depends on MISC_EXAMPLE && KUNIT default KUNIT_ALL_TESTS +Note: If your test does not support being built as a loadable module (which is +discouraged), replace tristate by bool, and depend on KUNIT=y instead of KUNIT. + 3. Add the following lines to ``drivers/misc/Makefile``: .. code-block:: make |