On 10/14/26 14:01, Sasha Levin wrote:
By default the selftests build and installation succeed as long as one target succeeds, so that a single broken suite does not cost CI systems the coverage of all others; commit cad6f32665cb ("selftests: Deescalate error reporting") restored that policy after it had been tightened. The exit status of make therefore cannot tell which suites failed, and inspecting the installation is not reliable either: a suite whose compilation failed can still install its scripts.Add an opt-in report. When KSFT_BUILD_REPORT names an absolute file, the all and install rules append one tab-separated record per target with the phase, the target name and the exit status of its recursive make. Generating the runlist is recorded as part of the install phase. The records are written without changing which targets are built or installed or the exit status of make, also with FORCE_TARGETS. Nothing is recorded by make -n, -t or -q, including when the selftests are built through the kernel's kselftest targets, which clear MAKEFLAGS. The recording helper lives in a small fragment so that suites built from subdirectories can add records for them, and the variable is exported to sub-makes. A relative path is rejected, since every recursive make runs in a different directory. Keep the exit status of the runlist generation loop as before, and create an empty runlist for installations in which no target emits tests. Document the format, version 1, and how to read it. Link: https://lore.kernel.org/r/20260416-selftests-deescalate-error-reporting-v1-1-38e7c0536...@kernel.org Signed-off-by: Sasha Levin <[email protected]> --- Documentation/dev-tools/kselftest.rst | 38 +++++++++++++++++++++++++ tools/testing/selftests/Makefile | 31 ++++++++++++++------ tools/testing/selftests/build_report.mk | 26 +++++++++++++++++ 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 tools/testing/selftests/build_report.mk
I picked this up for the next merge window. Patch is in kselftest next. thanks, -- Shuah

