summaryrefslogtreecommitdiff
path: root/include/kunit/test.h
diff options
context:
space:
mode:
authorJoe Fradley <joefradley@google.com>2022-08-23 17:24:54 +0300
committerShuah Khan <skhan@linuxfoundation.org>2022-09-30 22:17:39 +0300
commitd20a6ba5e3be5f8d9002c6c5a5d4dfecc5dc48f9 (patch)
tree7798e5606a8ada2099d00eea123b5305d61da342 /include/kunit/test.h
parenta15cfa39e8cf9bb20d755978c2f25a9c427bf7b2 (diff)
downloadlinux-d20a6ba5e3be5f8d9002c6c5a5d4dfecc5dc48f9.tar.xz
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 'include/kunit/test.h')
-rw-r--r--include/kunit/test.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 840a2c375065..a6d6892b7957 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -228,6 +228,8 @@ static inline void kunit_set_failure(struct kunit *test)
WRITE_ONCE(test->status, KUNIT_FAILURE);
}
+bool kunit_enabled(void);
+
void kunit_init_test(struct kunit *test, const char *name, char *log);
int kunit_run_tests(struct kunit_suite *suite);