Commit Graph

6 Commits

Author SHA1 Message Date
Anas Nashif d6d716b32a lib: heap: build heap utilities only on demand
Build the heap features only when needed and based on Kconfigs being
set.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
li biao f86a3b4b17 tests: lib: move heap to new ztest API
Move test lib/heap to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-07-15 06:58:57 -04:00
Daniel Leung be9779753f tests: lib/heap: add test for heap listeners
This adds test to make heap listeners are working correctly.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-10 10:28:04 -05:00
Chen Peng1 f4cf484ac6 tests: heap: validate sys_heap_runtime_stats_get API
Add CONFIG_SYS_HEAP_RUNTIME_STATS in existing heap tests
to enable validation for sys_heap_runtime_stats_get API.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-11-11 16:21:43 -05:00
Andy Ross 15c52ed12a tests/lib: Add sys_heap test
Use the white box validation and test rig added as part of the
sys_heap work.  Add a layer that puts hashed cookies into the blocks
to detect corruption, check the validity state after every operation,
and enumerate a few different usage patterns:

+ Small heap, "real world" allocation where the heap is about half
full and most allocations succeed.

+ Small heap, "fragmentation runaway" scenario where most allocations
start failing, but the heap must remain consistent.

+ Big heap.  We can't test this with the same exhaustive coverage
(many re/allocations for every byte of storage) for performance
reasons, but we do what we can.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-04-14 10:05:55 -07:00