Re: [LTP] [PATCH 1/1] doc/ground_rules: Add Kernel features check rules

Petr Vorel
2026-03-11T09:13:08Z

Hi all,

> Hi!

> Is this patch still valid? Should we merge it with minor details as
> suggested?

I planned to merge this with change Li suggested [1]. But in a meanwhile Cyril
posted lib: tst_kconfig: Add runtime checks [2]. Once he finds time to merge it,
I should probably send v2 of this patch - update Li's suggestion:

- Tristate/module feature: If the functionality is controlled by a Kconfig of
type tristate (`tristate
<https://docs.kernel.org/kbuild/kconfig-language.html#menu-attributes>`_),
it might be built as a module. Modules can be absent or unloaded
at runtime,
so checking the Kconfig option alone isn’t enough. .needs_kconfigs,
requires to add additional kconfig checks to confirm the module is loaded.

Also, Cyril noted [3] on thermal test that using .supported_archs is also useful
to define which arch is targeted (when used with .needs_drivers/.needs_kconfigs,
which would be enough for detecting the functionality). Do we want to add it as
a rule?
- Test targeted to a certain architecture should always use .supported_archs
even if this is not necessary as a check because test already define
.needs_drivers/.needs_kconfigs.

And back to my question some time ago. Do we want to deprecate .needs_drivers,
when Cyril enhanced .needs_kconfigs? Do we even need it?

Kind regards,
Petr

> Kind regards,

[1] https://lore.kernel.org/ltp/CAEemH2fc_C_vGnKtbYqsMzMVKLSNLhCFWLGemSyVTWBzAATDCA@mail.gmail.com/
[2] https://patchwork.ozlabs.org/project/ltp/patch/20260205135724.23772-1-chrubis@suse.cz/
[3] https://lore.kernel.org/ltp/aa_0YkA4UKwhOjpi@yuki.lan/