[LTP] [PATCH] lib: tst_kconfig: Add runtime checks
Li Wang
liwang@redhat.com
Fri Mar 27 08:02:48 CET 2026
> So far for CONFIG_*_NS.
It would be great to have a description for the feature:
Something maybe like:
"Currently, LTP Kconfig parsing logic only checks if a feature was
enabled during kernel compilation (e.g., CONFIG_USER_NS=y). However,
some kernel features can be compiled in but disabled at runtime via
kernel command-line parameter or sysctls. When this happens, tests
relying on these Kconfig variables attempt to run and fail, rather
than being gracefully skipped.
This patch introduces a runtime check mechanism for Kconfig variables.
When a monitored CONFIG_* variable is parsed as 'y' or 'm', the framework
now executes an associated runtime check function. If the runtime check
fails, the framework logs an info message and internally overrides the
variable's state to 'n'. This allows the existing LTP dependency logic
to properly skip tests that require the disabled feature."
Also, add test_kconfig04.c in newlib_tests/ to verify this works?
--
Regards,
Li Wang
More information about the ltp
mailing list