One fundamental validation criteria is to never have consecutive free chunks. If that ever happens we failed to merge them. That means a free chunk must always be surrounded by used chunks. It is a pain to extend valid_chunk() with new rules as it is. So a VALIDATE() macro is introduced to make things easier to work with. It also allows for isolating each test, possibly making VALIDATE() into __ASSERT() to determine exactly which test is tripping when debugging. Finally, because of that new validation rule, sys_heap_validate() must be modified so not to use valid_chunk() while it is flipping all the "used" flags. So let's run valid_chunk() up front before alterating chunk headers. Now sys_heap_validate() has become justifiably more expensive and a few emulated targets are about to bust the tests/lib/heap test timeout. So bump the timeout as well. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
12 lines
469 B
YAML
12 lines
469 B
YAML
# Excludes m2gl025_miv, which is based on the renode simulator. This
|
|
# is very slow for CPU-bound tests like this, taking upwards of 10
|
|
# minutes (vs. ~20 seconds for qemu) to complete in CI. There's
|
|
# little value there, this is a unit test of library code and we have
|
|
# coverage of the RISC-V architectures via qemu platforms already.
|
|
tests:
|
|
lib.heap:
|
|
tags: heap
|
|
platform_exclude: m2gl025_miv qemu_riscv32
|
|
filter: not CONFIG_SOC_NSIM
|
|
timeout: 240
|