It is not possible to build anymore in that mode, so this filter
is not needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use sys_clock_gettime() instead of clock_gettime() and use
timespec_add() instead of manually adding timespec structures.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Use `timespec_from_timeout(K_MSEC(msec), &ts)` instead of leaning on
lazily-crafted timespecs with invalid tv_nsec fields.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The specification does not say that the first struct timespec passed to
thrd_sleep() may be NULL.
Preserving the testpoint so that a possible future testsuite can be
run that expects faults to occur when undefined behaviour is used.
Faults are one possible solution to handling undefined behaviour, but
it would be good to come to a concensus about how that should be
handled in Zephyr for standard function calls belonging to ISO C or
POSIX.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The C standard does not guarantee that `thrd_success` is equal to
zero, so ensure that the test takes that into account.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This test fails sporadically on SMP, so make it run only on one CPU.
Related to zephyrproject-rtos/zephyr#91620
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use CLOCK_REALTIME for the default clock source throughout
the POSIX implementation and tests so that we are
consistent with the specification.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
With the rename of intel_adsp/ace30_ptl to intel_adsp/ace30/ptl,
the "sim" variant no longer inherit the base configuration. So
make a copy of the .conf file to explicitly target the sim
variant.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The board has been renamed from intel_adsp/ace30_ptl to
intel_adsp/ace30/ptl. So the corresponding board only configs
for tests also need to renamed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Renamed soc from ace30_ptl to ace30.
We were previously using the wrong soc name.
The correct name is ace30.
There is only one ptl platform, but there can be several ace30 platforms.
Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.
Signed-off-by: Daniel Leung <daniel.leung@intel.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>
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>