memblock tests: Add memblock_remove tests
authorKarolina Drobnik <karolinadrobnik@gmail.com>
Wed, 2 Feb 2022 11:03:13 +0000 (12:03 +0100)
committerMike Rapoport <rppt@linux.ibm.com>
Mon, 21 Feb 2022 06:17:51 +0000 (08:17 +0200)
commitb4d968931e5e07cdff262bfd9b60291d072ad0d7
tree6a46611a5c0e1943ade415dc8781bec1a94cf28c
parent83787a803793881a2e6cf47ea0706cc8fe4573d7
memblock tests: Add memblock_remove tests

Add checks for removing a region from available memory in different
scenarios:
 - The requested region matches one in the collection of available
   memory regions
 - The requested region does not exist in memblock.memory
 - The region overlaps with one of the entries: from the top (its end
   address is bigger than the base of the existing region) or from the
   bottom (its base address is smaller than the end address of one of
   the regions)
 - The region is within an already defined region

Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/8e6aa005407bbe1a75b75e85ac04ebb51318a52a.1643796665.git.karolinadrobnik@gmail.com
tools/testing/memblock/tests/basic_api.c