Skip to content
Commit 6d4e3dd6 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Anas Nashif
Browse files

tests: dynamic_thread: fix test_thread_index_management



This test was working by accident onarm64 and riscv64. Those
architectures have large register files, even more so considering
their 64-bit nature.

This test works by calling k_object_alloc(K_OBJ_THREAD) until thread
index exhaustion. However here it exhausted heap memory before running
out of thread indexes. There was a test to make sure that wasn't the
case by attempting a k_malloc(256). But here that succeeded just
because 256 is far smaller than a struct k_thread on the above
architectures.

Fix this by:

- attempting an additional allocation with the actual object size
  instead of an arbitrary 256 bites
- increasing the heap size as 8192 was clearly insufficient for the
  above platforms.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 962b3741
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment