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

Mark Brown
2026-01-05T12:46:12Z

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]