public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 0/3] Some kernel-doc fixes
Date: Tue, 03 Feb 2026 12:52:22 +0200	[thread overview]
Message-ID: <0499f2060a181fa9997b32e2cd6ec88109159751@intel.com> (raw)
In-Reply-To: <20260202191506.0aaee18e@foz.lan>

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. And you can easily debug and compare the outputs with
direct kernel-doc invocation. Etc.

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.


BR,
Jani.


[1] https://github.com/jnikula/hawkmoth/blob/master/doc/developer/testing.rst
[2] https://github.com/jnikula/hawkmoth/tree/master/test


-- 
Jani Nikula, Intel

  reply	other threads:[~2026-02-03 10:52 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 [this message]
2026-02-03 15:05       ` Mauro Carvalho Chehab
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=0499f2060a181fa9997b32e2cd6ec88109159751@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=mchehab+huawei@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