author: Alan Maguire <alan.maguire@oracle.com> 2020-01-06 22:28:22 +0000
committer: Shuah Khan <skhan@linuxfoundation.org> 2020-01-09 16:43:40 -0700
commit: 9fe124bf1b7788058ecfe5778fea1660b01e3e9c
parent: 1c024d45151b51c8f8d4749e65958b0bcf3e7c52
Commit Summary:
Diffstat:
3 files changed, 13 insertions, 2 deletions
diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig
index 9ebd5e6d15fd..065aa16f448b 100644
--- a/lib/kunit/Kconfig
+++ b/lib/kunit/Kconfig
@@ -3,7 +3,7 @@
#
menuconfig KUNIT
- bool "KUnit - Enable support for unit tests"
+ tristate "KUnit - Enable support for unit tests"
help
Enables support for kernel unit tests (KUnit), a lightweight unit
testing and mocking framework for the Linux kernel. These tests are
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index bc6e5e549e84..fab55649b69a 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -1,4 +1,6 @@
-obj-$(CONFIG_KUNIT) += test.o \
+obj-$(CONFIG_KUNIT) += kunit.o
+
+kunit-objs += test.o \
string-stream.o \
assert.o \
try-catch.o
diff --git a/lib/kunit/test.c b/lib/kunit/test.c
index 87b5cf1f0fa8..9242f932896c 100644
--- a/lib/kunit/test.c
+++ b/lib/kunit/test.c
@@ -486,3 +486,16 @@ void kunit_cleanup(struct kunit *test)
}
}
EXPORT_SYMBOL_GPL(kunit_cleanup);
+
+static int __init kunit_init(void)
+{
+ return 0;
+}
+late_initcall(kunit_init);
+
+static void __exit kunit_exit(void)
+{
+}
+module_exit(kunit_exit);
+
+MODULE_LICENSE("GPL v2");