tests: kernel: threads: add a testcase for dynamic thread stacks

Test that automatic thread stack allocation works for
both user and kernel threads.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2022-06-27 23:43:38 -04:00 committed by Chris Friedt
commit 1323b1ac60
4 changed files with 240 additions and 0 deletions

View file

@ -0,0 +1,76 @@
common:
tags: kernel security
min_ram: 32
integration_platforms:
- qemu_x86
- qemu_x86_nommu
- qemu_x86_64
- qemu_cortex_a53
- qemu_cortex_a53_smp
- qemu_cortex_m3
- qemu_riscv32
- qemu_riscv32e
- qemu_riscv64
- qemu_riscv64_smp
# Permutations of (pool | alloc | user)
tests:
kernel.threads.dynamic_thread.stack.no_pool.no_alloc.no_user:
extra_configs:
# 000
- CONFIG_DYNAMIC_THREAD_POOL_SIZE=0
- CONFIG_DYNAMIC_THREAD_ALLOC=n
- CONFIG_USERSPACE=n
# kernel.threads.dynamic_thread.stack.no_pool.no_alloc.user:
# tags: userspace
# extra_configs:
# # 001
# - CONFIG_DYNAMIC_THREAD_POOL_SIZE=0
# - CONFIG_DYNAMIC_THREAD_ALLOC=n
# - CONFIG_USERSPACE=y
kernel.threads.dynamic_thread.stack.no_pool.alloc.no_user:
extra_configs:
# 010
- CONFIG_DYNAMIC_THREAD_POOL_SIZE=0
- CONFIG_DYNAMIC_THREAD_ALLOC=y
- CONFIG_USERSPACE=n
# kernel.threads.dynamic_thread.stack.no_pool.alloc.user:
# tags: userspace
# extra_configs:
# # 011
# - CONFIG_DYNAMIC_THREAD_POOL_SIZE=0
# - CONFIG_DYNAMIC_THREAD_ALLOC=y
# - CONFIG_USERSPACE=y
kernel.threads.dynamic_thread.stack.pool.no_alloc.no_user:
extra_configs:
# 100
- CONFIG_DYNAMIC_THREAD_POOL_SIZE=2
- CONFIG_DYNAMIC_THREAD_ALLOC=n
- CONFIG_USERSPACE=n
# kernel.threads.dynamic_thread.stack.pool.no_alloc.user:
# tags: userspace
# extra_configs:
# # 101
# - CONFIG_DYNAMIC_THREAD_POOL_SIZE=2
# - CONFIG_DYNAMIC_THREAD_ALLOC=n
# - CONFIG_USERSPACE=y
kernel.threads.dynamic_thread.stack.pool.alloc.no_user:
extra_configs:
# 110
- CONFIG_DYNAMIC_THREAD_POOL_SIZE=2
- CONFIG_DYNAMIC_THREAD_ALLOC=y
- CONFIG_USERSPACE=n
# kernel.threads.dynamic_thread.stack.pool.alloc.user:
# tags: userspace
# extra_configs:
# # 111
# - CONFIG_DYNAMIC_THREAD_POOL_SIZE=2
# - CONFIG_DYNAMIC_THREAD_ALLOC=y
# - CONFIG_USERSPACE=y