zephyr/tests/lib/newlib/thread_safety/testcase.yaml
Stephanos Ioannidis fb4325ea32 tests: newlib: thread_safety: Add internal lock and userspace tests
This commit adds the tests for the newlib retargetable locking
interface, as well as the tests for the internal lock functions that
are supposed to internally invoke the retargetable locking interface.

All of these tests must pass when the toolchain newlib is compiled with
the `retargetable-locking` and `multithread` options, which are
required to ensure that the newlib is thread-safe, enabled. If the
toolchain newlib is compiled with either of these options disabled,
this test will fail.

This commit also adds the userspace testcases to ensure that the newlib
is thread-safe in the user mode.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-08-09 08:51:24 -05:00

54 lines
1.8 KiB
YAML

common:
filter: TOOLCHAIN_HAS_NEWLIB == 1
min_ram: 64
tests:
libraries.libc.newlib.thread_safety:
tags: clib newlib
libraries.libc.newlib_nano.thread_safety:
tags: clib newlib
filter: CONFIG_HAS_NEWLIB_LIBC_NANO
extra_configs:
- CONFIG_NEWLIB_LIBC_NANO=y
libraries.libc.newlib.thread_safety.stress:
tags: clib newlib
slow: true
extra_configs:
- CONFIG_NEWLIB_THREAD_SAFETY_TEST_STRESS=y
libraries.libc.newlib_nano.thread_safety.stress:
tags: clib newlib
filter: CONFIG_HAS_NEWLIB_LIBC_NANO
slow: true
extra_configs:
- CONFIG_NEWLIB_THREAD_SAFETY_TEST_STRESS=y
- CONFIG_NEWLIB_LIBC_NANO=y
libraries.libc.newlib.thread_safety.userspace:
tags: clib newlib userspace
filter: CONFIG_ARCH_HAS_USERSPACE
extra_args: CONF_FILE=prj_userspace.conf
libraries.libc.newlib_nano.thread_safety.userspace:
tags: clib newlib userspace
filter: CONFIG_ARCH_HAS_USERSPACE and CONFIG_HAS_NEWLIB_LIBC_NANO
extra_args: CONF_FILE=prj_userspace.conf
extra_configs:
- CONFIG_NEWLIB_LIBC_NANO=y
libraries.libc.newlib.thread_safety.userspace.stress:
tags: clib newlib userspace
filter: CONFIG_ARCH_HAS_USERSPACE
slow: true
timeout: 120
extra_args: CONF_FILE=prj_userspace.conf
extra_configs:
- CONFIG_NEWLIB_THREAD_SAFETY_TEST_STRESS=y
- CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE=8192
libraries.libc.newlib_nano.thread_safety.userspace.stress:
tags: clib newlib userspace
filter: CONFIG_ARCH_HAS_USERSPACE and CONFIG_HAS_NEWLIB_LIBC_NANO
slow: true
timeout: 120
extra_args: CONF_FILE=prj_userspace.conf
extra_configs:
- CONFIG_NEWLIB_THREAD_SAFETY_TEST_STRESS=y
- CONFIG_NEWLIB_LIBC_NANO=y
- CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE=2048