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>
This commit is contained in:
Joe Fradley
2022-08-23 07:24:54 -07:00
committed by Shuah Khan
parent a15cfa39e8
commit d20a6ba5e3
6 changed files with 48 additions and 0 deletions

View File

@@ -359,6 +359,7 @@ class LinuxSourceTree:
args = []
if filter_glob:
args.append('kunit.filter_glob='+filter_glob)
args.append('kunit.enable=1')
process = self._ops.start(args, build_dir)
assert process.stdout is not None # tell mypy it's set