[LTP] [PATCH 1/1] doc: Link struct tst_test and tst_tag

Petr Vorel pvorel@suse.cz
Fri Feb 21 00:00:00 CET 2025


Hi Andrea,

> Hi,

> mmh..result looks really weird. Basically every table item is a link to
> tst_test. Did you check if it's possible to extend the struct parser in
> order to have a link for each attribute?

I was although thinking about it, but haven't checked the code. I suppose you'll
be much faster than me with this as you're more familiar with sphinx. I gave up
because reader is nearly at the correct location.

I suppose missing code needs to be done in linuxdoc.rstKernelDoc extension.
Because although it's possible to link to the member in linuxdoc.rstKernelDoc 
(e.g. &tst_test.needs_root), but it leads to "struct tst_test" [1] definition,
which has only anchors for Definitions [2] and Members [3]. I guess it's somehow
possible to link it via C domain [4], but it's not used in linuxdoc.rstKernelDoc
extension.

I tried linuxdoc [5] update to the latest 20240924 (not much changes anyway),
but members still do not have id sections.

Kind regards,
Petr

[1] https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#struct-tst-test
[2] https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#tst-test-definition
[3] https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#tst-test-members
[4] https://www.sphinx-doc.org/en/master/usage/domains/c.html#role-c-var
[5] https://github.com/return42/linuxdoc.git

> Andrea


More information about the ltp mailing list