Lines Matching +full:speed +full:- +full:bin

1 .. SPDX-License-Identifier: GPL-2.0
11 --------------------------
15 .. code-block:: bash
18 ( cd "$(git rev-parse --show-toplevel)" && ./tools/testing/kunit/kunit.py run "$@" )
26 -------------------------
33 .. code-block:: bash
35 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
40 .. code-block:: bash
42 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
53 -----------------------
56 ``--kunitconfig`` flag. So if you have a set of tests that you want to run on a
62 .. code-block:: bash
64 $ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit/.kunitconfig
69 .. code-block:: bash
71 $ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit
82 files to make it possible to have a top-level config run tests from all
91 -------------------------------------
93 You can use ``--kernel_args`` to pass arbitrary kernel arguments, e.g.
95 .. code-block:: bash
97 $ ./tools/testing/kunit/kunit.py run --kernel_args=param=42 --kernel_args=param2=false
101 ------------------------------------------
109 documented in Documentation/dev-tools/gcov.rst.
113 .. code-block:: none
121 Putting it together into a copy-pastable sequence of commands:
123 .. code-block:: bash
126 …$ ./tools/testing/kunit/kunit.py run --kunitconfig=.kunit/ --kunitconfig=tools/testing/kunit/confi…
128 $ lcov -t "my_kunit_tests" -o coverage.info -c -d .kunit/
132 $ genhtml -o /tmp/coverage_html coverage.info
137 .. code-block:: bash
139 $ ./tools/testing/kunit/kunit.py run --make_options=CC=/usr/bin/gcc-6
140 $ lcov -t "my_kunit_tests" -o coverage.info -c -d .kunit/ --gcov-tool=/usr/bin/gcov-6
142 Alternatively, LLVM-based toolchains can also be used:
144 .. code-block:: bash
147 …$ ./tools/testing/kunit/kunit.py run --make_options LLVM=1 --kunitconfig=.kunit/ --kunitconfig=too…
148 $ llvm-profdata merge -sparse default.profraw -o default.profdata
149 $ llvm-cov export --format=lcov .kunit/vmlinux -instr-profile default.profdata > coverage.info
150 …# The coverage.info file is in lcov-compatible format and it can be used to e.g. generate HTML rep…
151 $ genhtml -o /tmp/coverage_html coverage.info
163 non-UML architectures.
166 Running built-in tests
167 ----------------------
175 .. code-block:: none
182 .. code-block:: none
189 ok 1 - example_simple_test
190 ok 1 - example
193 ------------------------
199 .. code-block:: none
206 .. code-block:: none
208 $ modprobe kunit-example-test
213 The ``modprobe`` will *not* have a non-zero exit code if any test
221 As of 5.13, the only difference is that ``current->kunit_test`` will
224 Pretty-printing results
225 -----------------------
230 .. code-block:: bash
236 ----------------------------
239 ``CONFIG_KUNIT_DEBUGFS`` to expose per-suite TAP-formatted results:
241 .. code-block:: none
251 .. code-block:: bash
253 $ modprobe kunit-example-test > /dev/null
258 $ modprobe -r kunit-example-test
263 --------------------------------
265 See Documentation/dev-tools/gcov.rst for details on how to do this.
267 The only vaguely KUnit-specific advice here is that you probably want to build
271 .. code-block:: bash
275 $ modprobe kunit-example-test
281 Test suites and cases can be marked with test attributes, such as speed of
286 -----------------------
294 .. code-block:: c
297 .speed = KUNIT_VERY_SLOW,
311 .. code-block:: c
314 .speed = KUNIT_VERY_SLOW,
330 --------------------
335 ``--raw_output`` flag. This is an example of how test attributes for test cases
338 .. code-block:: none
340 # example_test.speed: slow
346 .. code-block:: none
356 attributes, using the command line flag ``--list_tests_attr``:
358 .. code-block:: bash
360 kunit.py run "example" --list_tests_attr
367 ---------
369 Users can filter tests using the ``--filter`` command line flag when running
372 .. code-block:: bash
374 kunit.py run --filter speed=slow
380 .. code-block:: bash
382 kunit.py run --filter "speed>slow"
391 .. code-block:: bash
393 kunit.py run --filter "speed>slow, module=kunit_example_test"
397 the filter as a module param: ``kunit.filter="speed>slow, speed<=normal"``.
400 ``--filter_action=skip`` flag to skip filtered tests instead. These tests will be
405 ----------------------------
411 - Filtering always operates at a per-test level.
413 - If a test has an attribute set, then the test's value is filtered on.
415 - Otherwise, the value falls back to the suite's value.
417 - If neither are set, the attribute has a global "default" value, which is used.
420 --------------------------
422 ``speed``
424 This attribute indicates the speed of a test's execution (how slow or fast the
428 "slow", or "very_slow". The assumed default speed for tests is "normal". This
433 The macro ``KUNIT_CASE_SLOW(test_name)`` can be easily used to set the speed