]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: Preserve subtarget failures in all/install
authorRicardo B. Marlière <rbm@suse.com>
Fri, 20 Mar 2026 18:29:20 +0000 (15:29 -0300)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Apr 2026 17:05:39 +0000 (11:05 -0600)
commit7e47389142b8ada66280be71e01a3238751086f0
tree1afe49c16eef6265d107faca86183e9605e82401
parentd6ea9f404b905ba7351d6b0e9ed611d9d0bf20f7
selftests: Preserve subtarget failures in all/install

Track failures explicitly in the top-level selftests all/install loops.

The current code multiplies `ret` by each sub-make exit status. For
example, with `TARGETS=net`, the implicit `net/lib` dependency runs after
`net`, so a failed `net` build can be followed by a successful `net/lib`
build and reset the final result to success.

Set `ret` to 1 on any non-zero sub-make exit code and keep it sticky, so
the top-level make returns failure when any selected selftest target
fails.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://lore.kernel.org/r/20260320-selftests-fixes-v1-5-79144f76be01@suse.com
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/Makefile