Lines Matching +full:under +full:-
1 .. SPDX-License-Identifier: GPL-2.0
4 KUnit - Linux Kernel Unit Testing
29 if built-in, or load as a module. KUnit automatically flags and reports
31 :doc:`KTAP (Kernel - Test Anything Protocol) format</dev-tools/ktap>`.
42 KUnit follows the white-box testing approach. The test has access to
44 restricted to things exposed to user-space.
47 that configures the Linux kernel, runs KUnit tests under QEMU or UML
53 --------
55 - Provides a framework for writing unit tests.
56 - Runs tests on any kernel architecture.
57 - Runs a test in milliseconds.
60 -------------
62 - Any Linux kernel compatible hardware.
63 - For Kernel under test, Linux kernel version 5.5 or greater.
70 code under test. This is possible if the code under test is small and does not
75 ----------------
78 Arrange-Act-Assert. This is a great way to structure test cases and
81 - Arrange inputs and targets: At the start of the test, arrange the data
84 - Act on the target behavior: Call your function/code under test.
85 - Assert expected outcome: Verify that the result (or resulting state) is as
89 -----------------------
91 - Increases testing speed and development in the long run.
92 - Detects bugs at initial stage and therefore decreases bug fix cost
94 - Improves code quality.
95 - Encourages writing testable code.
97 Read also :ref:`kinds-of-tests`.
102 You can find a step-by-step guide to writing and running KUnit tests in
103 Documentation/dev-tools/kunit/start.rst
106 or to experiment with tools/testing/kunit/kunit.py and the example test under
107 lib/kunit/kunit-example-test.c