This test does not use any APIs beyond those provided in the Zephyr
standard set, so it should not define _POSIX_C_SOURCE.
Signed-off-by: Keith Packard <keithp@keithp.com>
Similar to nRF54L15, the MDK files in HAL for this SoC are not
compatible with C++98, so currently the test cannot be performed
on this SoC.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The test instantiate few vnd,i2c devices so it fails with boards with
devices that select I2C, as that causes i2c_test.c to be included with
the build that tries to redefine the same devices as well.
This is a library test anyway, so restricting to native_sim should be
good enough for it anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
strnlen() and strtok_r() are tested in this files
which are extensions to the the
std C library. Let's explicity select one of the extensions
also when building with the host C library,
instead of relaying on somebody having
set it for this file somewhere else.
Also, let's be nice and undefine them first in case they had
been defined somewhere else in the build scripts.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This constant is supposed to be defined as a long instead of an int,
presumably to support systems where int isn't large enough.
Signed-off-by: Keith Packard <keithp@keithp.com>
For qemu_x86 and qemu_x86_64, it would seem that
heap-allocated thread stacks, as well as thread stacks
defined via K_THREAD_STACK_ARRAY_DEFINE(), must be at least
4096 bytes in size.
Using those sizes will ensure that these tests do not
fail with stack overflows or MMU faults.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Zephyr does not include this function under Rule A.4: C Standard Library
Usage Restrictions in Zephyr Kernel, hence a conforming C library need not
provide it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Added new test for `DT_IRQ_LEVEL` and `DT_INST_IRQ_LEVEL`.
Introduced a new `vnd.cpu-intc` compatible so that we have a
root level interrupt controller that acts as level 1
aggregator, and modified `test_intc` to be level 2 aggregator,
updated test of `DT_IRQN(TEST_I2C_BUS)` accordingly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Extend api test suite to cover the new devicetree macros. This
includes extending the devicetree overlay with two new bindings:
- GPIO device which is also an interrupt controller
- interrupt holder using interrupts-extended to point to both
existing interrupt controller test_intc, and the newly added
GPIO device
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
__bswap_ in zephyr/sys/byteorder.h conflicts with __bswap_ in host's
byteswap.h. byteswap.h from host compiler used in posix_native_64 boards
causes a compilation issue.
This commit renames __bswap_ to BSWAP_ to prevent collision.
Before this commit a compilation error can be created by adding #include
<byteswap.h> to samples/net/sockets/echo/src/socket_echo.c
This does not change external API to byteorder.h, but does change
internal implementation which some other source files depend on.
Replaced manual byteswap operations in devmem_service.c with APIs from
byteorder.h which automatically converts to CPU endianess when necessary.
Fixes#44324
Signed-off-by: Jonathan Hamberg <jonathanhamberg@gmail.com>
Add test case for converting statically generated package which
contains RO and RW indexes. Converting shall append RW string
and discard RO index.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
tag nano libc tests with nano so we can exclude them if needed. Now they
cause issues when collecting coverage information from tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This enables the sqrt() and sqrtf() tests also in case of soft-float
configurations. It is expected that the tests will link, run and pass
also in such configuration.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
These were first deprecated in v3.2. We have kept support for them
for as long as we can, but now their presence is causing CI failures
in some configurations. Specifically, using the deprecated 'label'
property is causing a warning which is promoted to an error in some
twister runs. This is blocking other forward progress in the
devicetree API.
I tried to rework the tests to avoid this, but it was too much effort
for the time I had to work on the task. Removing the APIs is therefore
unfortunately the best way forward to unblocking other work.
Re-work the test suite a bit to maintain coverage where we are using
the label property to test other macros.
Add a migration guide section to help with the transition.
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
That comment applies to all posix arch based boards,
not just native_posix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not just native_posix that supports the sqrt test,
but all posix arch based ones.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
c++2B standard is not supported for xt clang compiler so
exclude cpp2B testcase for xt-clang toolchain.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On some SMP platforms (such as intel_adsp_ace15_mtpm) it is not
safe to access the stack of a thread that is currently executing
on another CPU. This requires that tests be written such that
objects and data that are shared between threads that may execute
concurrently on different CPUs be placed into memory that is not
a thread's stack.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Enable this test which runs in native_posix_64 in
native_sim(_64), and set default test platform
to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
C library testing is mainly there to support what is
necessary to support Zephyr. We do test a variety of libcs
currently, which is where YAML comes in handy.
However, the main libc testsuite can be overkill for testing
some things, and might not be suitable for testing optional
features.
Create a 'common' subdirectory for common libc tests.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The acpi_get_irq_routing_table() takes a pointer to an array of
ACPI_PCI_ROUTING_TABLE elements rather than a generic buffer pointer
(e.g. void *).
Because of the above, it makes sense to specify the array size as an
actual ARRAY_SIZE() value, since it makes no sense to accept buffers
which are not a multiple of sizeof(ACPI_PCI_ROUTING_TABLE) long.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>