Lines Matching full:kunit

4 KUnit Architecture
7 The KUnit architecture is divided into two parts:
15 The kernel testing library supports KUnit tests written in C using
16 KUnit. These KUnit tests are kernel code. KUnit performs the following
26 The test case is the fundamental unit in KUnit. KUnit test cases are organised
27 into suites. A KUnit test case is a function with type signature
28 ``void (*)(struct kunit *test)``. These test case functions are wrapped in a
34 Each KUnit test case receives a ``struct kunit`` context object that tracks a
35 running test. The KUnit assertion macros and other KUnit utilities use the
36 ``struct kunit`` context object. As an exception, there are two fields:
47 A KUnit suite includes a collection of test cases. The KUnit suites
72 with the KUnit test framework.
77 The KUnit executor can list and run built-in KUnit tests on boot.
84 macro. The KUnit executor iterates over the linker section array in order to
88 :alt: KUnit Suite Memory
90 KUnit Suite Memory Diagram
92 On the kernel boot, the KUnit executor uses the start and end addresses
95 `lib/kunit/executor.c <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/
100 In KUnit tests, some error classes do not affect other tests
101 or parts of the kernel, each KUnit case executes in a separate thread
103 `lib/kunit/try-catch.c <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib…
108 KUnit tests verify state using expectations/assertions.
110 ``KUNIT_{EXPECT|ASSERT}_<op>[_MSG](kunit, property[, message])``
122 ``void __noreturn __kunit_abort(struct kunit *)``.
140 KUnit prints the test results in KTAP format. KTAP is based on TAP14, see
142 KTAP works with KUnit and Kselftest. The KUnit executor prints KTAP results to
148 Each KUnit parameterized test is associated with a collection of
159 ``kunit_tool`` is a Python script, found in ``tools/testing/kunit/kunit.py``. It
162 You have two options for running KUnit tests: either build the kernel with KUnit
164 Documentation/dev-tools/kunit/run_manual.rst) or use ``kunit_tool``
165 (see Documentation/dev-tools/kunit/run_wrapper.rst).
170 (for example, ``tools/testing/kunit/qemu configs/powerpc.py``) contains
180 ``./tools/testing/kunit/kunit.py config`` and
185 To build a KUnit kernel from the current ``.config``, you can use the
186 ``build`` argument: ``./tools/testing/kunit/kunit.py build``.
191 If you already have built a kernel with built-in KUnit tests,
193 argument: ``./tools/testing/kunit/kunit.py exec``.