Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Kees Cook <keescook@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/8383758160fdb4fcbb2ac56beeb874ca6dffc6b9.1610610937.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
3950b92f 484cac79

+15 -11
+15 -11
tools/testing/selftests/kselftest_harness.h
··· 79 79 #endif 80 80 81 81 /** 82 - * TH_LOG(fmt, ...) 82 + * TH_LOG() 83 83 * 84 84 * @fmt: format string 85 85 * @...: optional arguments ··· 113 113 __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__) 114 114 115 115 /** 116 - * SKIP(statement, fmt, ...) 116 + * SKIP() 117 117 * 118 118 * @statement: statement to run after reporting SKIP 119 119 * @fmt: format string 120 120 * @...: optional arguments 121 + * 122 + * .. code-block:: c 123 + * 124 + * SKIP(statement, fmt, ...); 121 125 * 122 126 * This forces a "pass" after reporting why something is being skipped 123 127 * and runs "statement", which is usually "return" or "goto skip". ··· 140 136 } while (0) 141 137 142 138 /** 143 - * TEST(test_name) - Defines the test function and creates the registration 139 + * TEST() - Defines the test function and creates the registration 144 140 * stub 145 141 * 146 142 * @test_name: test name ··· 159 155 #define TEST(test_name) __TEST_IMPL(test_name, -1) 160 156 161 157 /** 162 - * TEST_SIGNAL(test_name, signal) 158 + * TEST_SIGNAL() 163 159 * 164 160 * @test_name: test name 165 161 * @signal: signal number ··· 199 195 struct __test_metadata __attribute__((unused)) *_metadata) 200 196 201 197 /** 202 - * FIXTURE_DATA(datatype_name) - Wraps the struct name so we have one less 198 + * FIXTURE_DATA() - Wraps the struct name so we have one less 203 199 * argument to pass around 204 200 * 205 201 * @datatype_name: datatype name ··· 216 212 #define FIXTURE_DATA(datatype_name) struct _test_data_##datatype_name 217 213 218 214 /** 219 - * FIXTURE(fixture_name) - Called once per fixture to setup the data and 215 + * FIXTURE() - Called once per fixture to setup the data and 220 216 * register 221 217 * 222 218 * @fixture_name: fixture name ··· 243 239 FIXTURE_DATA(fixture_name) 244 240 245 241 /** 246 - * FIXTURE_SETUP(fixture_name) - Prepares the setup function for the fixture. 242 + * FIXTURE_SETUP() - Prepares the setup function for the fixture. 247 243 * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. 248 244 * 249 245 * @fixture_name: fixture name ··· 269 265 __attribute__((unused)) *variant) 270 266 271 267 /** 272 - * FIXTURE_TEARDOWN(fixture_name) 268 + * FIXTURE_TEARDOWN() 273 269 * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. 274 270 * 275 271 * @fixture_name: fixture name ··· 290 286 FIXTURE_DATA(fixture_name) __attribute__((unused)) *self) 291 287 292 288 /** 293 - * FIXTURE_VARIANT(fixture_name) - Optionally called once per fixture 289 + * FIXTURE_VARIANT() - Optionally called once per fixture 294 290 * to declare fixture variant 295 291 * 296 292 * @fixture_name: fixture name ··· 309 305 #define FIXTURE_VARIANT(fixture_name) struct _fixture_variant_##fixture_name 310 306 311 307 /** 312 - * FIXTURE_VARIANT_ADD(fixture_name, variant_name) - Called once per fixture 308 + * FIXTURE_VARIANT_ADD() - Called once per fixture 313 309 * variant to setup and register the data 314 310 * 315 311 * @fixture_name: fixture name ··· 343 339 _##fixture_name##_##variant_name##_variant = 344 340 345 341 /** 346 - * TEST_F(fixture_name, test_name) - Emits test registration and helpers for 342 + * TEST_F() - Emits test registration and helpers for 347 343 * fixture-based test cases 348 344 * 349 345 * @fixture_name: fixture name