From: Jonathan Corbet <corbet@lwn.net>
To: Kees Cook <kees@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Kees Cook" <kees@kernel.org>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Maximilian Huber" <maximilian.huber@tngtech.com>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Luis Augenstein" <luis.augenstein@tngtech.com>,
"Breno Leitao" <leitao@debian.org>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Andrew Jones" <andrew.jones@linux.dev>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] docs: Makefile: Add a testdocs target for the documentation unit tests
Date: Sat, 26 Sep 2026 09:27:36 -0600 [thread overview]
Message-ID: <87fqyw3udz.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20260916184107.i.183-kees@kernel.org>
Kees Cook <kees@kernel.org> writes:
> tools/unittests/run.py discovers and runs the unit tests there (which
> are primarily documentation tools), but nothing in the build calls it,
> so the tests are only run by whoever remembers that the script is there.
>
> Give it a target, next to the other checks that need no Sphinx. The name
> ends in "docs", so it matches the "%docs" pattern already in
> no-dot-config-targets and runs without a configured tree, and it sets
> PYTHONPYCACHEPREFIX as the other Python targets here do, to keep
> __pycache__ directories out of the source tree.
>
> $ make testdocs
> ...
> Ran 121 tests
>
> with "make dochelp" listing it between refcheckdocs and cleandocs.
>
> Tested with GNU Make 4.4.1 and Python 3.14.7, on a tree with no .config,
> where it ran 121 tests and left no __pycache__ behind.
>
> Assisted-by: LLM
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
> I debated the naming here, since "tools/unittests/" is such a general
> directory location, but figured I'd start with a target that made the most
> logical sense given what is actually being tested there? I dunno. Maybe
> "make testtools"? But that reads weird.
> ---
> Makefile | 2 +-
> Documentation/Makefile | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
Applied, thanks.
jon
prev parent reply other threads:[~2026-09-26 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 18:41 Kees Cook
2026-09-16 20:53 ` Randy Dunlap
2026-09-17 6:38 ` Nicolas Schier
2026-09-17 7:54 ` Breno Leitao
2026-09-26 15:27 ` Jonathan Corbet [this message]
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=87fqyw3udz.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=andrew.jones@linux.dev \
--cc=gary@garyguo.net \
--cc=kees@kernel.org \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luis.augenstein@tngtech.com \
--cc=masahiroy@kernel.org \
--cc=maximilian.huber@tngtech.com \
--cc=mchehab@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=thomas.weissschuh@linutronix.de \
/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
all inboxes | Powered by JetHome®