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_system_logging/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_system_logging)

target_sources(app PRIVATE src/main.c)

target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)
5 changes: 5 additions & 0 deletions tests/posix/xsi_system_logging/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_XSI_SYSTEM_LOGGING=y
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#include <zephyr/posix/unistd.h>
#include <zephyr/ztest.h>

#define N_PRIOS 8
#define N_PRIOS 8
/* avoid clashing with Zephyr's LOG_ERR() */
#define _LOG_ERR 3

ZTEST(syslog, test_syslog)
ZTEST(xsi_system_logging, test_syslog)
{
int prios[N_PRIOS] = {
LOG_EMERG, LOG_ALERT, LOG_CRIT, _LOG_ERR,
Expand All @@ -33,4 +33,4 @@ ZTEST(syslog, test_syslog)
usleep(100000);
}

ZTEST_SUITE(syslog, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(xsi_system_logging, NULL, NULL, NULL, NULL, NULL);
24 changes: 24 additions & 0 deletions tests/posix/xsi_system_logging/testcase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
common:
filter: not CONFIG_NATIVE_LIBC
tags:
- xsi.system.logging
# 1 tier0 platform per supported architecture
platform_key:
- arch
- simulation
min_flash: 64
min_ram: 32
tests:
portability.xsi.system.logging: {}
portability.xsi.system.logging.minimal:
extra_configs:
- CONFIG_MINIMAL_LIBC=y
portability.xsi.system.logging.newlib:
filter: TOOLCHAIN_HAS_NEWLIB == 1
extra_configs:
- CONFIG_NEWLIB_LIBC=y
portability.xsi.system.logging.picolibc:
tags: picolibc
filter: CONFIG_PICOLIBC_SUPPORTED
extra_configs:
- CONFIG_PICOLIBC=y
Loading