Commit 3950b92f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

selftests: kselftest_harness.h: partially fix kernel-doc markups

The kernel-doc markups on this file are weird: they don't
follow what's specified at:

	Documentation/doc-guide/kernel-doc.rst

In particular, markups should use this format:
        identifier - description

and not this:
	identifier(args)

The way the definitions are inside this file cause the
parser to completely miss the identifier name of each
function.

This prevents improving the script to do some needed validation
tests.

Address this part. Yet, furter changes are needed in order
for it to fully follow the specs.
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/8383758160fdb4fcbb2ac56beeb874ca6dffc6b9.1610610937.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 484cac79
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
#endif #endif
/** /**
* TH_LOG(fmt, ...) * TH_LOG()
* *
* @fmt: format string * @fmt: format string
* @...: optional arguments * @...: optional arguments
...@@ -113,12 +113,16 @@ ...@@ -113,12 +113,16 @@
__FILE__, __LINE__, _metadata->name, ##__VA_ARGS__) __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
/** /**
* SKIP(statement, fmt, ...) * SKIP()
* *
* @statement: statement to run after reporting SKIP * @statement: statement to run after reporting SKIP
* @fmt: format string * @fmt: format string
* @...: optional arguments * @...: optional arguments
* *
* .. code-block:: c
*
* SKIP(statement, fmt, ...);
*
* This forces a "pass" after reporting why something is being skipped * This forces a "pass" after reporting why something is being skipped
* and runs "statement", which is usually "return" or "goto skip". * and runs "statement", which is usually "return" or "goto skip".
*/ */
...@@ -136,7 +140,7 @@ ...@@ -136,7 +140,7 @@
} while (0) } while (0)
/** /**
* TEST(test_name) - Defines the test function and creates the registration * TEST() - Defines the test function and creates the registration
* stub * stub
* *
* @test_name: test name * @test_name: test name
...@@ -155,7 +159,7 @@ ...@@ -155,7 +159,7 @@
#define TEST(test_name) __TEST_IMPL(test_name, -1) #define TEST(test_name) __TEST_IMPL(test_name, -1)
/** /**
* TEST_SIGNAL(test_name, signal) * TEST_SIGNAL()
* *
* @test_name: test name * @test_name: test name
* @signal: signal number * @signal: signal number
...@@ -195,7 +199,7 @@ ...@@ -195,7 +199,7 @@
struct __test_metadata __attribute__((unused)) *_metadata) struct __test_metadata __attribute__((unused)) *_metadata)
/** /**
* FIXTURE_DATA(datatype_name) - Wraps the struct name so we have one less * FIXTURE_DATA() - Wraps the struct name so we have one less
* argument to pass around * argument to pass around
* *
* @datatype_name: datatype name * @datatype_name: datatype name
...@@ -212,7 +216,7 @@ ...@@ -212,7 +216,7 @@
#define FIXTURE_DATA(datatype_name) struct _test_data_##datatype_name #define FIXTURE_DATA(datatype_name) struct _test_data_##datatype_name
/** /**
* FIXTURE(fixture_name) - Called once per fixture to setup the data and * FIXTURE() - Called once per fixture to setup the data and
* register * register
* *
* @fixture_name: fixture name * @fixture_name: fixture name
...@@ -239,7 +243,7 @@ ...@@ -239,7 +243,7 @@
FIXTURE_DATA(fixture_name) FIXTURE_DATA(fixture_name)
/** /**
* FIXTURE_SETUP(fixture_name) - Prepares the setup function for the fixture. * FIXTURE_SETUP() - Prepares the setup function for the fixture.
* *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly.
* *
* @fixture_name: fixture name * @fixture_name: fixture name
...@@ -265,7 +269,7 @@ ...@@ -265,7 +269,7 @@
__attribute__((unused)) *variant) __attribute__((unused)) *variant)
/** /**
* FIXTURE_TEARDOWN(fixture_name) * FIXTURE_TEARDOWN()
* *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly.
* *
* @fixture_name: fixture name * @fixture_name: fixture name
...@@ -286,7 +290,7 @@ ...@@ -286,7 +290,7 @@
FIXTURE_DATA(fixture_name) __attribute__((unused)) *self) FIXTURE_DATA(fixture_name) __attribute__((unused)) *self)
/** /**
* FIXTURE_VARIANT(fixture_name) - Optionally called once per fixture * FIXTURE_VARIANT() - Optionally called once per fixture
* to declare fixture variant * to declare fixture variant
* *
* @fixture_name: fixture name * @fixture_name: fixture name
...@@ -305,7 +309,7 @@ ...@@ -305,7 +309,7 @@
#define FIXTURE_VARIANT(fixture_name) struct _fixture_variant_##fixture_name #define FIXTURE_VARIANT(fixture_name) struct _fixture_variant_##fixture_name
/** /**
* FIXTURE_VARIANT_ADD(fixture_name, variant_name) - Called once per fixture * FIXTURE_VARIANT_ADD() - Called once per fixture
* variant to setup and register the data * variant to setup and register the data
* *
* @fixture_name: fixture name * @fixture_name: fixture name
...@@ -339,7 +343,7 @@ ...@@ -339,7 +343,7 @@
_##fixture_name##_##variant_name##_variant = _##fixture_name##_##variant_name##_variant =
/** /**
* TEST_F(fixture_name, test_name) - Emits test registration and helpers for * TEST_F() - Emits test registration and helpers for
* fixture-based test cases * fixture-based test cases
* *
* @fixture_name: fixture name * @fixture_name: fixture name
......
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