Lines Matching full:kunit

4 Tips For Running KUnit Tests
7 Using ``kunit.py run`` ("kunit tool")
18 ( cd "$(git rev-parse --show-toplevel)" && ./tools/testing/kunit/kunit.py run "$@" )
22 Early versions of ``kunit.py`` (before 5.6) didn't work unless run from
28 ``kunit.py run`` accepts an optional glob argument to filter tests. The format
35 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
36 $ ./tools/testing/kunit/kunit.py run 'sysctl*'
42 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
43 $ ./tools/testing/kunit/kunit.py run 'sysctl*.*write*'
55 ``kunit.py run`` (along with ``build``, and ``config``) supports a
60 E.g. kunit has one for its tests:
64 $ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit/.kunitconfig
71 $ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit
86 One alternative would be to have kunit tool recursively combine configs
97 $ ./tools/testing/kunit/kunit.py run --kernel_args=param=42 --kernel_args=param2=false
126 …$ ./tools/testing/kunit/kunit.py run --kunitconfig=.kunit/ --kunitconfig=tools/testing/kunit/confi…
127 # Extract the coverage information from the build dir (.kunit/)
128 $ lcov -t "my_kunit_tests" -o coverage.info -c -d .kunit/
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
147 …$ ./tools/testing/kunit/kunit.py run --make_options LLVM=1 --kunitconfig=.kunit/ --kunitconfig=too…
149 $ llvm-cov export --format=lcov .kunit/vmlinux -instr-profile default.profdata > coverage.info
157 Running tests without using ``kunit.py run`` is also an important use case.
208 $ modprobe kunit-example-test
214 failed (as of 5.13). But ``kunit.py parse`` would, see below.
219 depend on ``KUNIT=y`` in their ``Kconfig``'s, but this is an edge case
227 You can use ``kunit.py parse`` to parse dmesg for test output and print out
228 results in the same familiar format that ``kunit.py run`` does.
232 $ ./tools/testing/kunit/kunit.py parse /var/log/dmesg
248 ``/sys/kernel/debug/kunit/<suite>/results``.
253 $ modprobe kunit-example-test > /dev/null
254 $ cat /sys/kernel/debug/kunit/example/results
258 $ modprobe -r kunit-example-test
259 $ cat /sys/kernel/debug/kunit/example/results
260 /sys/kernel/debug/kunit/example/results: No such file or directory
267 The only vaguely KUnit-specific advice here is that you probably want to build
275 $ modprobe kunit-example-test
333 KTAP format). Note that attributes will be hidden by default in kunit.py output
360 kunit.py run "example" --list_tests_attr
363 This report can be accessed when running KUnit manually by passing in the
364 module_param ``kunit.action=list_attr``.
374 kunit.py run --filter speed=slow
382 kunit.py run --filter "speed>slow"
393 kunit.py run --filter "speed>slow, module=kunit_example_test"
396 You can use this filtering feature when running KUnit manually by passing
397 the filter as a module param: ``kunit.filter="speed>slow, speed<=normal"``.
402 running KUnit manually, use the module param ``kunit.filter_action=skip``.