Skip to content

Commit

Permalink
Documentation: kunit: Update Kconfig parts for KUNIT's module support
Browse files Browse the repository at this point in the history
If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable
module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile
errors.  This commit updates the document for this.

Fixes: 9fe124b ("kunit: allow kunit to be loaded as a module")
Signed-off-by: SeongJae Park <[email protected]>
Reviewed-by: David Gow <[email protected]>
Reviewed-by: Brendan Higgins <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
sj-aws authored and shuahkh committed Oct 26, 2020
1 parent 7f32b10 commit f0b6203
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/dev-tools/kunit/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``:
config MISC_EXAMPLE_TEST
bool "Test for my example"
depends on MISC_EXAMPLE && KUNIT
depends on MISC_EXAMPLE && KUNIT=y
and the following to ``drivers/misc/Makefile``:

Expand Down
5 changes: 5 additions & 0 deletions Documentation/dev-tools/kunit/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@ Once the kernel is built and installed, a simple
...will run the tests.

.. note::
Note that you should make sure your test depends on ``KUNIT=y`` in Kconfig
if the test does not support module build. Otherwise, it will trigger
compile errors if ``CONFIG_KUNIT`` is ``m``.

Writing new tests for other architectures
-----------------------------------------

Expand Down

0 comments on commit f0b6203

Please sign in to comment.