From: Shuah Khan <skhan@linuxfoundation.org>
To: "Ricardo B. Marlière" <rbm@suse.com>,
"Mark Brown" <broonie@kernel.org>,
torvalds@linux-foundation.org, "Shuah Khan" <shuah@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, Aishwarya.TCV@arm.com,
ben.copeland@linaro.org, kernelci@lists.linux.dev,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 5/6] selftests: Preserve subtarget failures in all/install
Date: Wed, 15 Apr 2026 09:52:32 -0600 [thread overview]
Message-ID: <b80e905d-67bf-4c52-9b61-e52f3acc5b35@linuxfoundation.org> (raw)
In-Reply-To: <DHTUDCIYT34R.3VKGNDGUUKS84@suse.com>
On 4/15/26 09:42, Ricardo B. Marlière wrote:
> On Wed Apr 15, 2026 at 12:40 PM -03, Shuah Khan wrote:
>> On 4/15/26 07:58, Mark Brown wrote:
>>> On Fri, Mar 20, 2026 at 03:29:20PM -0300, Ricardo B. Marlière wrote:
>>>> 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.
>>>
>>> This patch, which is now in mainline as 7e47389142b8, is breaking a
>>> bunch of CI systems - at least KernelCI, our Arm internal CI and my
>>> personal stuff. It causes the equivalent of FORCE_TARGETS behaviour in
>>> the top level Makefile, the prior behaviour where the exit status of the
>>> top level Makefile ignores failures from individual directories is
>>> desirable since by default we try to build almost all the selftests but
>>> between quality issues and build time dependencies it's very common for
>>> at least one of them to fail. With this commit unless the user has
>>> configured a more restricted set of selftests it would be surprising if
>>> we manage to get a successful build and install.
>>>
>>> As well as being a poor default due to the very high likelyhood of build
>>> failures this also has the undesirable effect of causing a build failure
>>> in one selftest to cause the whole install target to fail, meaning that
>>> the build failure is escallated to a complete lost of coverge for all
>>> selftests in common CI usage.
>>>
>>> This wasn't showing up in my -next build tests since I set FORCE_TARGETS
>>> and explicitly choose a restricted set of kselftests which actually
>>> build with my system and configuration. It was less obvious than it
>>> should have been with the other systems since they did not expect there
>>> to be a complete failure to generate a kselftest tarball and variously
>>> masked the error or reported it in a manner that looked like an
>>> infrastructure issue.
>>
>> I didn't see it when I did test on linux-next and my repo. I did install
>> to catch problems.
>>
>> Sorry for not catching this. We can drop this patch.
>>
>>>
>>> It would be really nice to get to the point where we can reasonably do
>>> this but we're simply not there at the current time. At the moment if
>>> people want to see build failures reported at the top level that really
>>> needs to be opt in, we have FORCE_TARGETS for that.
>>
>> Good point - I will go look and see if we document this in kselftest doc
>> and add it.
>
> It's not documented. It would have solved my issue, sorry for
> overlooking this!
Ricardo, Would you like to send me doc patch for this?
thanks,
-- Shuah
next prev parent reply other threads:[~2026-04-15 15:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 1/6] selftests/run_kselftest.sh: Remove unused $ROOT Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 2/6] selftests/run_kselftest.sh: Add missing quotes Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 3/6] selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 4/6] selftests/run_kselftest.sh: Allow choosing per-test log directory Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 5/6] selftests: Preserve subtarget failures in all/install Ricardo B. Marlière
2026-04-15 13:58 ` Mark Brown
2026-04-15 15:40 ` Shuah Khan
2026-04-15 15:42 ` Ricardo B. Marlière
2026-04-15 15:52 ` Shuah Khan [this message]
2026-04-15 15:53 ` Ricardo B. Marlière
2026-04-15 16:25 ` Mark Brown
2026-04-15 16:39 ` Shuah Khan
2026-03-20 18:29 ` [PATCH 6/6] kbuild: remove kselftest output in mrproper Ricardo B. Marlière
2026-04-10 19:19 ` Shuah Khan
2026-04-11 12:49 ` Ricardo B. Marlière
2026-04-13 15:58 ` Shuah Khan
2026-04-13 16:22 ` Ricardo B. Marlière
2026-03-31 22:43 ` [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Shuah Khan
2026-04-01 11:45 ` Ricardo B. Marlière
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b80e905d-67bf-4c52-9b61-e52f3acc5b35@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=Aishwarya.TCV@arm.com \
--cc=ben.copeland@linaro.org \
--cc=broonie@kernel.org \
--cc=kernelci@lists.linux.dev \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=rbm@suse.com \
--cc=shuah@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox