memblock test: Add test to memblock_reserve() 129th region
Reserve 129th region in the memblock, and this will trigger the memblock_double_array() function, this needs valid memory regions. So using dummy_physical_memory_init() to allocate a valid memory region. At the same time, reserve 128 faked memory region, and make sure these reserved region not intersect with the valid memory region. So memblock_double_array() will choose the valid memory region, and it will success. Also need to restore the reserved.regions after memblock_double_array(), to make sure the subsequent tests can run as normal. Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/20221011062128.49359-3-shaoqin.huang@intel.com
Showing
Please register or sign in to comment