Commit graph

15456 commits

Author SHA1 Message Date
Robert Lubos
7c50c0231c tests: net: http_server: core: Add tests for Server Error reply
Add tests cases verifying that the server replies with HTTP 500 Internal
Server Error reply in case of processing error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-16 14:52:10 +01:00
Robert Lubos
d32b21381b tests: net: http_server: core: Add tests for Method Not Allowed reply
Add tests cases verifying that the server replies with HTTP 405 Method
Not Allowed reply in case the client tries to access the resource with a
method it does not allow.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-16 14:52:10 +01:00
Krzysztof Chruściński
9c91b38f8f tests: drivers: uart: mix_fifo_poll: Fix for nrf54h20dk//cpurad
Add check for status okay for dut2. Compilation was failing if dut2
existed but was disabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-15 19:08:54 +01:00
Chaitanya Tata
7532e73b40 tests: wifi: configs: Add a test for disable of advanced features
This feature is handy to free up some memory, so, make sure it always
builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-15 19:06:22 +01:00
Emil Gydesen
eff93d268a Bluetooth: BAP: Add common capability check
Instead of having 2 separate and non-equal checks for
capabilities in ASCS and the Broadcast Sink, there is now
a single function in pacs.c that performs the
check.

This reduces code size and makes it easier to maintain.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-15 19:04:31 +01:00
Jianxiong Gu
eefbed2184 tests: drivers: Add RT1715 driver
Add a build test to verify richtek,rt1715 driver builds correctly.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-01-15 19:03:27 +01:00
Mark Chen
f4da9b9705 drivers: sensor: Add sensor clock API support
This commit introduces a new Sensor Clock API, enabling the retrieval
of cycle counts and conversion to nanoseconds based on the system or
external clock. The API includes:

- `sensor_clock_get_cycles()` to get the current cycle count from the
  sensor clock.
- `sensor_clock_cycles_to_ns()` to convert cycles to nanoseconds using
  the clock's frequency.

The implementation supports both system clocks and external clocks
defined in the device tree, making the sensor clock integration more
flexible for various sensor use cases.

Signed-off-by: Mark Chen <mark.chen@cienet.com>
2025-01-15 19:03:13 +01:00
Fabian Blatz
705365c747 drivers: stepper: Change stepper velocity to step interval
Change the stepper API to instead of changing the stepper speed based on
the velocity in microsteps per second to use the delay in usec between
successive steps. Also remove the velocity from the `stepper_run` function
as typical API usage is enable -> set step interval -> run.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-15 15:06:37 +01:00
Krzysztof Chruściński
0359f37263 tests: kernel: gen_isr_table: Fix test for nRF VPR targets
Test was using interrupt lines which does not exist on nRF VPR
targets. nRF54Lx FLPR has interrupts >= 16 and nRF54Hx PPR does
not have interrupt 17. Added configuration which works for
nrf54h20_cpuppr and nrf54lx_flpr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-15 15:05:38 +01:00
Pieter De Gendt
5d23996361 tests: application_development: Add spdx SBOM test
Add a test where the software bill of materials is generated using the
west spdx extension.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-15 15:03:59 +01:00
Rafał Kuźnia
6f419cd6fb tests: nrf: enable twister tests for nrf54l09pdk
Enabled tests:
- clock_control_api
- nrf_clock_calibration
- nrf_lf_clock_start
- clock_control/onoff
- counter_basic_api
- flash/common
- flahs/negative_tests
- retained_mem/api
- nrf_grtc_timer
- wdt_error_cases
- fs/fcb
- stream/stream_flash

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-01-15 11:52:03 +01:00
Jilay Pandya
c5aed65a54 dts: bindings: gpio: use hyphens instead of underscore
replace underscore with hyphens to comply with device tree spec

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-15 11:51:33 +01:00
Andriy Gelman
9eb036cccd tests: drivers: dma: Add xmc4x_relax_kit overlays to loop_transfer test
Adds overlays for xmc45_relax_kit and xmc47_relax_kit boards.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-01-15 01:36:59 +01:00
Gerson Fernando Budke
ea7922195b clocks: atmel: sam0: Fix gclk and mclk clock bindings
The Atmel SAM0 SoC enable peripherals clocks in distinct places: PM and
MCLK. The old devices had defined the peripheral clock enable bit at PM.
On the newer devices this was extracted on a dedicated memory section
called Master Clock (MCLK). This change excludes the dedicated bindings
in favor of a generic approach that cover all cases.

Now the clocks properties is complemented by the atmel,assigned-clocks
property. It gives the liberty to user to customize the clock source
from a generic clock or configure the direct connections.

All peripherals drivers were reworked with the newer solution.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-14 20:49:03 +01:00
Neil Chen
0f64fe4cf8 tests: adc: Enable ADC tests for frdm_mcxc444 board
Enable ADC tests for frdm_mcxc444 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-14 17:57:23 +01:00
Lucien Zhao
5c3efe1e68 samples: userspace: shared_mem: remove mimxrt700_evk cm33 cores
The number of mpu regions that can be configured is less than four cases.
Therefore, only remove this case on cm33 cores, failed log show below:
"num_parts of 4 exceeds maximum allowable partitions (3)"

samples: kernel: mem_protect: userspace: remove mimxrt700_evk cm33 cores

The maximum number of partitions is less than the number of partitions
currently required, causing case to be unable to apply for or delete
excess regions.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Robin Kastberg
3f3c66f664 tests: kernel: timer_behaviour shouldnt use fabs
Currently the timer_behavior test uses fabs.
Since the C library functions being used in the kernel
is restricted in Rule A.4 in the Coding Standard
We should probably not use these functions in tests either.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-01-14 15:39:38 +01:00
Adam Kondraciuk
eb7e947d78 tests: kernel: Fix for nRF54H20
Fix failing tests for nRF54H20 target.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-01-14 15:38:32 +01:00
Adam Kondraciuk
2b91df8810 tests: arch: arm: arm_irq_vector_table: Fix for nRF54H20
Fix failing tests for nRF54H20 targets.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-01-14 15:38:32 +01:00
Jakub Zymelka
fc59ce3970 tests: drivers: mspi: make MSPI API test more generic
Add ifdefs to make MSPI API test more generic.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-01-14 15:38:16 +01:00
alperen sener
35aea49096 tests: bluetooth: tester: Increase number of PSA key slots for mesh
MESH PTS tests require different number of keys, as an example; only
one netkey requires 8 key slots and there are test cases that use at
least two netkeys which consume the default 16 slots, so it is better
to have enough slots all times. Setting slot count to 32.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2025-01-14 13:38:15 +01:00
Robin Kastberg
75daa436ec tests: kernel: workq_stop uninitialized variable
test_k_workqueue_stop uses an uninitialized variable, causing
sporadic test failures.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-01-14 13:25:35 +01:00
James Roy
d1b782e5b3 dts: bindings: counter: Change the property names in the overlay
Rename the following properties in binding and overlay:
-- primary_source => primary-source
-- secondary_source => secondary-source
-- filter_count => filter-count
-- filter_period => filter-period

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-14 13:24:14 +01:00
Aleksandr Khromykh
967b096ad9 Bluetooth: Mesh: use secure storage in ble mesh
Commit:
 - adds dependency of the mbedtls psa usage on secure storage
 - removes PSA ITS emulator and enables usage of
   the secure storage in ble mesh bsim tests
 - enables secure storage in all ble mesh and related samples

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-01-14 13:23:47 +01:00
Krzysztof Chruściński
70118c06a5 drivers: serial: nrfx_uarte: Deprecate non-legacy shim
Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.

Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-14 13:23:32 +01:00
Kyra Lengfeld
64d8713683 Bluetooth: Mesh: use settings priority feature
By using `SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO` we can ensure that
BT subsystems always get loaded after BT, and BT Mesh after both of
them.

This solves the host having to register a GATT service in a delayed
manner, as we are sure to now register the GATT service after sc_commit
sets `SC_LOAD`.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-01-14 00:00:56 +01:00
alperen sener
917683a46b tests: bluetooth: mesh: Add PB-GATT provisioning test cases
Extending existing provisioning test code to use PB-GATT and adding
test cases for provisioning over PB-GATT. Test names are changed to
represent both provisioning brearers. Enabled required kconfigs for
PB-GATT and GATT proxy features in overlay_gatt.conf. Test argument
prov-bearer is added to provisioning tests to select bearer.

Following tests are renamed and extended to use PB-GATT
- pb_adv_multi
- pb_adv_no_oob
- pb_adv_oob_auth_ib_pk
- pb_adv_oob_auth_ignore_oob_pk
- pb_adv_oob_auth_oob_pk
- pb_adv_reprovision

PB-GATT test cases will run only with PSA encryption since tinycrypt
is to be deprecated.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2025-01-14 00:00:44 +01:00
Krzysztof Chruściński
72d0ed7782 tests: drivers: uart: Add nrf54l09pdk_nrf54l09_cpuapp target
Add new target to the following tests:
- uart_elementary
- uart_async_api
- uart_mix_fifo_poll
- uart_pm

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-13 20:24:43 +01:00
Jukka Rissanen
ee22f5ed63 tests: net: http: server: Add static fs tests
Add tests for serving static files.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-13 20:23:18 +01:00
Yago Fontoura do Rosario
ee326138ca tests: bluetooth: Add missing mocks after fix on host
* Two mocks were missing in kernel mocks

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2025-01-13 20:22:20 +01:00
Lucien Zhao
f039ad57df tests: drivers: uart: uart_async_api: fix build error for RT1180
Due to cm7 on RT1180 is secondary core, and dtcm have been used
as sram directly, so there is no need to define zephyr,dtcm node.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Lucien Zhao
6c24c2e0a0 boards: nxp: mimxrt1180_evk: enable lpspi3 and edma4 instance support
Add pinctrl and dma channel/mux information for lpspi3 on cm33/cm7 cores.
Set dma4 status is OK.
Add pinctrl for lpuart3

tests: driver: spi: support spi_loopback case on MIMXRT1180_EVK
Add .config/.overlay files for cm33/cm7 cores
Link to ocram1 as RAM region on cm7 core
Link to dtcm as RAM region on cm33 core

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Raffael Rostagno
d20140d014 tests: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Henrik Brix Andersen
557515884b tests: drivers: build_all: eeprom: use unique SPI CS lines
Use unique SPI CS lines in the EEPROM build-all test.

Fixes: #83696

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:48:35 +01:00
Nazar Palamar
01252ad877 drivers: dma: initial implementation CAT1 DMA driver
Initial implementation of DMA driver for CAT1 device

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-10 14:48:24 +01:00
Eric Ackermann
4921ce2118 tests: llext: Add RISC-V CB-Type edge case test
All immediates in RISC-V are encoded as two's complement. This commit
adds a test for relocating jumps that utilize the full range of the
immediate, in both positive and negative direction.
To this end, the test uses the compressed b-type (CB) instruction to
branch to its maximum negative (-256) and maximum positive (+254)
targets.
In case of test failure, expect relocating the corresponding llext to
fail.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
Luca Burelli
ddd795a028 tests: llext-edk: get the Zephyr SDK path from build_info.yml
The LLEXT EDK test works by packaging an EDK and then testing its
functionality to build the extension in an external CMake build step.
That CMakelists.txt file currently references the required tools using
the ZEPHYR_SDK_INSTALL_DIR environment variable, which must be manually
set by the user.

This change modifies the test to read the newly added 'build_info.yml'
file, generated by Zephyr during the first build step. This allows to
set the ZEPHYR_SDK_INSTALL_DIR environment variable automatically based
on the (possibly auto-discovered) SDK path.

A few minor compliance cleanups are also included.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-10 09:51:54 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Pieter De Gendt
4895b1f47b tests: Add CTest base harness testing
Add a testcase to validate the added CTest twister harness.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Marcin Lyda
5c8cf4c127 drivers: rtc: Add Micro Crystal RV-8803-C7 RTC driver
This PR adds support for Micro Crystal RV-8803-C7
RTC chip.

Supported functionalities:
* Update interrupt
* Alarm interrupt
* Time setting/reading
* Alarm setting/reading
* Aging offset calibration setting/reading
* CLKOUT configuration

Tested on nRF52833-DK using rtc_api test set.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-01-09 23:26:37 +01:00
Maciej Baczmanski
b46f72009a net: openthread: radio: Fix platform radio state machine
Fix platform radio state machine to be compliant with one shown in
OpenThread's `include/openthread/platform/radio.h`

Align twister tests to verify proper behavior of the
state machine.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2025-01-09 15:49:21 +01:00
Emil Gydesen
48ac31c7a2 Bluetooth: TMAP: Remove double definitions of TMAP roles support
Both the TMAP kconfig file and public header file defined
which roles were supported.

The Kconfig file options were recently added and were more
up to date (and correct), and allows for other Kconfig files
to use these values, thus allowing for more flexibility when
implementing applications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-09 15:49:10 +01:00
Mathieu Choplain
f994de862b tests: adc: adc_api: add overlay for Nucleo-WB07CC
Add an overlay to allow the test to build and run on Nucleo-WB07CC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Mathieu Choplain
2c53fd78a4 tests: dma: loop_transfer: add overlay for Nucleo-WB07CC
Add an overlay to the test so that proper DMA behavior can
be verified on STM32WB07 SoC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Mathieu Choplain
45008430f1 tests: dma: chan_blen_transfer: add overlay for Nucleo-WB07CC
Add an overlay to the test so that proper DMA behavior can
be verified on STM32WB07 SoC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Matt Rodgers
b7091ed439 net: http_server: serve resources only for their defined services
Ensure that HTTP resources can only be served to a client connected on
the specific service(s) that the resource was registered against using
the HTTP_RESOURCE_DEFINE macro.

This allows different resources to be registered to different services,
for example to make some resources only available via an HTTPS service
and not via unencrypted HTTP.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2025-01-09 14:13:57 +01:00
Chaitanya Tata
1d5447d32b tests: boards: nrf70: Add tags
Add appropriate tags for these to be run in CI.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Ilya Tagunov
48d2382874 tests: math: interpolation: disable floating point contraction
This test cannot tolerate any loss of precision, including the one
caused by the compiler contracting floating points operations together,
like in fused multiply-add (FMA). Some toolchains enable FP contraction
by default, so disable it for the specific test and let the user decide
themselves whether precision or performance is needed for their
specific application.

Co-authored-by: Jordan Yates <jordan@embeint.com>
Co-authored-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-01-09 09:51:39 +01:00
Luis Ubieda
19a4261517 tests: sensor: generic_test: Remove special-handling for axis values
Since now they're treated as q31 values when individually queried, as
opposed to lump them in a triplet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-01-09 08:20:32 +01:00
Stephan Linz
7cd7c82aa1 drivers: mipi-dbi-spi: use string for xfr-min-bits property
Use a string for the xfr-min-bits property over an integer value, as this
significantly improves the readability of the MIPI DBI SPI device binding.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-01-08 21:01:51 +01:00
Krzysztof Chruściński
d5637ec374 tests: lib: cpp: cxx: Filter out all ARMs from nRF54x and nRF92
Instead of extending list of unsupported platforms use filter that
will exclude or current and next ARM cores from platforms with HAL
that does not support C++98.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:10:24 +01:00
Andries Kruithof
c9a9f0ab08 Bluetooth: Audio: Add tests for the CAP cancel command
This adds unittests and babblesim tests for the CAP cancel command

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2025-01-08 19:10:11 +01:00
Krzysztof Chruściński
1115cd5698 tests: drivers: uart: async_api: nrf54h20dk: Enable device PM
Enable device runtime PM for nrf54h20dk/nrf54h20/cpuapp where
fast UARTE (uart120) is tested.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:09:57 +01:00
Khoa Nguyen
5acf8a2935 tests: drivers: flash: Support test common for RA6, RA4
Add overlay to support test flash/commone for: ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, ek_ra6e2, fpb_ra6e1,
fpb_ra6e2, ek_ra4m2, ek_ra4m3, ek_ra4e2

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-01-08 17:02:36 +01:00
Neil Chen
96a9a5ea90 tests: drivers: uart: add uart_async_api support for frdm_mcxa156 board
add uart_async_api test support for frdm_mcxa156 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-08 17:01:53 +01:00
Anas Nashif
08ed0f3282 tests: kernel: common: use integration_toolchains
Use new keyword integration_toolchains to build test using additional
toolchains.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-08 12:58:59 +01:00
Yiding Jia
2bf61e51fe drivers: sensor: Fix TMAG5273/TMAG3001 by adding a TMAG3001 compatible
Fixes issue introduced in #76460

The previous code attempted to detect whether TMAG5273 or TMAG3001 was
connected based on DEVICE ID register. This doesn't work as the bits that
denote the version on one part are undefined on the other part, and cannot
be relied on to be zero.

This commit adds a TMAG3001 compatible which (for now) is just derived from
the TMAG5273 compatible. This allows TMAG3001 to be specified directly in
the DT. The driver code is updated to support both compatibles.

Signed-off-by: Yiding Jia <yiding.jia@gmail.com>
2025-01-08 09:33:02 +01:00
Emil Gydesen
e45830893f Bluetooth: CCP: Introduce new CCP API
The CCP API for the Call Control Profile works on top of the
TBS API, and will eventually replace parts of the TBS API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-08 07:50:32 +01:00
Chris Friedt
c0e0fc5d7f tests: posix: fs: declare entry statically
qemu_x86/atom was failing tests/posix/fs in
test_fs_readdir_threadsafe for some reason and only for that
platform.

All other platforms pass the testsuite properly with the dirent
declared on the stack.

Declare the dirent object statically so that qemu_x86/atom will
pass test cases.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-08 01:29:06 +01:00
Chris Friedt
fa841fe7bd posix: fs: declare _POSIX_C_SOURCE in a consistent way
Declare _POSIX_C_SOURCE in a consistent way for both the
posix/options library as well as the tests/posix/fs
testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-08 01:29:06 +01:00
Tomi Fontanilles
561ee12597 tests: secure_storage: speed up psa.its.secure_storage.custom.transform
It would time out when run on-device due to the NVS setting backend being
incredibly slow once enough entries exist.

Also, rename the tests which use different store implementations to make
that explicit.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/83210.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-01-07 18:24:33 +01:00
Neil Chen
1a4bc137c8 tests: drivers: can: timing: enable full timing test on frdm_mcxa156
Enable the full range of CAN timing tests on the NXP FRDM-MCXA156 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-07 15:56:57 +01:00
Dominik Ermel
bb0fa0746b stream_flash: Enforce size to be explicitly present on init
The commit changes requirements for stream_flash_init, where size
can no longer be 0 and has to be explicitly set, to avoid situation
where size autodetection, invoked by size == 0, would miss changes in
layout and silently allow overflow of Stream Flash into other partitions.

There has also been new Kconfig option CONFIG_STREAM_FLASH_INSPECT,
set to y by default to keep legacy behaviour, that can be used to turn
off stream_flash_ctx vs device inspection, allowing user to shed
inspection code once it is not useful anymore.

Fixes: #71042

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-07 15:56:49 +01:00
Dominik Ermel
145dd119a1 tests/stream_flash: Improve platform filtering
Improve platform filtering of common platforms, replace extra_args
with extra_configs, where applicable and add little comment on why
certain options are used.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-07 11:51:49 +01:00
Marvin Ouma
6737f6b283 tests: posix: common: separate posix timer tests into a smaller testsuite
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves clock, sleep, nanosleep and timer
into a singular testsuite at tests/posix/timer app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2025-01-07 11:47:35 +01:00
Emil Gydesen
892e5e11fa tests: Bluetooth: BAP: Add broadcast tests with VS codec
A broadcast tests with various BASEs that use a vendor
specific (VS) codec. This tests that we support
non-LC3 codecs on both broadcast sources and sinks
in various configurations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-07 10:11:00 +01:00
Emil Gydesen
cd98a34772 tests: Bluetooth: BAP: Move broadcast metadata update to new test
Split the default broadcast source test so that the reconfigure and
metadata update is not done in the generic test. This makes
the test simpler and easier to modify.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-07 10:11:00 +01:00
Emil Gydesen
9cfc546eba Bluetooth: Audio: Shell: Add logging and testing build tests
Added a test for disabled logging and for diabled testing
to ensure that the shell builds without error when those
are disbaled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-07 00:27:17 +01:00
Krzysztof Chruściński
9af987d5d4 tests: drivers: uart: mix_fifo_poll: Add UARTE120 to nrf54h20dk test
Add configuration for UARTE120 fast instance. Use multi-instance capability
of the test to run same test on UARTE120 and slow UARTE peripheral.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-07 00:25:15 +01:00
Krzysztof Chruściński
146fa18b06 tests: drivers: uart: mix_fifo_poll: Tweak testcase.yaml
Do not use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n because this option
is going to be deprecated and this option does not support all uart
instances (e.g. uart120). Limit testing of configuration with
CONFIG_UART_0_ENHANCED_POLL_OUT=y to legacy platforms. nrf54x
platforms have ENDTX-STOPTX short so this feature is not supported
and needed there.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-07 00:25:15 +01:00
Krzysztof Chruściński
b5807a98e1 tests: drivers: uart: mix_fifo_poll: Rework to support multi-instance
Rework test to allow testing multiple UART instances in a single
run.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-07 00:25:15 +01:00
Krzysztof Chruściński
90b4ddd87a tests: drivers: uart: mix_fifo_poll: Change fixture to uart_loopback
gpio_loopback fixture is used for single pair of shortened pins. For
this test 2 pairs are needed (cts-rts + tx-rx) so gpio_loopback does
not describe it correctly.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-07 00:25:15 +01:00
Fabrice DJIATSA
c7da46a243 tests: drivers: uart: uart_async_api: fix error on test_write_abort
With the changes made in PR #76061, only on the F429ZI platform, in
the test_write_abort test,the number of received data (2) is not equal
to the number of sent data (1). It looks like uart_tx_abort is done very
quickly, and the callback doesn't have enough time to deal with it.
Adding a small delay solves the problem and doesn't affect results on
other platforms.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-01-06 20:34:17 +01:00
Fabrice DJIATSA
921e281ef0 tests: drivers: uart: uart_async_api: disable userspace permissions
Test cases on F746ZG work with USERSPACE config not enabled.
PR #80944 forces the use of the TEST_ENABLE_USERSPACE config with
the "select" statement instead of "imply," which is more restrictive
for test case dependencies.This leads to the error
"Memory region 0x2004d180 (size 8) write access denied" on boards.
By setting CONFIG_TEST_USERSPACE=n, the TEST_ENABLE_USERSPACE config will
not be enabled.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-01-06 20:34:17 +01:00
Khoa Nguyen
bf1e996e42 tests: drivers: uart: Support test uart_async_api for Renesas RA8
Add overlay to support test uart_async_api for Renesas ek_ra8d1, mck_ra8t1

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-01-06 20:33:46 +01:00
Francois Ramu
04880448c7 tests: drivers: watchdog api testing on the stm32h7rs boards
Add the overlay file to run tests/drivers/watchdog/wdt_basic_api
on the nucleo_h7s3l8 and stm32h7s78_dk target boards

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-01-06 16:10:27 +01:00
Francois Ramu
556bf375a9 tests: drivers: adc api testing on the stm32h7s3l8 nucleo
Add the overlay file to run the tests/drivers/adc/adc_api
on the nucleo_h7s3l8

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-01-06 16:10:27 +01:00
Raffael Rostagno
16d7bbf63f tests: pwm_gpio_loopback: esp32: Add test overlays
Add test overlays for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-06 14:41:56 +01:00
Raffael Rostagno
ef96ed96cb tests: pwm: Add test suite with GPIO loopback
Add PWM test suite which uses GPIO as loopback input to check
the programmed timings.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-06 14:41:56 +01:00
Camille BAUD
0c3913962e boards: others: Introduce Pro Micro nRF52840 type
This introduces the pro micro nrf52840 board type,
commonly available as the cheapest nrf52840 development board,
and is based on the Nice!Nano

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-01-06 14:41:37 +01:00
Yong Cong Sin
1a578eb72c lib: os: mpsc_pbuf: do not wait when spinlock is held
Check if the spinlock is held before attempting to wait by
taking the semaphore, as that would cause a context switch which
isn't allowed and will trigger an assertion error when
`CONFIG_SPIN_VALIDATE` is enabled.

Logging in spinlock-held context when the log buffer is full can lead
to an infinite assertion error loop, as the logging subsys attempts to
allocate buffer when there's none available, it will try to wait for
one and thus triggers the assertion error, the error message will be
printed through the logging sybsys but there's no buffer available,
so it will try to wait for one and triggers another assertion error..
This loop just goes on and on forever, and nothing gets printed to
the terminal.

Added a test to validate the fix.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Maxim Adelman <imax@meta.com>
2025-01-06 06:53:52 +01:00
Fabian Blatz
e9dc495e55 tests: lib: gui: lvgl: Add testcase for OSAL implementation
This patch adds a testcase adding the OSAL to ensure the implementation is
built during CI.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-04 14:17:10 +01:00
Fabian Blatz
8ff8e2940a tests: lib: gui: lvgl: Migrate to version 9.2
With the update to v9.2.0 several Kconfig symbols were renamed or removed.
Adjust the test accordingly. Also several constants were renamed, rename
those also.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-04 14:17:10 +01:00
Tom Burdick
73f1156c5e llext: Remove simple from llext test
The simple path and naming wasn't really right, there are no other tests
and the test suite has become quite automated and extensable to cover
most things we'd like to test with llext. Building, loading, and linking
of course.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-01-02 09:19:35 +01:00
Chris Friedt
bc5aff3582 posix: options: fs: separate file_system_r to its own file
Move the functionality of POSIX_FILE_SYSTEM_R to its own
compilation unit and remove the unnecessary dependency on
POSIX_FILE_SYSTEM.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-02 09:18:57 +01:00
Chris Friedt
fc860e1010 tests: posix: fs: increase ztest stack size from 1k to 2k
The default stack size was causing qemu_arc/qemu_arc_em and
qemu_arc/qemu_arc_hs to fail when a dirent object was
stack-allocated.

Increase the default stack size to accomodate for additional
usage.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-02 09:18:57 +01:00
Chris Friedt
e967120b9a tests: posix: fs: correct arguments to readdir_r()
Previously, a NULL pointer was passed as the second argument to
readdir_r(). This is incorrect. The passed pointer should be
to a valid, externally-allocated struct direct.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-02 09:18:57 +01:00
Vinayak Kariappa Chettimada
3a8db2715f tests: bsim: Bluetooth: Add -RealEncryption=1 to pass in-system UT
BSIM tests that enabled CONFIG_BT_CTLR_TEST=y now require
-RealEncryption to pass the Controller's in-system unit test
of ECB module.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-01-01 02:04:33 +01:00
Vinayak Kariappa Chettimada
9678ff2041 Bluetooth: Controller: Include mem and ecb in-system tests
Include mem and ecb implementation in-system tests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-01-01 02:04:33 +01:00
Fabio Baltieri
b716b0672d dts: ite: refactor the it8801 template hierarchy
The it8801 template is helpful but in the current state it does not
allow changing the device address as that is in the template itself. Fix
that by moving the template content down a level in the hierarchy, so
that it extends the mfd device itself rather than than instantiate it,
then the base instance can have any address, now the only limitation is
that only one instance is possible, but that is probably alright for
now.

Alternatives would be to use a define for the address, or even a
template per address, but this feels like a better compromise for now.
This may also use
https://github.com/zephyrproject-rtos/zephyr/pull/82825 in the future if
that ever becomes a thing.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-31 19:45:49 +01:00
Yishai Jaffe
0f948fdb1c soc: silabs: efr32xg23: add DMA support
Added DMA support to efr32xg23 socs and boards containing them.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-30 19:47:19 +01:00
Simone Orru
2bd101132e kernel: Add tests for k_heap_calloc
Add tests for the k_heap_calloc function.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-12-30 17:32:03 +01:00
Jamie McCrae
1b70bfa14e tests: boot: mcuboot_recovery_retention: Fix testcase
Fixes an issue with the expected output of this test having
changed slightly

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-29 05:59:37 +01:00
Vinayak Kariappa Chettimada
fdf0ec2e5f tests: Bluetooth: BAP: Fix test wrt stream args to broadcast_source
Due to adding subgroup count and streams per subgroup
arguments to the broadcast_source test, fix the sink
test that was not ported due to being merged for change
in a different PR.

Relates to commit 01e8d0e3e0 ("tests: Bluetooth: BAP:
Add subgroup and stream args to broadcast_source").

Fixes commit 303d0b786f ("tests: Bluetooth: BAP: Add
test to test invalid bcode").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-28 11:05:27 +00:00
Fabian Blatz
4966d620d3 tests: drivers: build_all: stepper: Adjust tmc2209 device instance
Adds the counter property to the tmc2209 node to ensure counter dependant
step-dir code is build by CI.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Armando Visconti
f9eceaebf9 drivers/sensor: lis2dux12: add lis2duxs12 support
The LIS2DUXS12 is a smart, digital, 3-axis linear accelerometer whose
MEMS and ASIC have been expressly designed to combine the lowest current
consumption possible with features such as always-on antialiasing
filtering, a finite state machine (FSM) and machine learning core (MLC)
with adaptive self-configuration (ASC), and an analog hub / Qvar sensing
channel.

(https://www.st.com/en/mems-and-sensors/lis2duxs12.html)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Emil Gydesen
fb1fcec983 tests: Bluetooth: Tester: More logging and verification for ISO RX
Add additional data to the logs and only send the event once we have
receive a successful SDU.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 14:09:29 +01:00
Emil Gydesen
38a32b768a tests: Bluetooth: BAP: Add broadcast tests with multiple subgroups
Add 4 new tests for BAP broadcast:
1) One subgroup with one stream per subgroup
2) One subgroup with two streams per subgroup
3) Two subgroups with one stream per subgroup
4) Two subgroup with two streams per subgroup

To support these, the number of broadcast streams and data paths
was updated to be up to 4.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Emil Gydesen
2b197aff02 Bluetooth: BAP: Modify range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.

Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Emil Gydesen
01e8d0e3e0 tests: Bluetooth: BAP: Add subgroup and stream args to broadcast_source
Add subgroup count and streams per subgroup arguments to the
broadcast_source test. This will allow us to run multiple
test setups using the same build and test case.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00