tests: posix: tests for environ, getenv, setenv, unsetenv

Add tests for environ, getenv(), setenv(), unsetenv(), and
getenv_r().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2023-12-21 09:56:18 -05:00 committed by Chris Friedt
commit 8912ba9004
4 changed files with 228 additions and 0 deletions

32
tests/posix/env/testcase.yaml vendored Normal file
View file

@ -0,0 +1,32 @@
common:
filter: not CONFIG_NATIVE_LIBC
arch_exclude:
- posix
integration_platforms:
- qemu_riscv64
tags: posix
tests:
portability.posix.env: {}
portability.posix.env.armclang_std_libc:
toolchain_allow: armclang
extra_configs:
- CONFIG_ARMCLANG_STD_LIBC=y
portability.posix.env.arcmwdtlib:
toolchain_allow: arcmwdt
extra_configs:
- CONFIG_ARCMWDT_LIBC=y
portability.posix.env.minimal:
extra_configs:
- CONFIG_MINIMAL_LIBC=y
- CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=256
portability.posix.env.newlib:
platform_exclude:
- hifive1
filter: TOOLCHAIN_HAS_NEWLIB == 1
extra_configs:
- CONFIG_NEWLIB_LIBC=y
portability.posix.env.picolibc:
tags: picolibc
filter: CONFIG_PICOLIBC_SUPPORTED
extra_configs:
- CONFIG_PICOLIBC=y