docs: kselftest: Document the FORCE_TARGETS build variable
Subsystems (3)
PATCH 1/1 docs: kselftest: Document the FORCE_TARGETS build variable
FORCE_TARGETS has been part of the kselftest build system for some time but is absent from the developer documentation. Without an entry here, users relying on kselftest in CI pipelines would have to read the selftests Makefile directly to discover the option.
A build that exits zero despite some targets failing can mask real breakage and mislead automated systems into reporting success. Add a dedicated section so that CI authors can easily find and adopt FORCE_TARGETS=1 to turn such silent partial failures into hard errors.
--- Documentation/dev-tools/kselftest.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Documentation/dev-tools/kselftest.rst +12 -0
@@ -126,6 +126,18 @@ dedicated skiplist:: See the top-level tools/testing/selftests/Makefile for the list of all possible targets. +Requiring all targets to build successfully +=========================================== + +By default, the build succeeds as long as at least one target builds +without error. Set ``FORCE_TARGETS=1`` to instead require every target to +build successfully; make will abort as soon as any target fails:: + + $ make -C tools/testing/selftests FORCE_TARGETS=1 + +This applies to both the ``all`` and ``install`` targets and is useful in +CI environments where a silent partial build would be misleading. + Running the full range hotplug selftests ========================================
---
base-commit: 83ef26f911432d9c98b6d8b6ed0709a8b79cd834
change-id: 20260417-selftests-docs-fdf4e922ad20
Best regards,
Signature · 1 line
Ricardo B. Marlière <[email protected]>
Shuah Khan
maintainerQuoted 6 lines · Ricardo B. Marlière
FORCE_TARGETShas been part of the kselftest build system for some time but is absent from the developer documentation. Without an entry here, users relying on kselftest in CI pipelines would have to read the selftestsMakefiledirectly to discover the option.
Quoted 9 lines
A build that exits zero despite some targets failing can mask real breakage and mislead automated systems into reporting success. Add a dedicated section so that CI authors can easily find and adopt FORCE_TARGETS=1 to turn such silent partial failures into hard errors.
Signed-off-by Ricardo B. Marlière <[email protected]>---
Thanks Ricardo. I applied it to linux-kselftest next branch.
thanks,
-- Shuah