zephyr/tests/kernel
Andy Ross 987658dcee tests/kernel: Fill allocation robustly for mpool heap backend
These five tests (mbox_api, mheap_api_concept, msgq_api, pipe_api and
queue) all had test cases where they needed a mem_pool allocation to
FAIL.  And they are all written to assume the behavior of the original
allocator and not the more general k_heap code, which actually
succeeds in a bunch of these cases.

* Even a very small heap saves enough metadata memory for the very
  small minimum block size, and this can be re-used as an allocation.
  So you can't assume a small heap is full.

* Calculating the number of blocks based on "num_blocks * max size /
  minimum size" and allocating them does not fill the heap, because
  the conservative metadata reservation leaves some space left over.

So these have all been modified to "fill" a heap by iteratively
allocating until failure.

Also, this fixes a benign overrun bug in mbox.  The test code would
insert a "big" message by reading past the end of the small message
buffer.  This didn't fail because it happened to be part of an array
of messages and the other ones defined contained the memory read.  But
still.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-04-14 10:05:55 -07:00
..
common
context tests: Convert to new DT_INST macros 2020-03-31 19:31:20 -05:00
device
early_sleep
fatal
fifo
fp_sharing tests: kernel: fp_sharing: Use ztest 2020-04-10 11:43:05 +02:00
gen_isr_table
interrupt tests: kernel: interrupt: Enable nested interrupt test for Cortex-R 2020-04-02 09:22:38 +02:00
lifo kernel/timeout: Enable 64 bit timeout precision 2020-03-31 19:40:47 -04:00
mbox tests/kernel: Fill allocation robustly for mpool heap backend 2020-04-14 10:05:55 -07:00
mem_heap/mheap_api_concept tests/kernel: Fill allocation robustly for mpool heap backend 2020-04-14 10:05:55 -07:00
mem_pool tests/kernel/mem_pool: Split out tests for legacy mem_pool config 2020-04-14 10:05:55 -07:00
mem_protect
mem_slab
mp
msgq/msgq_api tests/kernel: Fill allocation robustly for mpool heap backend 2020-04-14 10:05:55 -07:00
mutex
obj_tracing
pending kernel: remove unused offload workqueue option 2020-04-12 18:42:27 -04:00
pipe tests/kernel: Fill allocation robustly for mpool heap backend 2020-04-14 10:05:55 -07:00
poll boards: nrf52810_pca10040: Rename to nrf52dk_nrf52810 2020-04-06 13:09:07 +02:00
profiling/profiling_api
queue tests/kernel: Fill allocation robustly for mpool heap backend 2020-04-14 10:05:55 -07:00
sched boards: nrf52810_pca10040: Rename to nrf52dk_nrf52810 2020-04-06 13:09:07 +02:00
semaphore/semaphore
sleep
smp
spinlock
stack/stack
threads
tickless
timer kernel/timeout: Add absolute timeout APIs 2020-03-31 19:40:47 -04:00
workq tests: critical: change doxygen group 2020-04-12 18:42:27 -04:00
xip