Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/posix/xsi_streams/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions tests/posix/xsi_streams/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_POSIX_API=y
CONFIG_ZTEST=y

CONFIG_POSIX_AEP_CHOICE_BASE=y
CONFIG_XOPEN_STREAMS=y
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand All @@ -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 changes: 25 additions & 0 deletions tests/posix/xsi_streams/testcase.yaml
Original file line number Diff line number Diff line change
@@ -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