memblock tests: Add simulation of physical memory
authorKarolina Drobnik <karolinadrobnik@gmail.com>
Mon, 28 Feb 2022 14:46:44 +0000 (15:46 +0100)
committerMike Rapoport <rppt@linux.ibm.com>
Wed, 9 Mar 2022 13:18:57 +0000 (15:18 +0200)
commit284d950dd6b0ea699608455e443341e82f9719c8
tree3e60c40114b193b67550ae10e823da7937829b1b
parent2c3dacba5d46ef0ff83fe6b82570c433910b63ab
memblock tests: Add simulation of physical memory

Allocation functions that return virtual addresses (with an exception
of _raw variant) clear the allocated memory after reserving it. This
requires valid memory ranges in memblock.memory.

Introduce memory_block variable to store memory that can be registered
with memblock data structure. Move assert.h and size.h includes to common.h
to share them between the test files.

Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/dce115503c74a6936c44694b00014658a1bb6522.1646055639.git.karolinadrobnik@gmail.com
tools/testing/memblock/tests/basic_api.c
tools/testing/memblock/tests/basic_api.h
tools/testing/memblock/tests/common.c
tools/testing/memblock/tests/common.h