public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] doc/ground_rules: Add Kernel features check rules
@ 2026-01-28  8:01 Petr Vorel
  2026-01-28  9:00 ` Li Wang via ltp
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Petr Vorel @ 2026-01-28  8:01 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Based on a discussion various discussions:
https://lore.kernel.org/ltp/20260123122545.GA122331@pevik/
https://lore.kernel.org/ltp/20260128072445.GB13495@pevik/

Kind regards,
Petr

 doc/developers/ground_rules.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/doc/developers/ground_rules.rst b/doc/developers/ground_rules.rst
index 05e473cad5..90fe7a64ee 100644
--- a/doc/developers/ground_rules.rst
+++ b/doc/developers/ground_rules.rst
@@ -174,3 +174,20 @@ These patches should also add a [STAGING] keyword into the patch subject, e.g.
 In a case that a test for unreleased kernel is really needed to be merged we do
 not add it to the list of test executed by default and keep it in
 :master:`runtest/staging` file until the kernel code is finalized.
+
+Kernel features check
+---------------------
+
+We prefer to use :c:type:`.needs_kconfigs <tst_test>` (kernel kconfig check).
+But do *not* use it when there is another way to detect the functionality (e.g.
+via detecting functionality via ``/proc|sys``) *and* any of these rules applies:
+
+- Kernel allows to disable functionality via `kernel’s command-line parameter
+  <https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html>`_
+  (it can be disabled in runtime).
+- It's a check for a functionality which can be compiled as module
+  (`tristate
+  <https://docs.kernel.org/kbuild/kconfig-language.html#menu-attributes>`_,
+  modul might not be available).
+- New kernel functionality which is unlikely to be backported (use
+  :c:type:`.min_kver <tst_test>` instead).
-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-11  9:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28  8:01 [LTP] [PATCH 1/1] doc/ground_rules: Add Kernel features check rules Petr Vorel
2026-01-28  9:00 ` Li Wang via ltp
2026-01-28 12:45   ` Petr Vorel
2026-01-28 20:50 ` Petr Vorel
2026-01-29  7:24   ` Li Wang via ltp
2026-01-29  8:59     ` Cyril Hrubis
2026-02-11 13:05 ` Andrea Cervesato via ltp
2026-03-11  9:12   ` Petr Vorel
2026-03-11  9:15   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox