diff options
author | Karolina Drobnik <karolinadrobnik@gmail.com> | 2022-02-28 17:46:45 +0300 |
---|---|---|
committer | Mike Rapoport <rppt@linux.ibm.com> | 2022-03-09 16:53:18 +0300 |
commit | 142eac65f3e04577451a40b3cc57e708311eed01 (patch) | |
tree | 6c445bd9fab807253b33593d3d49195ea1db85e8 /tools/testing/memblock/main.c | |
parent | 284d950dd6b0ea699608455e443341e82f9719c8 (diff) | |
download | linux-142eac65f3e04577451a40b3cc57e708311eed01.tar.xz |
memblock tests: Add memblock_alloc tests for top down
Add checks for memblock_alloc for top down allocation direction.
The tested scenarios are:
- Region can be allocated on the first fit (with and without
region merging)
- Region can be allocated on the second fit (with and without
region merging)
Add checks for both allocation directions:
- Region can be allocated between two already existing entries
- Limited memory available
- All memory is reserved
- No available memory registered with memblock
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/26ccf409b8ff0394559d38d792b2afb24b55887c.1646055639.git.karolinadrobnik@gmail.com
Diffstat (limited to 'tools/testing/memblock/main.c')
-rw-r--r-- | tools/testing/memblock/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c index da65b0adee91..e7cc45dc06d4 100644 --- a/tools/testing/memblock/main.c +++ b/tools/testing/memblock/main.c @@ -1,8 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "tests/basic_api.h" +#include "tests/alloc_api.h" int main(int argc, char **argv) { memblock_basic_checks(); + memblock_alloc_checks(); + return 0; } |