Documentation: kunit: add tips.rst for small examples
authorDaniel Latypov <dlatypov@google.com>
Mon, 25 Jan 2021 18:53:33 +0000 (10:53 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 8 Feb 2021 22:41:11 +0000 (15:41 -0700)
commit7c2b108cbe75f993d5e69d5205a01211fa33417d
tree48b02d365ad78773a4d6c4baadded11230f29f15
parentc9ef2d3e3f3b3e56429f56bbea2d16882b054dbe
Documentation: kunit: add tips.rst for small examples

./usage.rst contains fairly long examples and explanations of things
like how to fake a class and how to use parameterized tests (and how you
could do table-driven tests yourself).

It's not exactly necessary information, so we add a new page with more
digestible tips like "use kunit_kzalloc() instead of kzalloc() so you
don't have to worry about calling kfree() yourself" and the like.

Change start.rst to point users to this new page first and let them know
that usage.rst is more of optional further reading.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kunit/index.rst
Documentation/dev-tools/kunit/start.rst
Documentation/dev-tools/kunit/tips.rst [new file with mode: 0644]