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

Mark Brown
2025-12-18T14:25:31Z

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

On Thu, Dec 18, 2025 at 02:24:10PM +0100, Kevin Brodsky wrote:
> On 17/12/2025 11:04, Mark Brown wrote:

> > More generally building selftests with random older kernel versions
> > isn't really something that's expected to be robust:

> I suppose that Documentation/dev-tools/kselftest.rst talks about
> *running* against older kernels, not *building* against them. That said,

Yeah, running is fairly normal but huge swathes of the selftests won't
build without current kernel headers and it's not an especially useful
use of time to support that.

> we are dealing with an out-of-tree kernel module here, so the two are
> essentially the same... Yunsheng suggested an updated check that I think
> is reasonable, maybe it is a reasonable compromise?

Well, there's also the selection of KDIR which for some reason defaults
to the installed kernel so we get:

$ make -C tools/testing/selftests LLVM=1 ARCH=arm64 TARGETS=mm

Warning: missing page_frag_cache.h, please use a newer kernel. page_frag test will be skipped.

Your changelog says it'll work for an in tree build but I can't figure
out how to do that (using the top level Makefile to recurse doesn't seem
to DTRT either). Having looked at this more I think the problem here is
that the selection of KDIR is wrong, not the check.

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