Re: Re: [PATCH] selftests/mm: make libnuma-dependent tests optional

From: Jiangshan Yi

Date: Thu Jul 30 2026 - 13:05:45 EST


Hi David,

Thanks for the review and the historical context — very helpful.

You're right that the situations aren't parallel: liburing was made optional
because it wasn't universally easy to obtain at the time, whereas libnuma is
well established and trivial to install on most setups. My cover letter leaned
too heavily on that analogy without articulating the actual motivation — my
mistake.

The scenario I'm trying to address is the *minimal container / cross-build*
one: some CI images and embedded build environments deliberately omit
libnuma-dev to keep the footprint small, or because the target has no NUMA
topology. There, `migration`, `ksm_tests`, and `rmap` fail at **compile** time
(`#include <numa.h>` not found), and `make` exits non-zero — so the CI step is
judged failed even though the dozens of NUMA-independent tests would build
fine. The goal isn't to spare users the install, but to stop a missing optional
library from failing the whole `make`.

That said, your comment makes me reconsider whether silent skipping is the
right policy for selftests. I'd be happy to switch to: keep the tests
enabled-by-default, but on missing libnuma print a clear notice ("install
libnuma-dev to enable NUMA-dependent tests") and continue building the rest,
rather than aborting. This stays closer to the "run as much as possible"
philosophy while still guiding the user to the missing dependency.

If neither direction is of interest, I'll drop the patch — no point adding
maintenance surface for a problem that isn't real in practice. But if the
minimal-container scenario resonates, I'll respin a v2 with proper motivation
in the commit message.

Thanks again for the patience.

Best regards,
Jiangshan Yi