Commit 3e4cd8ea authored by Kees Cook's avatar Kees Cook Committed by Shuah Khan

selftests/harness: Clean up kern-doc for fixtures

The FIXTURE*() macro kern-doc examples had the wrong names for the C code
examples associated with them. Fix those and clarify that FIXTURE_DATA()
usage should be avoided.

Cc: Shuah Khan <shuah@kernel.org>
Cc: Jakub Kicinski <kuba@kernel.org>
Fixes: 74bc7c97 ("kselftest: add fixture variants")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent a80d6055
...@@ -202,8 +202,9 @@ ...@@ -202,8 +202,9 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE_DATA(datatype name) * FIXTURE_DATA(datatype_name)
* *
* Almost always, you want just FIXTURE() instead (see below).
* This call may be used when the type of the fixture data * This call may be used when the type of the fixture data
* is needed. In general, this should not be needed unless * is needed. In general, this should not be needed unless
* the *self* is being passed to a helper directly. * the *self* is being passed to a helper directly.
...@@ -218,7 +219,7 @@ ...@@ -218,7 +219,7 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE(datatype name) { * FIXTURE(fixture_name) {
* type property1; * type property1;
* ... * ...
* }; * };
...@@ -245,7 +246,7 @@ ...@@ -245,7 +246,7 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE_SETUP(fixture name) { implementation } * FIXTURE_SETUP(fixture_name) { implementation }
* *
* Populates the required "setup" function for a fixture. An instance of the * Populates the required "setup" function for a fixture. An instance of the
* datatype defined with FIXTURE_DATA() will be exposed as *self* for the * datatype defined with FIXTURE_DATA() will be exposed as *self* for the
...@@ -271,7 +272,7 @@ ...@@ -271,7 +272,7 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE_TEARDOWN(fixture name) { implementation } * FIXTURE_TEARDOWN(fixture_name) { implementation }
* *
* Populates the required "teardown" function for a fixture. An instance of the * Populates the required "teardown" function for a fixture. An instance of the
* datatype defined with FIXTURE_DATA() will be exposed as *self* for the * datatype defined with FIXTURE_DATA() will be exposed as *self* for the
...@@ -292,7 +293,7 @@ ...@@ -292,7 +293,7 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE_VARIANT(datatype name) { * FIXTURE_VARIANT(fixture_name) {
* type property1; * type property1;
* ... * ...
* }; * };
...@@ -312,8 +313,8 @@ ...@@ -312,8 +313,8 @@
* *
* .. code-block:: c * .. code-block:: c
* *
* FIXTURE_ADD(datatype name) { * FIXTURE_VARIANT_ADD(fixture_name, variant_name) {
* .property1 = val1; * .property1 = val1,
* ... * ...
* }; * };
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment