diff options
author | Joe Fradley <joefradley@google.com> | 2022-08-23 07:24:54 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-09-30 13:17:39 -0600 |
commit | d20a6ba5e3be5f8d9002c6c5a5d4dfecc5dc48f9 (patch) | |
tree | 7798e5606a8ada2099d00eea123b5305d61da342 /lib/kunit/Kconfig | |
parent | a15cfa39e8cf9bb20d755978c2f25a9c427bf7b2 (diff) |
kunit: add kunit.enable to enable/disable KUnit test
This patch adds the kunit.enable module parameter that will need to be
set to true in addition to KUNIT being enabled for KUnit tests to run.
The default value is true giving backwards compatibility. However, for
the production+testing use case the new config option
KUNIT_DEFAULT_ENABLED can be set to N requiring the tester to opt-in
by passing kunit.enable=1 to the kernel.
Signed-off-by: Joe Fradley <joefradley@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/kunit/Kconfig')
-rw-r--r-- | lib/kunit/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig index 0b5dfb001bac..626719b95bad 100644 --- a/lib/kunit/Kconfig +++ b/lib/kunit/Kconfig @@ -59,4 +59,15 @@ config KUNIT_ALL_TESTS If unsure, say N. +config KUNIT_DEFAULT_ENABLED + bool "Default value of kunit.enable" + default y + help + Sets the default value of kunit.enable. If set to N then KUnit + tests will not execute unless kunit.enable=1 is passed to the + kernel command line. + + In most cases this should be left as Y. Only if additional opt-in + behavior is needed should this be set to N. + endif # KUNIT |