]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/testing/memblock: fix stale NUMA reservation tests
authorPriyanshu Kumar <priyanshukumarpu@gmail.com>
Wed, 15 Apr 2026 12:27:31 +0000 (12:27 +0000)
committerMike Rapoport (Microsoft) <rppt@kernel.org>
Tue, 2 Jun 2026 05:34:03 +0000 (08:34 +0300)
commit9588076fb21992a5d14efeb99134ebf034c7b84f
tree6bdc3dcaaa79154c330c6554ec3947dc1be42955
parent3a3fc1dfd6a958615ebaab8fb251e89fc2b3f2f2
tools/testing/memblock: fix stale NUMA reservation tests

memblock allocations now reserve memory with MEMBLOCK_RSRV_KERN and,
on NUMA configurations, record the requested node on the reserved
region. Several memblock simulator NUMA tests still expected merges
that only worked before those reservation semantics changed, so the
suite aborted even though the allocator behavior was correct.

Update the NUMA merge expectations in the memblock_alloc_try_nid()
and memblock_alloc_exact_nid_raw() tests to match the current reserved
region metadata rules. For cases that should still merge, create the
pre-existing reservation with matching nid and MEMBLOCK_RSRV_KERN
metadata. Also strengthen the memblock_alloc_node() coverage by
checking the newly created reserved region directly instead of
re-reading the source memory node descriptor.

Finally, drop the stale README/TODO notes that still claimed
memblock_alloc_node() could not be tested.

The memblock simulator passes again with NUMA enabled after these
updates.

Signed-off-by: Priyanshu Kumar <priyanshukumarpu@gmail.com>
Link: https://patch.msgid.link/20260415122731.1768912-1-priyanshukumarpu@gmail.com
[rppt: dropped unrelated changes]
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
tools/testing/memblock/README
tools/testing/memblock/TODO
tools/testing/memblock/tests/alloc_exact_nid_api.c
tools/testing/memblock/tests/alloc_nid_api.c