Skip to content

Commit 9df072c

Browse files
sulixJonathan Corbet
authored andcommitted
Documentation: kunit: Fix cross-referencing warnings
The Architecture chapter of the KUnit documentation tried to include copies of the kernel-doc for a couple of things, despite these already existing in the API documentation. This lead to some warnings: architecture:31: ./include/kunit/test.h:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66. Declaration is '.. c:struct:: kunit_case'. architecture:163: ./include/kunit/test.h:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217. Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'. architecture.rst:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66. Declaration is '.. c:struct:: kunit_case'. architecture.rst:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217. Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'. Get rid of these, and cleanup the mentions of the struct and macro in question so that sphinx generates a link to the existing copy of the documentation in the api/test document. Fixes: bc145b3 ("Documentation: KUnit: Added KUnit Architecture") Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: Brendan Higgins <brendanhiggins@google.com> Link: https://lore.kernel.org/r/20220326054414.637293-1-davidgow@google.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent b79dfef commit 9df072c

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

Documentation/dev-tools/kunit/architecture.rst

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ The fundamental unit in KUnit is the test case. The KUnit test cases are
2626
grouped into KUnit suites. A KUnit test case is a function with type
2727
signature ``void (*)(struct kunit *test)``.
2828
These test case functions are wrapped in a struct called
29-
``struct kunit_case``. For code, see:
30-
31-
.. kernel-doc:: include/kunit/test.h
32-
:identifiers: kunit_case
29+
struct kunit_case.
3330

3431
.. note:
3532
``generate_params`` is optional for non-parameterized tests.
@@ -152,18 +149,12 @@ Parameterized Tests
152149
Each KUnit parameterized test is associated with a collection of
153150
parameters. The test is invoked multiple times, once for each parameter
154151
value and the parameter is stored in the ``param_value`` field.
155-
The test case includes a ``KUNIT_CASE_PARAM()`` macro that accepts a
152+
The test case includes a KUNIT_CASE_PARAM() macro that accepts a
156153
generator function.
157154
The generator function is passed the previous parameter and returns the next
158155
parameter. It also provides a macro to generate common-case generators based on
159156
arrays.
160157

161-
For code, see:
162-
163-
.. kernel-doc:: include/kunit/test.h
164-
:identifiers: KUNIT_ARRAY_PARAM
165-
166-
167158
kunit_tool (Command Line Test Harness)
168159
======================================
169160

0 commit comments

Comments
 (0)