From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 0/3] Some kernel-doc fixes
Date: Tue, 3 Feb 2026 16:05:36 +0100 [thread overview]
Message-ID: <20260203160536.41c30f47@foz.lan> (raw)
In-Reply-To: <0499f2060a181fa9997b32e2cd6ec88109159751@intel.com>
On Tue, 03 Feb 2026 12:52:22 +0200
Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Mon, 02 Feb 2026, Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> > As a heads up, I'm working on a separate set of patches that, if
> > things go well, we may end having a regression test for kernel-doc.
> > When done, I'll be submitting in separate.
> >
> > The idea is to have a YAML file with source code, KdocItem,
> > man output and rst output, and a dynamic unit test to run
> > them. I finished today to write a skeleton, but still requires
> > polishing (*).
>
> ...
>
> > If you're curious enough, this is the test YAML file it is using to
> > generate the 3 dynamic unit tests:
>
> FWIW, I think it'll be painful to have the source and the expected
> result in the same YAML file, simply because all parts of this are fussy
> about whitespace and indentation. I'd put them all in separate files,
> with the YAML tying them together. Then you can also reuse a single
> source file with multiple tests with different parameters and different
> outputs. And you get editor syntax higlighting and other help for the
> individual files.
I considered that, but on the other hand, if one wants to test
the intermediate internal KdocItem representation, having them
altogether helps to see what happened.
> And you can easily debug and compare the outputs with
> direct kernel-doc invocation. Etc.
True, but as I added support at kernel-doc to generate a yaml
format, it should be easy to diff from what someone wrote and
what kernel-doc actually produced - heh - sort of...
... pyyaml output is not user-friendly. Maybe there are ways
to make it use a more compact/nicer notation, but digging
into its documentation is not easy:
https://pyyaml.org/wiki/PyYAMLDocumentation
and it is not complete.
> In fact, this is exactly what I've done with Hawkmoth tests
> [1][2]. There's years of experience poured into this. I test everything
> through the parser directly, through the command-line, and through
> Sphinx.
I'll take a look on it. Thanks for the hints!
> BR,
> Jani.
>
>
> [1] https://github.com/jnikula/hawkmoth/blob/master/doc/developer/testing.rst
> [2] https://github.com/jnikula/hawkmoth/tree/master/test
>
>
Thanks,
Mauro
next prev parent reply other threads:[~2026-02-03 15:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 8:03 [PATCH 0/3] Some kernel-doc fixes Mauro Carvalho Chehab
2026-01-27 8:03 ` [PATCH 1/3] docs: kdoc: Fix pdfdocs build for tools Mauro Carvalho Chehab
2026-01-27 8:03 ` [PATCH 2/3] docs: sphinx-build-wrapper: allow -v override -q Mauro Carvalho Chehab
2026-01-27 8:03 ` [PATCH 3/3] tools: sphinx-build-wrapper: improve its help message Mauro Carvalho Chehab
2026-01-27 17:34 ` [PATCH 0/3] Some kernel-doc fixes Jonathan Corbet
2026-02-02 17:01 ` Jonathan Corbet
2026-02-02 18:15 ` Mauro Carvalho Chehab
2026-02-03 10:52 ` Jani Nikula
2026-02-03 15:05 ` Mauro Carvalho Chehab [this message]
2026-02-04 11:06 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260203160536.41c30f47@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox