Commit Graph

1955 Commits

Author SHA1 Message Date
Rodrigo Peixoto
6d0760aa98 tests: zbus: Add separate tests for ALLOC NONE
Add tests for ALLOC_NONE configuration.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2025-05-16 09:37:20 +02:00
Rodrigo Peixoto
f6f2b527bb tests: zbus: Adjust runtime observers tests
Reverse the changes the affected API and add test to the new dynamic and
static variations.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2025-05-16 09:37:20 +02:00
Anas Nashif
5fe84d5b69 arch: nios2: remove arch
Remove architecture and dependencies.
Remove altera HAL supporting nios2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-15 20:01:05 -04:00
Riadh Ghaddab
457ade48b4 settings: zms: code style clean up
Clean some parts of the code and refactor it to avoid multiple nested
conditions.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
cad2f1c103 settings: add new API function settings_get_val_len()
Add a function to get the value's length of a Key. If it doesn't exist
returns 0.
Add ZMS implementation for csi_get_val_len() and a default implementation
for the other storage systems.
Add some functional tests to verify it.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
dffdec18c2 tests: settings: add functional test for ZMS
Add the functional test for the new backend of ZMS

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
a903b4b0d1 tests: settings: add a functional test for settings_load_one
Add a test for the new API settings_load_one that loads only one path
from the persistent storage.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Keith Packard
958ef2288e tests/llext: Compute linker script option rather than using -Wl,-T
Use the same logic as the top-level Zephyr CMakeLists.txt does to
find the linker script option by using the first one of these
which is set:

 1. Global TOPT property
 2. Compiler's linker_script property
 3. -Wl,-T

This avoids toolchains which insert a default linker script
when none is provided on the command line using the -T option.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-12 21:09:44 +02:00
Arkadiusz Balys
ca40f410ac openthread: Change log level to PLATFORM in OpenThread platform
Stop using L2 log level in OpenThread platform files.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-08 15:56:11 +02:00
Marek Slowinski
deae35917f tests: coredump: Call k_panic() directly for mpfs_icicle board
mpfs_icicle timeouts on this test similarly to other boards
simulated in Renode. Null pointer dereference doesn't trigger
a CPU fault during simulation. Instead, call k_panic() directly.

Link: a28d5df5c6

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
2025-05-06 13:01:00 +02:00
Marek Slowinski
69592710fa tests: debug/coredump: Disable clang-format for column-aligned macro
Keep manually aligned lines for better readability.

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
2025-05-06 13:01:00 +02:00
Markus Lassila
10bd2de235 modem: backend: uart: Add hw-flow-control for UART
Add Asynchronous UART implementation, which does not drop data
when automatic hardware-flow-control is set in the device tree.

With automatic hardware flow control, the CTS pin will be
automatically deactivated when there are no more asynchronous
UART RX buffers available. After buffer space becomes available,
and UART RX is restarted, the CTS pin will be activated.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Bjarki Arge Andreasen
24dd37929c tests: modem: backends: uart: add hw flow control option
Extend test modem uart backend test suite to support testing hw
flow control, which is performed by using a small receive
buffer for the modem uart backend, and slowing down the read
of received data, ensuring the buffer will be overrun if hw flow
control is not working.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Bjarki Arge Andreasen
525d3d680d tests: modem: backends: uart: boards: add hw-flow-control
Update the board overlays to support hardware flow control for
testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Christoph Winklhofer
13054293ad tests: logging: Allow LOG_PRINTK from user space
The commit '3b29b9fa3b4 (tests: logging: restore userspace testing,
2025-04-18)' set CONFIG_LOG_PRINTK=n which brakes the build on the
platform 'ip_k66f'.

Without CONFIG_LOG_PRINTK=n (dependency from CONFIG_USERSPACE=y) some
tests in 'tests/subsys/logging/log_core_additional/logging.log_user'
would not build.

Remove this dependency so that LOG_PRINTK can also be used from user
space, which is possible since '77925656ab8 (logging: Fix runtime
message creation in user-mode thread, 2025-04-18)' and reset
CONFIG_LOG_PRINTK=y.

Fixes: #89067
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-05-05 12:20:34 +02:00
Dominik Ermel
71a329fbb0 tests: flash_map: Basic offset/length overflow tests
Test integer overflow on Flash Area operation parameters.
All functions call the same is_in_flash_area_bounds
function for parameter verification, so it was enough
to test parameter checks of flash_read.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-05-05 10:57:51 +02:00
Arkadiusz Cholewinski
1366fa94f5 Tests: PM: Fix tests.
Change expected values for:
- pm/power_states
- pm/power_residency_time
- pm/power_wakeup_timer

and fix pm/power_wakeup_timer.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2025-05-02 15:21:07 +02:00
Lauren Murphy
e0a54835c2 llext: support ARC MPU
Make it so LLEXT allocates a memory region equal or greater
to the minimum size supported by the MPU, to ensure no region
overlap.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-05-01 18:16:30 +02:00
Jamie McCrae
9bd8bd6b75 tests: mgmt: mcumgr: img_mgmt_slot_info: Fix overlay
Fixes the order of the overlay which now throws an error

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-01 09:33:34 +02:00
Luis Ubieda
996e65d526 tests: rtio: Add testcase to validate OP_DELAY
Providing a set of SQEs with varying delays in different orders. Test
validates each delay is completed at the right amount (and the CQEs are
received in the right order).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-30 09:48:16 +02:00
Marek Matej
780bafab6a tests, samples: update esp32_devkitc board records
Update the tests using the esp32_devkitc_xxx entries.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-04-29 16:48:55 +02:00
Bjarki Arge Andreasen
ac1634b585 tests: rtio: rtio_api: add await sqe test case
Add test case for RTIO_OP_AWAIT SQE.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-04-29 16:47:26 +02:00
Paul Alvin
87b664e3a2 tests: subsys: sd: Add board overlays to support testcase
Add SD/EMMC overlay files to support testcases for Versal NET. This
overlays are used to select the device to be tested.

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
2025-04-28 12:56:50 -05:00
Paul Alvin
ec23317813 tests: sd: mmc: Add filter for sdhc0 alias
Test expect sdhc0 alias to be defined.

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
2025-04-28 12:56:50 -05:00
Andrej Butok
9126b1240d tests: littlefs: add 18 tested NXP boards to testcase.yaml
Adds 18 tested NXP boards to the littlefs testcase.yaml

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-25 11:04:51 +02:00
Jordan Yates
0b5021aec8 tests: fs: lib_link: add RAM disk overlay
Add a basic RAM disk overlay for libraries that expect at least one disk
driver to be enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-24 11:56:57 +02:00
Greg Leach
2aff40b1b1 tests: Add BL54L15/L15u DVK support
Adds support for the BL54L15 and BL54L15u DVK boards.

Signed-off-by: Greg Leach <greg.leach@ezurio.com>
2025-04-23 15:02:20 +02:00
Christoph Winklhofer
3b29b9fa3b tests: logging: restore userspace testing
Restore userspace testing that was removed with commit 'aa2b72d32af
(tests: logging: remove userspace testing, 2024-04-10)' and reported in
the issue #49213.

For the tests running with threads in user space (with ZTEST_USER),
the memory partitions are configured in the test-suite setup.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Eric Ackermann
f9331854c8 tests: coredump: Add exception for cva6
The nullpointer address (0x0) is mapped to the debug module in cva6,
making it a valid address.
Thus, in the coredump test, trigger an exception using k_panic()
instead.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-04-18 17:46:30 +02:00
Krzysztof Chruściński
ecabcf5db5 pm: Use pointers for current and forced power states
Use power state pointers instead of copies which improves performance.

Align power_mgmt_multicore test which was creating pm states in
runtime.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-17 21:17:18 +02:00
Jordan Yates
ab34a9df48 zbus: remove k_malloc dependency for ZBUS_RUNTIME_OBSERVERS
Remove the dependency on the system heap existing when enabling
`ZBUS_RUNTIME_OBSERVERS`. Instead the previously allocated memory is
required to be provided to `zbus_chan_add_obs` (which can still be
allocated through malloc).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-14 20:03:09 +02:00
Fin Maaß
1c788ba74d tests: storage: flash_map: add test for flash_area_copy()
add test for flash_area_copy().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-14 16:07:35 +02:00
Andrej Butok
c4b92123d3 tests: littlefs: add .conf and .overlay for nxp boards
Adds littlefs test .conf and .overlay files for 18 nxp boards.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-11 22:07:03 +02:00
Jordan Yates
52415ed94f tests: pm: device_driver_init: test state_get during init
Test the value returned by `pm_device_state_get` during device driver
initialisation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-11 14:53:53 +02:00
Utsav Munendra
12cba7addf portability: cmsis: Bugfix osThreadFlagsWait behavior
The osFlagsWaitAny option is not handled correctly.  It returns once any
flag at all is set, whereas it is supposed to only return once one of
the flags specified in flags is set.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-04-11 06:34:06 +02:00
Tomasz Moń
b3eb6f2d11 usb: device_next: Reduce code size on Full-Speed only configuration
Allow compiler optimizations to remove High-Speed handling code. Knowing
that maximum operating speed is Full-Speed allows to reduce bulk buffers
from 512 to 64 bytes. More RAM optimizations are possible but this
commit only gets the low hanging fruits.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-10 12:57:19 +02:00
Andrej Butok
8f2f97ce32 tests: littlefs: fix large partition mounting
Fixes a large partition mounting error
for flashes with erase size > 32KB
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-07 15:18:30 +02:00
Anas Nashif
5c8cf1c18c tests: fix various test ids and use existing scheme
Fix IDs and match them to what we have in the MAINTAINERS file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-07 11:22:36 +02:00
Anas Nashif
65551f2a99 tests: move NRFS tests under tests/boards/nrf
This is not a Zephyr subsystem. It is unique to NRF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-07 11:22:36 +02:00
Andrej Butok
d4682ff5c9 tests: littlefs: fix test_lfs_basic for medium and large partitions
Fixes failed test_lfs_basic for medium partition > 960KB
and for large partition > 3MB.
Flashes with large erase size require larger test partition sizes
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-04 18:17:48 +02:00
Tom Hughes
11e3aa8952 tests: mgmt: mcumgr: Disable clang warning
When building with clang it reports:

tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:69:22: error: variable
'test_response_read_data_start' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_start[5] = {
                     ^
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:73:22: error: variable
'test_response_read_data_end' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_end[1] = {
                     ^

The values of test_response_read_data_start and
test_response_read_data_end are not actually used anywhere in the tests.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-03 21:06:02 +02:00
Riadh Ghaddab
e8e7290aba tests: zms: decrease verbosity
disable by default the LOG_DBG messages

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-04-03 17:48:09 +02:00
Dmitrii Golovanov
315ff5dadc tests: logging: logging.thread: add missed LF in logs
Add missed line feed chars at the test's output to fix Ztest's
following status messages corrupted.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Dmitrii Golovanov
125de99433 tests: logging: logging.thread: fix Ztest log corruption
Flush test log messages before waiting for the processing
thread to avoid delayed log output messing with the Ztest's
log output on the test complete.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Dmitrii Golovanov
fc2ea3027d tests: logging: logging.thread: fix race condition
Fix race condition in tests/subsys/logging/log_core_additional
logging.thread test configuration released semaphore before
log message output.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Matthias Hauser
941a5489d3 dts: boards: we: add board Ophelia-IV
add new board Ophelia-IV

Signed-off-by: Matthias Hauser <matthias.hauser@we-online.de>
2025-04-03 13:16:05 +02:00
Andrej Butok
172811b69c tests: nvs: allow to build & run on real platforms
- Allows to build and run NVS tests on real platforms.
- Enables NVS tests designed for a flash-simulator only when
  built for qemu_x86, mps2_an385 or native_sim targets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:33 +02:00
Andrej Butok
a12f71d5e5 tests: littlefs: fix test_fs_mkfs_custom littlefs_init_cfg() fail
Fixes the littleFS test_fs_mkfs_custom test fail
in littlefs_init_cfg(): "erase size must be multiple of write size".
It happens for platforms with erase size < 2*write size (e.g. lpc55s).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:18 +02:00
Andrej Butok
b477a60a9c tests: littlefs: fix false negative test_lfs_basic
Fixes the false negative littlefs.test_lfs_basic test that can occur
if the small_partition size > 64KB, and for
platforms with CONFIG_FS_LITTLEFS_PROG_SIZE > 64 (e.g. lpc55s, mcxn).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:12 +02:00
Tom Hughes
785e36520f tests: subsys: usb: bos: Remove dummy_descriptor struct
When building with clang, it warns:

tests/subsys/usb/bos/src/test_bos.c:24:22: error: variable
'dummy_descriptor' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t dummy_descriptor[] = {
                     ^

Only the size of dummy_descriptor is used, not the contents. Replace the
struct with a constant for the size.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-01 11:54:20 +02:00