[PATCH] Documentation: kunit: add description of kunit.enable parameter

0 views
Skip to first unread message

Yuya Ishikawa

unread,
Oct 20, 2025, 11:02:40 PMOct 20
to Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, linux-k...@vger.kernel.org, kuni...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, ishikaw...@jp.fujitsu.com, misono....@fujitsu.com
The current KUnit documentation does not mention the kunit.enable
kernel parameter, making it unclear how to troubleshoot cases where
KUnit tests do not run as expected.
Add a note explaining kunit.enable parmaeter. Disabling this parameter
prevents all KUnit tests from running even if CONFIG_KUNIT is enabled.

Signed-off-by: Yuya Ishikawa <ishikaw...@jp.fujitsu.com>
---
Documentation/dev-tools/kunit/run_manual.rst | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/dev-tools/kunit/run_manual.rst b/Documentation/dev-tools/kunit/run_manual.rst
index 699d92885075..98e8d5b28808 100644
--- a/Documentation/dev-tools/kunit/run_manual.rst
+++ b/Documentation/dev-tools/kunit/run_manual.rst
@@ -35,6 +35,12 @@ or be built into the kernel.
a good way of quickly testing everything applicable to the current
config.

+ KUnit can be enabled or disabled at boot time, and this behavior is
+ controlled by the kunit.enable kernel parameter.
+ By default, kunit.enable is set to 1 because KUNIT_DEFAULT_ENABLED is
+ enabled by default. To ensure that tests are executed as expected,
+ verify that kunit.enable=1 at boot time.
+
Once we have built our kernel (and/or modules), it is simple to run
the tests. If the tests are built-in, they will run automatically on the
kernel boot. The results will be written to the kernel log (``dmesg``)
--
2.47.3

David Gow

unread,
Oct 21, 2025, 2:50:21 AMOct 21
to Yuya Ishikawa, Brendan Higgins, Rae Moar, Jonathan Corbet, linux-k...@vger.kernel.org, kuni...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, misono....@fujitsu.com
On Tue, 21 Oct 2025 at 11:02, Yuya Ishikawa
<ishikaw...@jp.fujitsu.com> wrote:
>
> The current KUnit documentation does not mention the kunit.enable
> kernel parameter, making it unclear how to troubleshoot cases where
> KUnit tests do not run as expected.
> Add a note explaining kunit.enable parmaeter. Disabling this parameter
> prevents all KUnit tests from running even if CONFIG_KUNIT is enabled.
>
> Signed-off-by: Yuya Ishikawa <ishikaw...@jp.fujitsu.com>
> ---

Looks good to me, thanks!

Reviewed-by: David Gow <davi...@google.com>

Cheers,
-- David
Reply all
Reply to author
Forward
0 new messages