[LTP] [PATCH 17/17] doc: metadata: Remove needs_drivers from docs
Cyril Hrubis
chrubis@suse.cz
Thu Apr 2 14:13:56 CEST 2026
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
doc/developers/writing_tests.rst | 3 ---
doc/old/C-Test-API.asciidoc | 13 ++++++-------
metadata/README.md | 15 ++++++---------
3 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/doc/developers/writing_tests.rst b/doc/developers/writing_tests.rst
index 992374f8b..5b1516ba5 100644
--- a/doc/developers/writing_tests.rst
+++ b/doc/developers/writing_tests.rst
@@ -435,9 +435,6 @@ LTP C And Shell Test API Comparison
* - .needs_device
- TST_NEEDS_DEVICE
- * - .needs_drivers
- - TST_NEEDS_DRIVERS
-
* - .needs_kconfigs
- TST_NEEDS_KCONFIGS
diff --git a/doc/old/C-Test-API.asciidoc b/doc/old/C-Test-API.asciidoc
index 72fd2731d..7493fc578 100644
--- a/doc/old/C-Test-API.asciidoc
+++ b/doc/old/C-Test-API.asciidoc
@@ -1621,13 +1621,12 @@ test should include 'tst_checksum.h' header, then can call 'tst_crc32c()'.
1.26 Checking kernel for the driver support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Some tests may need specific kernel drivers, either compiled in, or built
-as a module. If '.needs_drivers' points to a 'NULL' terminated array of kernel
-module names these are all checked and the test exits with 'TCONF' on the
-first missing driver.
-
-The detection is based on reading 'modules.dep' and 'modules.builtin' files
-generated by kmod. The check is skipped on Android.
+Some tests may need specific kernel drivers, either compiled in, or built as a
+module. For this cases a mappping of kernel config options to modules is
+maintained in the kconfig checker. When a kernel config option is requested by
+a test that has associated mapping in the kconfig source the 'modules.dep' file
+is checked for module presence when the option is set to 'm'. The check is
+skipped on Android.
1.27 Saving & restoring /proc|sys values
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/metadata/README.md b/metadata/README.md
index 2cf978d39..950e49f6e 100644
--- a/metadata/README.md
+++ b/metadata/README.md
@@ -144,15 +144,14 @@ struct tst_test test = {
/* Indicates that the test is messing with system wall clock */
.restore_wallclock = 1,
- /* Tests needs uinput either compiled in or loaded as a module */
- .needs_drivers = (const char *[]) {
- "uinput",
- NULL
- },
-
/* Tests needs enabled kernel config flags */
.needs_kconfigs = (const char *[]) {
"CONFIG_X86_INTEL_UMIP=y",
+ /*
+ * For config options that enable modules we also check the presence of
+ * the module if the config option has module mapping set and is set to 'm'.
+ */
+ "CONFIG_INPUT_UINPUT",
NULL
},
@@ -185,11 +184,9 @@ Which will yield following JSON output:
"dev_min_size": "1024",
"dev_fs_type": "ext4",
"restore_wallclock": "1",
- "needs_drivers": [
- "uinput",
- ],
"needs_kconfigs": [
"CONFIG_X86_INTEL_UMIP=y",
+ "CONFIG_INPUT_UINPUT",
],
"tags": [
[
--
2.52.0
More information about the ltp
mailing list