Thread (131 messages) 131 messages, 12 authors, 2019-05-23

Re: [PATCH v2 07/17] kunit: test: add initial tests

From: Brendan Higgins <hidden>
Date: 2019-05-02 20:30:32
Also in: dri-devel, linux-devicetree, linux-fsdevel, linux-kbuild, linux-kselftest, linux-um, lkml, nvdimm

On Thu, May 2, 2019 at 3:58 AM Greg KH [off-list ref] wrote:
On Wed, May 01, 2019 at 04:01:16PM -0700, Brendan Higgins wrote:
quoted
Add a test for string stream along with a simpler example.

Signed-off-by: Brendan Higgins <redacted>
---
 kunit/Kconfig              | 12 ++++++
 kunit/Makefile             |  4 ++
 kunit/example-test.c       | 88 ++++++++++++++++++++++++++++++++++++++
 kunit/string-stream-test.c | 61 ++++++++++++++++++++++++++
 4 files changed, 165 insertions(+)
 create mode 100644 kunit/example-test.c
 create mode 100644 kunit/string-stream-test.c
diff --git a/kunit/Kconfig b/kunit/Kconfig
index 64480092b2c24..5cb500355c873 100644
--- a/kunit/Kconfig
+++ b/kunit/Kconfig
@@ -13,4 +13,16 @@ config KUNIT
        special hardware. For more information, please see
        Documentation/kunit/

+config KUNIT_TEST
+     bool "KUnit test for KUnit"
+     depends on KUNIT
+     help
+       Enables KUnit test to test KUnit.
+
+config KUNIT_EXAMPLE_TEST
+     bool "Example test for KUnit"
+     depends on KUNIT
+     help
+       Enables example KUnit test to demo features of KUnit.
Can't these tests be module?
At this time, no. KUnit doesn't support loading tests as kernel
modules; it is something we could add in in the future, but I would
rather not open that can of worms right now. There are some other
things I would like to do that would probably be easier to do before
adding support for tests as loadable modules.
Or am I mis-reading the previous logic?

Anyway, just a question, nothing objecting to this as-is for now.
Cool

Cheers!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help