mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
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
This commit is contained in:
committed by
Mike Rapoport
parent
284d950dd6
commit
142eac65f3
9
tools/testing/memblock/tests/alloc_api.h
Normal file
9
tools/testing/memblock/tests/alloc_api.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
#ifndef _MEMBLOCK_ALLOCS_H
|
||||
#define _MEMBLOCK_ALLOCS_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int memblock_alloc_checks(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user