summaryrefslogtreecommitdiff
path: root/Documentation/dev-tools/kunit/index.rst
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2021-01-25 10:53:33 -0800
committerShuah Khan <skhan@linuxfoundation.org>2021-02-08 15:41:11 -0700
commit7c2b108cbe75f993d5e69d5205a01211fa33417d (patch)
tree48b02d365ad78773a4d6c4baadded11230f29f15 /Documentation/dev-tools/kunit/index.rst
parentc9ef2d3e3f3b3e56429f56bbea2d16882b054dbe (diff)
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>
Diffstat (limited to 'Documentation/dev-tools/kunit/index.rst')
-rw-r--r--Documentation/dev-tools/kunit/index.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/dev-tools/kunit/index.rst b/Documentation/dev-tools/kunit/index.rst
index c234a3ab3c34..848478838347 100644
--- a/Documentation/dev-tools/kunit/index.rst
+++ b/Documentation/dev-tools/kunit/index.rst
@@ -13,6 +13,7 @@ KUnit - Unit Testing for the Linux Kernel
api/index
style
faq
+ tips
What is KUnit?
==============
@@ -88,6 +89,7 @@ How do I use it?
================
* :doc:`start` - for new users of KUnit
+* :doc:`tips` - for short examples of best practices
* :doc:`usage` - for a more detailed explanation of KUnit features
* :doc:`api/index` - for the list of KUnit APIs used for testing
* :doc:`kunit-tool` - for more information on the kunit_tool helper script