linux/tools/unittests
Omokefe Emmanuel Onanaroghene 2d72a4c098 docs: kdoc: parse context_lock_struct() as struct declaration
kernel-doc fails to parse struct declarations wrapped in
context_lock_struct(), e.g. struct debugfs_cancellation:

  include/linux/debugfs.h:245 ... error: Cannot parse struct or union!

Add a struct transform that expands context_lock_struct() to a plain
struct declaration, and apply the struct transforms to the whole
declaration before split_struct_proto(), matching what dump_var() and
dump_function() already do for their prototypes. The member-only
transform in dump_struct() is then redundant.

Add a regression test for the debugfs_cancellation declaration.

Fixes: 6e530e2e31 ("debugfs: Make debugfs_cancellation a context lock struct")
Signed-off-by: Omokefe Emmanuel Onanaroghene <emmaonana18@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260925234054.128477-1-emmaonana18@gmail.com>
2026-09-29 16:59:29 -06:00
..
kdoc-test-schema.yaml docs: add a schema to help creating unittests for kernel-doc 2026-03-22 15:10:40 -06:00
kdoc-test.yaml docs: kdoc-test.yaml: add more tests 2026-03-25 13:36:45 -06:00
run.py unittests: add a runner to execute all unittests 2026-03-22 15:02:29 -06:00
test_cmatch.py docs: kernel-doc: python: strip __counted_by_ptr macro 2026-05-15 08:11:36 -06:00
test_kdoc_parser.py docs: kdoc: parse context_lock_struct() as struct declaration 2026-09-29 16:59:29 -06:00
test_kdoc_test_schema.py docs: add a simple kdoc-test.yaml together with a validation tool 2026-03-22 15:10:40 -06:00
test_tokenizer.py unittests: test_tokenizer: better handle mismatch error 2026-03-22 15:10:39 -06:00