linux/tools/testing/memblock/tests
Priyanshu Kumar 9588076fb2 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>
2026-06-02 08:34:03 +03:00
..
alloc_api.c memblock: add MEMBLOCK_RSRV_KERN flag 2025-05-12 23:50:38 -07:00
alloc_api.h memblock tests: Add memblock_alloc tests for top down 2022-03-09 15:53:18 +02:00
alloc_exact_nid_api.c tools/testing/memblock: fix stale NUMA reservation tests 2026-06-02 08:34:03 +03:00
alloc_exact_nid_api.h memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
alloc_helpers_api.c memblock: add MEMBLOCK_RSRV_KERN flag 2025-05-12 23:50:38 -07:00
alloc_helpers_api.h memblock tests: Add memblock_alloc_from tests for top down 2022-03-09 15:54:03 +02:00
alloc_nid_api.c tools/testing/memblock: fix stale NUMA reservation tests 2026-06-02 08:34:03 +03:00
alloc_nid_api.h memblock tests: introduce range tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
basic_api.c memblock tests: add test for memblock_set_node 2025-04-07 09:28:01 +03:00
basic_api.h memblock tests: Add simulation of physical memory 2022-03-09 15:18:57 +02:00
common.c memblock tests: add memblock_reserve_many_may_conflict_check() 2024-06-05 10:22:22 +03:00
common.h memblock tests: add memblock_overlaps_region_checks 2024-06-05 10:22:22 +03:00