Skip to content

Commit 91749df

Browse files
Pancakemnashif
authored andcommitted
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 <[email protected]>
1 parent 55ad66a commit 91749df

File tree

4 files changed

+46
-7
lines changed

4 files changed

+46
-7
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(xsi_streams)
6+
7+
FILE(GLOB app_sources src/main.c)
8+
9+
target_sources(app PRIVATE ${app_sources})

tests/posix/xsi_streams/prj.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_POSIX_API=y
2+
CONFIG_ZTEST=y
3+
4+
CONFIG_POSIX_AEP_CHOICE_BASE=y
5+
CONFIG_XOPEN_STREAMS=y

tests/posix/common/src/stropts.c renamed to tests/posix/xsi_streams/src/main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <stropts.h>
88
#include <errno.h>
99

10-
ZTEST(stropts, test_putmsg)
10+
ZTEST(xsi_streams, test_putmsg)
1111
{
1212
const struct strbuf *ctrl = NULL;
1313
const struct strbuf *data = NULL;
@@ -18,7 +18,7 @@ ZTEST(stropts, test_putmsg)
1818
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
1919
}
2020

21-
ZTEST(stropts, test_fdetach)
21+
ZTEST(xsi_streams, test_fdetach)
2222
{
2323
char *path = NULL;
2424
int ret = fdetach(path);
@@ -27,7 +27,7 @@ ZTEST(stropts, test_fdetach)
2727
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
2828
}
2929

30-
ZTEST(stropts, test_fattach)
30+
ZTEST(xsi_streams, test_fattach)
3131
{
3232
char *path = NULL;
3333
int fd = -1;
@@ -37,7 +37,7 @@ ZTEST(stropts, test_fattach)
3737
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
3838
}
3939

40-
ZTEST(stropts, test_getmsg)
40+
ZTEST(xsi_streams, test_getmsg)
4141
{
4242
struct strbuf *ctrl = NULL;
4343
struct strbuf *data = NULL;
@@ -48,7 +48,7 @@ ZTEST(stropts, test_getmsg)
4848
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
4949
}
5050

51-
ZTEST(stropts, test_getpmsg)
51+
ZTEST(xsi_streams, test_getpmsg)
5252
{
5353
struct strbuf *ctrl = NULL;
5454
struct strbuf *data = NULL;
@@ -59,7 +59,7 @@ ZTEST(stropts, test_getpmsg)
5959
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
6060
}
6161

62-
ZTEST(stropts, test_isastream)
62+
ZTEST(xsi_streams, test_isastream)
6363
{
6464
int fd = -1;
6565
int ret = isastream(fd);
@@ -68,4 +68,4 @@ ZTEST(stropts, test_isastream)
6868
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
6969
}
7070

71-
ZTEST_SUITE(stropts, NULL, NULL, NULL, NULL, NULL);
71+
ZTEST_SUITE(xsi_streams, NULL, NULL, NULL, NULL, NULL);

tests/posix/xsi_streams/testcase.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
common:
2+
filter: not CONFIG_NATIVE_LIBC
3+
tags:
4+
- posix
5+
- xsi_streams
6+
# 1 tier0 platform per supported architecture
7+
platform_key:
8+
- arch
9+
- simulation
10+
min_flash: 64
11+
min_ram: 32
12+
tests:
13+
portability.posix.xsi_streams: {}
14+
portability.posix.xsi_streams.minimal:
15+
extra_configs:
16+
- CONFIG_MINIMAL_LIBC=y
17+
portability.posix.xsi_streams.newlib:
18+
filter: TOOLCHAIN_HAS_NEWLIB == 1
19+
extra_configs:
20+
- CONFIG_NEWLIB_LIBC=y
21+
portability.posix.xsi_streams.picolibc:
22+
tags: picolibc
23+
filter: CONFIG_PICOLIBC_SUPPORTED
24+
extra_configs:
25+
- CONFIG_PICOLIBC=y

0 commit comments

Comments
 (0)