Update prj.conf so that
subsys/net/lib/sockets/socketpair.c
is pulled into the build and zsock_socketpair() is
properly defined.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Check for the existence of
pthread_rwlockattr_getpshared()
and
pthread_rwlockattr_setpshared().
Signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Uncomment the check for sockatmark() to ensure that the function
is declared in sys/socket.h, as a stub implementation was added
in the previous commit.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Uncomment netdb.h tests now that we have an implementation and
can check for the existence of e.g. hostent, netent, protoent,
and servent structure fields, as well as associated accessor
functions.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Uncomment net/if.h tests in tests/posix/headers since we now
have an implementation and can check for the existence of
structures, functions, etc.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Implement tests for `sched_rr_get_interval()` .
Function is actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.
signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Implement tests for `sched_setparam()` and `sched_setscheduler()` .
Both functions are actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.
signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Adds test cases for sysconf() basic implementation.
Test case does not cover scenario where invalid value is passed
to the name argument of the function.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Adds test cases testing following features:
- function error handling
- basic notification type
- thread notification type
- adding notification to non-empty queue
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Initial implementation of `sched_getparam()` and `sched_getscheduler()`
POSIX APIs as a part of PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.
Both functions are actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
The function pthread_setcancelstate() has been supported for
some time already in Zephyr. For some reason, it was not being
checked in the "headers" testsuite.
Additionally, check for pthread_setcanceltype() since it was
added in a prior commit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Ensure that the "headers" test checks that the following constants
are defined:
* PTHREAD_PROCESS_SHARED
* PTHREAD_PROCESS_PRIVATE
* PTHREAD_COND_INITIALIZER
* PTHREAD_MUTEX_INITIALIZER
* PTHREAD_CANCELED
They were already defined by previous commits, but the test had not
been updated.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
These calls were added some time ago, so ensure they are checked
for existence.
* pthread_condattr_getclock()
* pthread_condattr_setclock()
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The simple header test was not updated to verify that the
following functions were implemented even though they were
implemented some time ago.
* pthread_spin_destroy()
* pthread_spin_init()
* pthread_spin_lock()
* pthread_spin_trylock()
* pthread_spin_unlock()
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add a simple existence check that pthread_atfork() has
some kind of implementation. The function is mandatory
by all conforming POSIX systems.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Some POSIX arch targets support now the POSIX API.
Instead of filtering the architecture fully,
let's limit it to the type of build
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
RT1015 needs more RAM to do this test, increase size of Zephyr SRAM
by switching zephyr,sram to the OCRAM allocation of the FLEXRAM.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Compilation of this test on nucleo_f103rb fails because "region 'RAM'
overflowed by 136 bytes". Since this board has a ram size of 20k, we set
the limit for this test at the next usual size 32k.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add a trivial suite that simply ensures headers exist and that
they supply standard symbols and constants.
These tests are intended to be ordered exactly as the respective
feature appears in the respective specification at
https://pubs.opengroup.org/onlinepubs/9699919799
Over time, as POSIX support improves, we can enable additional
checks.
If `CONFIG_POSIX_API=n`, then we simply ensure that the header
can be included, that constants and structures exist, including
the existence of required fields in each structure.
We check that a constant exist, by comparing its value against
an arbitrary number. If the constant does not exist, it would
of course be a compile error.
```
zassert_not_equal(-1, POLLIN);
```
We check that a structure contains required fields by
comparing the field offset with an arbitrary number. If
the field does not exist, of course, there would be a
compile error.
```
zassert_not_equal(-1, offsetof(struct pollfd, fd));
```
For non-scalar constants, we simply attempt to assign
a value to the specific type:
```
struct in6_addr any6 = IN6ADDR_ANY_INIT;
```
If `CONFIG_POSIX_API=y`, then we additionally check that required
functions are non-NULL (limited to what is currently supported in
Zephyr).
```
zassert_not_null(pthread_create);
```
Note: functional verification tests should be done outside of this
test suite.
Signed-off-by: Chris Friedt <cfriedt@meta.com>