]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/futex: Set the home_node in futex_numa_mpol
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 28 May 2025 08:55:20 +0000 (10:55 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 5 Jun 2025 12:37:58 +0000 (14:37 +0200)
commit0ecb4232fc65e659ca7020f8bb2e0fc347acfb7d
treef66402d58251da8a222eab3a65915b316fd25e2d
parent1a9dcf69c7a97e733aa2fc026db22f22928ca7b7
selftests/futex: Set the home_node in futex_numa_mpol

The test fails at the MPOL step if multiple nodes are available. The
reason is that mbind() sets the policy but the home_node, which is
retrieved by the futex code, is not set. This causes to retrieve the
current node and with multiple nodes it fails on one of the iterations.

Use numa_set_mempolicy_home_node() to set the expected node.
Use ksft_exit_fail_msg() to fail and exit in order not to confuse ktap.

Fixes: 3163369407baf ("selftests/futex: Add futex_numa_mpol")
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250528085521.1938355-3-bigeasy@linutronix.de
tools/testing/selftests/futex/functional/futex_numa_mpol.c