tests: posix: common: separate posix xsi streams to standalone test
posix.common contains testsuites that can be separated into smaller groups of tests. This change moves stropts into a singular testsuite at tests/posix/xsi_streams app directory. Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
This commit is contained in:
parent
55ad66a30c
commit
91749dfeb3
4 changed files with 46 additions and 7 deletions
9
tests/posix/xsi_streams/CMakeLists.txt
Normal file
9
tests/posix/xsi_streams/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(xsi_streams)
|
||||
|
||||
FILE(GLOB app_sources src/main.c)
|
||||
|
||||
target_sources(app PRIVATE ${app_sources})
|
5
tests/posix/xsi_streams/prj.conf
Normal file
5
tests/posix/xsi_streams/prj.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
CONFIG_POSIX_API=y
|
||||
CONFIG_ZTEST=y
|
||||
|
||||
CONFIG_POSIX_AEP_CHOICE_BASE=y
|
||||
CONFIG_XOPEN_STREAMS=y
|
|
@ -7,7 +7,7 @@
|
|||
#include <stropts.h>
|
||||
#include <errno.h>
|
||||
|
||||
ZTEST(stropts, test_putmsg)
|
||||
ZTEST(xsi_streams, test_putmsg)
|
||||
{
|
||||
const struct strbuf *ctrl = NULL;
|
||||
const struct strbuf *data = NULL;
|
||||
|
@ -18,7 +18,7 @@ ZTEST(stropts, test_putmsg)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST(stropts, test_fdetach)
|
||||
ZTEST(xsi_streams, test_fdetach)
|
||||
{
|
||||
char *path = NULL;
|
||||
int ret = fdetach(path);
|
||||
|
@ -27,7 +27,7 @@ ZTEST(stropts, test_fdetach)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST(stropts, test_fattach)
|
||||
ZTEST(xsi_streams, test_fattach)
|
||||
{
|
||||
char *path = NULL;
|
||||
int fd = -1;
|
||||
|
@ -37,7 +37,7 @@ ZTEST(stropts, test_fattach)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST(stropts, test_getmsg)
|
||||
ZTEST(xsi_streams, test_getmsg)
|
||||
{
|
||||
struct strbuf *ctrl = NULL;
|
||||
struct strbuf *data = NULL;
|
||||
|
@ -48,7 +48,7 @@ ZTEST(stropts, test_getmsg)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST(stropts, test_getpmsg)
|
||||
ZTEST(xsi_streams, test_getpmsg)
|
||||
{
|
||||
struct strbuf *ctrl = NULL;
|
||||
struct strbuf *data = NULL;
|
||||
|
@ -59,7 +59,7 @@ ZTEST(stropts, test_getpmsg)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST(stropts, test_isastream)
|
||||
ZTEST(xsi_streams, test_isastream)
|
||||
{
|
||||
int fd = -1;
|
||||
int ret = isastream(fd);
|
||||
|
@ -68,4 +68,4 @@ ZTEST(stropts, test_isastream)
|
|||
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
|
||||
}
|
||||
|
||||
ZTEST_SUITE(stropts, NULL, NULL, NULL, NULL, NULL);
|
||||
ZTEST_SUITE(xsi_streams, NULL, NULL, NULL, NULL, NULL);
|
25
tests/posix/xsi_streams/testcase.yaml
Normal file
25
tests/posix/xsi_streams/testcase.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
common:
|
||||
filter: not CONFIG_NATIVE_LIBC
|
||||
tags:
|
||||
- posix
|
||||
- xsi_streams
|
||||
# 1 tier0 platform per supported architecture
|
||||
platform_key:
|
||||
- arch
|
||||
- simulation
|
||||
min_flash: 64
|
||||
min_ram: 32
|
||||
tests:
|
||||
portability.posix.xsi_streams: {}
|
||||
portability.posix.xsi_streams.minimal:
|
||||
extra_configs:
|
||||
- CONFIG_MINIMAL_LIBC=y
|
||||
portability.posix.xsi_streams.newlib:
|
||||
filter: TOOLCHAIN_HAS_NEWLIB == 1
|
||||
extra_configs:
|
||||
- CONFIG_NEWLIB_LIBC=y
|
||||
portability.posix.xsi_streams.picolibc:
|
||||
tags: picolibc
|
||||
filter: CONFIG_PICOLIBC_SUPPORTED
|
||||
extra_configs:
|
||||
- CONFIG_PICOLIBC=y
|
Loading…
Add table
Add a link
Reference in a new issue