<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/Documentation/dev-tools/kunit/index.rst, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/Documentation/dev-tools/kunit/index.rst?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/Documentation/dev-tools/kunit/index.rst?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-30T19:21:08Z</updated>
<entry>
<title>Documentation: KUnit: update links in the index page</title>
<updated>2022-09-30T19:21:08Z</updated>
<author>
<name>Tales Aparecida</name>
<email>tales.aparecida@gmail.com</email>
</author>
<published>2022-08-22T02:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=79c18e37c4e645560f3952bf177a10b43e94bf88'/>
<id>urn:sha1:79c18e37c4e645560f3952bf177a10b43e94bf88</id>
<content type='text'>
Replace out-of-date external links with references to the kernel
documentation, replacing TAP webpage for the more appropriate KTAP
documentation and the UML webpage by its documentation.

Signed-off-by: Tales Aparecida &lt;tales.aparecida@gmail.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: KUnit: remove duplicated docs for kunit_tool</title>
<updated>2022-09-30T19:20:33Z</updated>
<author>
<name>Tales Aparecida</name>
<email>tales.aparecida@gmail.com</email>
</author>
<published>2022-08-22T02:26:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2327f7e956bab3e25f472e8c9d0aa6380970a91a'/>
<id>urn:sha1:2327f7e956bab3e25f472e8c9d0aa6380970a91a</id>
<content type='text'>
Delete "kunit-tool.rst" to remove repeated info from KUnit docs.
"What is kunit_tool?" was integrated into index.rst, the remaining
sections were moved into run_wrapper.rst and renamed as follows:

"What is a .kunitconfig?" -&gt; "Creating a ``.kunitconfig`` file"
"Getting Started with kunit_tool" -&gt; "Running tests with kunit_tool"
"Configuring, Building, and Running Tests" -&gt;
	"Configuring, building, and running tests"
"Running Tests on QEMU" -&gt; "Running tests on QEMU"
"Parsing Test Results" -&gt; "Parsing test results"
"Filtering Tests" -&gt; "Filtering tests"
"Other Useful Options" -&gt; "Running command-line arguments"

Signed-off-by: Tales Aparecida &lt;tales.aparecida@gmail.com&gt;
Reviewed-by: Sadiya Kazi &lt;sadiyakazi@google.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: Kunit: Add ref for other kinds of tests</title>
<updated>2022-09-30T19:19:11Z</updated>
<author>
<name>Tales Aparecida</name>
<email>tales.aparecida@gmail.com</email>
</author>
<published>2022-08-13T04:20:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3920c725cbff5c6db69d7077716987a93b0e6a9a'/>
<id>urn:sha1:3920c725cbff5c6db69d7077716987a93b0e6a9a</id>
<content type='text'>
Add an organic link to the "other kinds of tests" in the index page

Signed-off-by: Tales Aparecida &lt;tales.aparecida@gmail.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: KUnit: Rework writing page to focus on writing tests</title>
<updated>2021-12-23T19:49:43Z</updated>
<author>
<name>Harinder Singh</name>
<email>sharinder@google.com</email>
</author>
<published>2021-12-17T04:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9535743906345f02f7bea2469a2137509db0ac4c'/>
<id>urn:sha1:9535743906345f02f7bea2469a2137509db0ac4c</id>
<content type='text'>
We now have dedicated pages on running tests. Therefore refocus the
usage page on writing tests and add content from tips page and
information on other architectures.

Signed-off-by: Harinder Singh &lt;sharinder@google.com&gt;
Reviewed-by: Tim Bird &lt;tim.bird@sony.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Link: https://lore.kernel.org/r/20211217044911.798817-6-sharinder@google.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: kunit: Reorganize documentation related to running tests</title>
<updated>2021-12-23T19:49:43Z</updated>
<author>
<name>Harinder Singh</name>
<email>sharinder@google.com</email>
</author>
<published>2021-12-17T04:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=46201d47d6c4be594c1d57b7f3251c371626a9c4'/>
<id>urn:sha1:46201d47d6c4be594c1d57b7f3251c371626a9c4</id>
<content type='text'>
Consolidate documentation running tests into two pages: "run tests with
kunit_tool" and "run tests without kunit_tool".

Signed-off-by: Harinder Singh &lt;sharinder@google.com&gt;
Reviewed-by: Tim Bird &lt;tim.bird@sony.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Link: https://lore.kernel.org/r/20211217044911.798817-5-sharinder@google.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: KUnit: Added KUnit Architecture</title>
<updated>2021-12-23T19:49:06Z</updated>
<author>
<name>Harinder Singh</name>
<email>sharinder@google.com</email>
</author>
<published>2021-12-17T04:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bc145b370c11b92e497315f54636253f5af4323a'/>
<id>urn:sha1:bc145b370c11b92e497315f54636253f5af4323a</id>
<content type='text'>
Describe the components of KUnit and how the kernel mode parts
interact with kunit_tool.

Signed-off-by: Harinder Singh &lt;sharinder@google.com&gt;
Co-developed-by: Marco Elver &lt;elver@google.com&gt;
Signed-off-by: Marco Elver &lt;elver@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Link: https://lore.kernel.org/r/20211217044911.798817-4-sharinder@google.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: KUnit: Rewrite main page</title>
<updated>2021-12-23T19:46:20Z</updated>
<author>
<name>Harinder Singh</name>
<email>sharinder@google.com</email>
</author>
<published>2021-12-17T04:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c6213f4a29b60d321ab2f2f20cdccd7604a7f95'/>
<id>urn:sha1:6c6213f4a29b60d321ab2f2f20cdccd7604a7f95</id>
<content type='text'>
Add a section on advantages of unit testing, how to write unit tests,
KUnit features and Prerequisites.

Signed-off-by: Harinder Singh &lt;sharinder@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Link: https://lore.kernel.org/r/20211217044911.798817-2-sharinder@google.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-kunit-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2021-07-02T19:58:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-07-02T19:58:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a48ad6e7a35dc3f3b521249204daf4c9427628e5'/>
<id>urn:sha1:a48ad6e7a35dc3f3b521249204daf4c9427628e5</id>
<content type='text'>
Pull KUnit update from Shuah Khan:
 "Fixes and features:

   - add support for skipped tests

   - introduce kunit_kmalloc_array/kunit_kcalloc() helpers

   - add gnu_printf specifiers

   - add kunit_shutdown

   - add unit test for filtering suites by names

   - convert lib/test_list_sort.c to use KUnit

   - code organization moving default config to tools/testing/kunit

   - refactor of internal parser input handling

   - cleanups and updates to documentation

   - code cleanup related to casts"

* tag 'linux-kselftest-kunit-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits)
  kunit: add unit test for filtering suites by names
  kasan: test: make use of kunit_skip()
  kunit: test: Add example tests which are always skipped
  kunit: tool: Support skipped tests in kunit_tool
  kunit: Support skipped tests
  thunderbolt: test: Reinstate a few casts of bitfields
  kunit: tool: internal refactor of parser input handling
  lib/test: convert lib/test_list_sort.c to use KUnit
  kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers
  kunit: Remove the unused all_tests.config
  kunit: Move default config from arch/um -&gt; tools/testing/kunit
  kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default
  kunit: Add gnu_printf specifiers
  lib/cmdline_kunit: Remove a cast which are no-longer required
  kernel/sysctl-test: Remove some casts which are no-longer required
  thunderbolt: test: Remove some casts which are no longer required
  mmc: sdhci-of-aspeed: Remove some unnecessary casts from KUnit tests
  iio: Remove a cast in iio-test-format which is no longer required
  device property: Remove some casts in property-entry-test
  Documentation: kunit: Clean up some string casts in examples
  ...
</content>
</entry>
<entry>
<title>docs: dev-tools: kunit: avoid using ReST :doc:`foo` markup</title>
<updated>2021-06-17T19:24:37Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2021-06-16T06:27:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=654a5bd0eadbef5f7196215b755dcecd965f11c1'/>
<id>urn:sha1:654a5bd0eadbef5f7196215b755dcecd965f11c1</id>
<content type='text'>
The :doc:`foo` tag is auto-generated via automarkup.py.
So, use the filename at the sources, instead of :doc:`foo`.

Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/6fde409079959a95b62b9b2692503608d7ff0dbd.1623824363.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: kunit: add tips for running KUnit</title>
<updated>2021-05-21T19:25:45Z</updated>
<author>
<name>Daniel Latypov</name>
<email>dlatypov@google.com</email>
</author>
<published>2021-04-14T22:22:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=11dbc62a73a7da9f3697e8ce83d07503c11dcabb'/>
<id>urn:sha1:11dbc62a73a7da9f3697e8ce83d07503c11dcabb</id>
<content type='text'>
This is long overdue.

There are several things that aren't nailed down (in-tree
.kunitconfig's), or partially broken (GCOV on UML), but having them
documented, warts and all, is better than having nothing.

This covers a bunch of the more recent features
* kunit_filter_glob
* kunit.py run --kunitconfig
* slightly more detail on building tests as modules
* CONFIG_KUNIT_DEBUGFS

By my count, the only headline features now not mentioned are the KASAN
integration and KernelCI json output support (kunit.py run --json).

And then it also discusses how to get code coverage reports under UML
and non-UML since this is a question people have repeatedly asked.

Non-UML coverage collection is no different from normal, but we should
probably explicitly call this out.

As for UML, I was able to get it working again with two small hacks.*
E.g. with CONFIG_KUNIT=y &amp;&amp; CONFIG_KUNIT_ALL_TESTS=y
  Overall coverage rate:
    lines......: 15.1% (18294 of 120776 lines)
    functions..: 16.8% (1860 of 11050 functions)

Note: this doesn't document --alltests since this is not stable yet.
Hopefully being run more frequently as part of KernelCI will help...

*Using gcc/gcov-6 and not using uml_abort() in os_dump_core().
I've documented these hacks in "Notes" but left TODOs for
brendanhiggins@google.com who tracked down the runtime issue in GCC.
To be clear: these are not issues specific to KUnit, but rather to UML.

Signed-off-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
