linux/Documentation/dev-tools
Daniel Latypov 1f0e943df6 Documentation: kunit: provide guidance for testing many inputs
usage.rst goes into a detailed section about faking out classes, but
currently lacks wording about how one might idiomatically test a range
of inputs.

Add a new chapter for "Common Patterns" and group "Isolating behvaior"
and this new section under there.

Give an example of how one might test a hash function via macros/helper
funcs and a table-driven test and very briefly discuss pros and cons.

Also highlight the KUNIT_EXPECT_*_MSG() variants (that aren't mentioned
elsewhere [1]) which are particularly useful in these situations.

It is also criminally underused at the moment, only appearing in 2
tests (both written by people involved in KUnit).

[1] not even on
https://www.kernel.org/doc/html/latest/dev-tools/kunit/api/test.html

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2020-12-01 15:30:06 -07:00
..
kunit Documentation: kunit: provide guidance for testing many inputs 2020-12-01 15:30:06 -07:00
coccinelle.rst documentation: coccinelle: Improve command example for make C={1,2} 2020-08-11 10:37:38 -06:00
gcov.rst docs: gcov: replace links with HTTPS 2020-07-13 11:29:16 -06:00
gdb-kernel-debugging.rst Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
index.rst Linux 5.5-rc4 2019-12-30 08:10:51 +01:00
kasan.rst docs: kasan.rst: add two missing blank lines 2020-10-28 11:26:10 -06:00
kcov.rst kcov: collect coverage from interrupts 2020-06-04 19:06:20 -07:00
kcsan.rst kcsan: Re-add GCC as a supported compiler 2020-06-29 12:04:48 -07:00
kgdb.rst docs: kgdb.rst: fix :c:type: usages 2020-10-15 07:49:44 +02:00
kmemleak.rst mm,kmemleak-test.c: move kmemleak-test.c to samples dir 2020-10-13 18:38:27 -07:00
kselftest.rst doc: dev-tools: kselftest.rst: Update examples and paths 2020-10-07 07:59:24 -06:00
sparse.rst doc: add link to sparse's home page/internal docs 2020-07-05 14:32:56 -06:00
ubsan.rst