diff options
author | Karolina Drobnik <karolinadrobnik@gmail.com> | 2022-02-28 17:46:43 +0300 |
---|---|---|
committer | Mike Rapoport <rppt@linux.ibm.com> | 2022-03-09 16:18:57 +0300 |
commit | 2c3dacba5d46ef0ff83fe6b82570c433910b63ab (patch) | |
tree | 6f9ecc3261af43f6e187cf2f7b97ca7419e8f61e /tools/testing/memblock/tests/common.h | |
parent | 2a7ceac9e58167fadc3496c5f694543d4bbe03ef (diff) | |
download | linux-2c3dacba5d46ef0ff83fe6b82570c433910b63ab.tar.xz |
memblock tests: Split up reset_memblock function
All memblock data structure fields are reset in one function. In some
test cases, it's preferred to reset memory region arrays without
modifying other values like allocation direction flag.
Extract two functions from reset_memblock, so it's possible to reset
different parts of memblock:
- reset_memblock_regions - reset region arrays and their counters
- reset_memblock_attributes - set other fields to their default values
Update checks in basic_api.c to use new definitions. Remove
reset_memblock call from memblock_initialization_check, so the true
initial values are tested.
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/5cc1ba9a0ade922dbf4ba450165b81a9ed17d4a9.1646055639.git.karolinadrobnik@gmail.com
Diffstat (limited to 'tools/testing/memblock/tests/common.h')
-rw-r--r-- | tools/testing/memblock/tests/common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/memblock/tests/common.h b/tools/testing/memblock/tests/common.h index 48efc4270ea1..b864c64fb60f 100644 --- a/tools/testing/memblock/tests/common.h +++ b/tools/testing/memblock/tests/common.h @@ -10,6 +10,7 @@ struct region { phys_addr_t size; }; -void reset_memblock(void); +void reset_memblock_regions(void); +void reset_memblock_attributes(void); #endif |