diff mbox series

[RFC,v2,08/10] docs: tests: Document kunit in general

Message ID 20231205184503.79769-9-Nikolai.Kondrashov@redhat.com
State New
Headers show
Series None | expand

Commit Message

Nikolai Kondrashov Dec. 5, 2023, 6:03 p.m. UTC
Add an entry on the complete set of kunit tests to the
Documentation/process/tests.rst, so that it could be referenced in
MAINTAINERS, and is catalogued in general.

Signed-off-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
---
 Documentation/process/tests.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/process/tests.rst b/Documentation/process/tests.rst
index cfaf937dc4d5f..0760229fc32b0 100644
--- a/Documentation/process/tests.rst
+++ b/Documentation/process/tests.rst
@@ -71,3 +71,26 @@  kvm-xfstests smoke
 
 The "kvm-xfstests smoke" is a minimal subset of xfstests for testing all major
 file systems, running under KVM.
+
+kunit
+-----
+
+:Summary: complete set of KUnit unit tests
+:Command: tools/testing/kunit/kunit.py run --alltests
+:Docs: https://docs.kernel.org/dev-tools/kunit/
+
+KUnit tests are part of the kernel, written in the C (programming) language,
+and test parts of the Kernel implementation (example: a C language function).
+Excluding build time, from invocation to completion, KUnit can run around 100
+tests in less than 10 seconds. KUnit can test any kernel component, for
+example: file system, system calls, memory management, device drivers and so
+on.
+
+KUnit follows the white-box testing approach. The test has access to internal
+system functionality. KUnit runs in kernel space and is not restricted to
+things exposed to user-space.
+
+In addition, KUnit has kunit_tool, a script (tools/testing/kunit/kunit.py)
+that configures the Linux kernel, runs KUnit tests under QEMU or UML (User
+Mode Linux), parses the test results and displays them in a user friendly
+manner.