Add a simple, testable sample to print everything in the utsname struct,
and added a `uname` shell cmd basically copied from nuttx just for fun.
Signed-off-by: Yong Cong Sin <ycsin@meta.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>
Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).
Fixes#53673
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Fix all hyphens errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(hyphens)'
Default config is only one space after the hyphen.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit removes explicit `CONFIG_NEWLIB_LIBC_NANO=n` overrides
because the newlib nano variant is no longer enabled by default when
it is available.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
example: <irq.h> -> <zephyr/irq.h>
Issue #41543
Signed-off-by: Yuval Peress <peress@google.com>
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This test makes use of dynamic RAM allocation done on the leftover
SRAM. Similarly to test/posix/eventfd, limit this test execution on
platforms with at least 32K of RAM available.
Fixes#38601
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This platform has a tiny handful of remaining tests that fail. We
will track them as issues, but let's exclude them from integration
testing to allow full runs to complete. Often a hung device in one
test will break an entire twister run.
Tests with known (and tracked) failures:
samples/application_development/external_lib
samples/posix/eventfd
samples/userspace/hello_world_user
tests/kernel/fatal/message_capture
tests/net/socket/socketpair
tests/portability/cmsis_rtos_v2
These tests never fail in isolated testing, but are reliable timeouts
when run in sequence in a big twister run. It's possible that the bug
here may be in twister or the flash/serial scripts:
tests/crypto/tinycrypt
tests/subsys/logging/log_immediate
tests/subsys/logging/log_output
See: #32836
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This platform has a newlib which is inexplicably missing a
_gettimeofday_r symbol. Just filter the test there.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Set integration_platforms on these samples to just mps2_an385.
This should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use time(), localtime_r(), and asctime() to confirm that the
declarations required for these (newlib) libc functions are made
available in CONFIG_POSIX context.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The sample does not provide a way to verify its operation
and causes fails on nrf platforms. Added regex checks in sample.yaml
so the sample can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Also, add prj.conf options to make the sample builds on more
platforms. Finally, update the sample source to print explicit
"Finished" message, to let user know that the processing is done.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Standard "Requirements" section copied from other networking samples,
making clear the network connection requirements and linking to
instructions for QEMU networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
To make sure this sample is built in CI.
Also includes fixing prototype of main() to make it build without
warnings (which would be errors in CI).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Roughly based on eventfd example code from Linux manpages. Similarly
to other POSIX-compatible sample, Makefile.posix is provided to build
the code on a POSIX system (in this case, as eventfd() is
Linux-specific, this has to be a Linux system).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Achieved using CONFIG_NET_CONFIG_CLOCK_SNTP_INIT option, i.e. querying
time over network using SNTP.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>