Re: [PATCH 1/4] selftests/mm: remove flaky header check

Kevin Brodsky
2026-01-05T18:13:24Z

On 05/01/2026 13:46, Mark Brown wrote:
> On Mon, Dec 29, 2025 at 04:40:26PM +0100, Kevin Brodsky wrote:
>> On 18/12/2025 15:25, Mark Brown wrote:
>>> Well, there's also the selection of KDIR which for some reason defaults
>>> to the installed kernel so we get:
>> Overall the kselftests tend to assume that we're building on the same
>> machine we'll run them, so at least that feels consistent. The same
>> default is used for most other out-of-tree kselftests modules
>> (livepatch, net/bench).
> That's really not the expected usage pattern, I'd be surprised if a
> non-trivial propoprtion of kselftest builds were intended to be run on
> the system they're built on - a lot of people test interactively in VMs,
> or on some other target hardware, and automated systems are going to be
> building separately. The two you've identified look like special
> snowflakes TBH (livepatch in particular has a bunch of other issues due
> to what it's trying to do).
>
>> Maybe the documentation should be updated to recommend setting KDIR
>> explicitly? Or maybe it could default to KDIR=$PWD or $(abspath
>> $(KBUILD_OUTPUT)) when cross-compiling?
> I think defaulting to something related to the current kernel build is
> more sensible here.

Fair enough, fine by me. Then I'll change the default to the output
directory and remove the header check.

- Kevin