selftest/futex: Compile also with libnuma < 2.0.16
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 15 Sep 2025 21:26:30 +0000 (23:26 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 17 Sep 2025 17:48:45 +0000 (19:48 +0200)
commited323aeda5e09fa1ab95946673939c8c425c329c
treee59bb6c9995f511f7078cbd5eac6986e3551b65e
parent2951dddef0a87c20e83c77070bd5077290d9121f
selftest/futex: Compile also with libnuma < 2.0.16

After using numa_set_mempolicy_home_node() the test fails to compile on
systems with libnuma library versioned lower than 2.0.16.

In order to allow lower library version add a pkg-config related check
and exclude that part of the code. Without the proper MPOL setup it
can't be tested.

Make a total number of tests two. The first one is the first batch and
the second is the MPOL related one. The goal is to let the user know if
it has been skipped due to library limitation.

Remove test_futex_mpol(), it was unused and it is now complained by the
compiler if the part is not compiled.

Fixes: 0ecb4232fc65e ("selftests/futex: Set the home_node in futex_numa_mpol")
Closes: https://lore.kernel.org/oe-lkp/202507150858.bedaf012-lkp@intel.com
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/futex/functional/futex_numa_mpol.c