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

Petr Vorel pvorel@suse.cz
Fri Feb 21 10:23:30 CET 2025


> Hi Petr,

> On 2/21/25 00:00, Petr Vorel wrote:
> > 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

> Thanks for the references, I took a look at it. It doesn't seem to be
> supported unless we change the code base of kerneldoc. I don't know if the
> effort is worth the result honestly. And the reference to tst_test for each
> struct attribute is a bit an overkill.

Well, I disagree it's an overkill. It help people to quickly see the related
structure. Also, structure members are just pretty close to the section of the
link.

Kind regards,
Petr

> Andrea


More information about the ltp mailing list