Commit graph

16700 commits

Author SHA1 Message Date
Torsten Rasmussen
4e29a35b22 cmake: use GLOBAL property instead TARGET properties for scoping
Targets are not available in script mode.
To support the Zephyr scoping feature used by snippets and yaml module
then this commit moves from using custom targets to use GLOBAL
properties for scopes.

A scope property is prefixed with `<scope>:<property>` to avoid naming
collisions.
A `scope:<scope-name>` global property is used to track created scopes.
Tracking valid scopes ensure that properties are only set on known
scopes and thus catches typos / naming errors.

Add zephyr_scope_exists() and zephyr_get_scoped() to abstract the
implementation details of the scoped property retrieval and refactor
current code to use them.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-26 09:31:11 +01:00
Dawid Niedzwiecki
229c257522 tests: drivers: flash: stm32: fix uninitialized variable
Make sure not to accidentally enable WP by uninitialized variable during
FLASH_STM32_EX_OP_SECTOR_WP call.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-25 18:03:06 +01:00
Quy Tran
d74020160f tests: subsys: fs: Support tests/subsys/fs on RA8 boards
Add overlay property node and configs to support tests/subsys/fs/ext2,
tests/fs/fat_fs_api and tests/subsys/sd on RA8 boards

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Théo Battrel
18c2ea2336 Tests: Bluetooth: Check GATT settings cleanup
Check that the GATT settings added when bonding to a peer and
subscribing to a CCC are correctly deleted when calling `bt_unpair`.

Testing hooks have been added in the Bluetooth settings abstraction
layer to know which key are being added/deleted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-12-24 16:07:32 +01:00
Seppo Takalo
4a7ef5c010 net: lwm2m: Convert tickeless to use eventfd()
For waking up the poll() use eventfd() instead of socketpair()
so we save some buffer space and one file descriptor.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-12-24 13:54:39 +01:00
Mikkel Jakobsen
e4c21da41b drivers: fuel_gauge: make read-only pointer args const in api
For the lists of properties passed as a pointer to the get_props and
set_props functions, there is no reason to not make the pointer const as
the called functions will not and should not alter the pointed-to data.

In practice, not having the pointers const can cause compilation errors
if trying to pass in a const array of properties.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2024-12-24 13:54:15 +01:00
Dawid Niedzwiecki
be5d44eb7e drivers: flash: stm32: update ex_op API
Use uint64_t instead of uint32_t for the FLASH_STM32_EX_OP_SECTOR_WP
extended operation.

Some chips have two banks, more than 16 sectors each e.g. stm32h7a3xx
chips, so more than 32 bits are required.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-24 13:54:04 +01:00
Emil Gydesen
c5fc9a2b17 tests: Bluetooth: BAP: Add retry with correct broadcast code
Expand test_sink_encrypted_incorrect_code to retry the sync with
the correct broadcast code after failing the initial sync
with the incorrect broadcast code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-24 13:53:34 +01:00
Peter Mitsis
31ebd6036a tests: Test k_reschedule() with deadline scheduler
Setting a deadline is not a schedule point. This makes it a
perfect place to verify the behavior of the new k_reschedule()
routine at both thread and ISR level.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-24 04:22:51 +01:00
Andrew Featherstone
498ded5dd9 tests: drivers: dma: Increase test coverage for RP2350A
Increase test coverage for Raspberry Pi's SoCs. Use the `socs` folder
rather than `boards` to enable these tests to run on any boards with the
same SoCs.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
b6b38e6808 drivers: dma: rpi_pico: Refactor DMA files for Raspberry Pi SoCs
Avoid referring to Pico 2 (the name of a board). In this context,
RPI_PICO is used to refer to the (Zephyr) `SOC_FAMILY` rather than the
Pico 1 board. This clarifies common numerical values between the RP2040
and RP2350 SoC series, and enables existing DTS files to be used with
RP2350-based boards with fewer changes.

Remove the use of Zehpyr's `CONFIG_` macros from the device tree files,
and replace them with `SOC_SERIES`-specific files. Update the driver
implementation to conditionally include the correct file. Update
documentation and samples to match.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
2d768fd3a5 rpi_pico2: rp2350: Add DMA support
Add initial support for the RP2350's DMA peripheral, allow tests
under drivers/dma/loop_transfer to run on on the Raspberry Pi Pico 2,
and update the board's documentation.

Signed-off-by: Manuel Aebischer <manuel.aebischer@belden.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
aeecc3c282 tests: gpio_api_1pin: rpi_pico2: Support using external pulldowns
Extend gpio_api_1pin so that tests can require a test fixture to provide
an external pulldown resistor to the board under test. Use the new
test-gpio-external-pulldown device tree binding to define where that
GPIO is, and, finally, add a device tree overlay for the Raspberry Pi
Pico 2 board that defines where the pulldown provided by the fixture
will be.

Tested locally using `--fixture gpio_external_pull_down` when running
Twister on the command line, or by creating and using a Hardware Map
file, in combination with a modified Pico 2.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
8bea756542 tests: drivers: adc_api: Add support for the Raspberry Pi Pico 2
For these tests' needs, the RP2350 on the Pico 2 is compatible with the
RP2040 on the Pico 1. #include the latter's overlay in preference to
duplicating the content.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Benedikt Schmidt
0603637fc7 tests: misc: test_build: add testcase for LTO with picolibc module
Add a testcase which builds with LTO and the picolibc module.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-12-23 22:00:53 +01:00
Sebastian Głąb
7c606c29c6 tests: drivers: gpio: gpio_basic_api: Enable test on nrf54l20pdk
Add overlay required to run gpio_basic_api test on nrf54l20pdk.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-12-23 17:10:17 +01:00
Jilay Pandya
59064a409e dts: bindings: stepper: add en-gpios to common stepper-controller.yaml
- rename enable-gpios to en-gpios in adi,tmc2209
- place en-gpios in common stepper-controller.yaml

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-23 17:10:06 +01:00
Cory Andrew Mayer
8094f92cd3 tests: subsys/fs/nvs: add test for initializing bad region
Add unit test to exercise bad memory region recovery path

Signed-off-by: Cory Andrew Mayer <corymayer@meta.com>
2024-12-23 09:15:48 +01:00
Dominik Ermel
196fc5c36c storage/stream_flash: Make write callback optional
The commit adds Kconfig option CONFIG_STREAM_FLASH_POST_WRITE_CALLBACK
that allows to turn off support for callback invoked after data
is written to storage device.
If the feature is not used disabling it allows to save some storage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-21 20:48:53 +01:00
Aleksander Wasaznik
e8c5405609 Bluetooth: Controller: Fix headroom reservation for ISO
Calling `net_buf_reserve` removed any previous reservation, which
includes the reservation by hci_ipc to hold the H4 type byte. This
resulted in a out-of-bounds net_buf_push in hci_ipc.

This commit also enables asserts in hci_ipc in the audio bsim test,
which reveal the out-of-bounds write.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-12-21 05:52:37 +01:00
Raffael Rostagno
a249eb51f4 tests: drivers: counter: esp32c6: Add test config
Add test config files for ESP32C6 for GP and RTC timers.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-21 05:52:20 +01:00
Declan Snyder
8ed80ddb37 boards: mimxrt1060_evk: Convert to variants
Convert qspi and hyperflash to variants instead of revisions by popular
demand.

And convert evkb into a revision instead of a different board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-12-20 22:59:59 +01:00
Declan Snyder
0cdb35d978 boards: mimxrt1050_evk: Switch to variants
Switch from using revisions for hyperflash/qspi to using variants, by
popular demand.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-12-20 22:59:59 +01:00
The Nguyen
8d2a9b3fac tests: memc: ram: support test for sdram controller on Renesas RA family
Add SDRAM controller test support

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
The Nguyen
07291fb6aa tests: display: add support test GLCDC on ek_ra8d1
This commit to add support to build tests/drivers/display on ek_ra8d1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
Manuel Argüelles
c16ccf8e7d dts: bindings: rename nxp,kinetis-ftm-pwm compatible
Rename "nxp,kinetis-ftm-pwm" compatible to "nxp,ftm-pwm" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-20 23:53:14 +02:00
Peter Mitsis
60b38d50db tests: latency_measure: Update README.txt
Updates the README.txt with more current sample output.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-20 23:51:02 +02:00
Peter Mitsis
b3b94731d5 tests: latency_measure: Remove timeslicing
Removes the timeslicing configuration from the latency
measure benchmark as its numbers are nearly identical
to the default. This makes sense as the benchmark was
not really designed for exercising the timeslicing
feature.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-20 23:51:02 +02:00
Keith Short
af1fbf8199 tests: drivers: Add PS8xxx driver
Add a build test to verify the parade,ps8xxx driver builds correctly.

Signed-off-by: Keith Short <keithshort@google.com>
2024-12-20 23:50:50 +02:00
Danh Doan
7c55a540f4 tests: drivers: pwm: Support RA2, RA4, RA6 to test pwm_loopback
Add overlay to support test pwm_loopback on boards: ek_ra2a1,
ek_ra4e2, ek_ra4m2, ek_ra4m3, ek_ra4w1, ek_ra6e2, ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1, fpb_ra6e2.

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-20 18:31:12 +01:00
Danh Doan
2e0688878b drivers: pwm: update namming of pwm driver for RA family
- update namming for pwm driver.

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-20 18:31:12 +01:00
Raffael Rostagno
ffa676dd44 tests: pwm_loopback: esp32c6: Add test config
Add test config file to test MCPWM loopback on ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-20 18:30:59 +01:00
Bjarki Arge Andreasen
0617bd306a tests: drivers: i2c: target api: add nrf5340 cpuapp
Extend i2c_target_api test suite with the nrf5340 cpuapp, using the
new TWIS device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-20 16:14:05 +01:00
Seppo Takalo
341f78102a net: lwm2m: Need heap for native_sim
When using tickless mode, the socketpair()
seem to use heap by default on native_sim, so
add some space for it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-12-20 16:09:13 +01:00
Tim Lin
2821a9e588 test/driver/build_all: Modify the dts configure example of board for it8801
Modify the board file when using gpio, input and pwm drivers dts
configuration example for it8801.

test: west build -p always -b it82xx2_evb tests/drivers/build_all/gpio
      west build -p always -b it82xx2_evb tests/drivers/build_all/input
      west build -p always -b it82xx2_evb tests/drivers/build_all/pwm

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-12-20 12:36:21 +01:00
Maochen Wang
f6b3a022a9 tests: net: wifi: update DPP extra confis
Remove CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE from DPP build
case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-20 10:19:14 +01:00
Dmitrii Golovanov
33a91daf3b tests: benchmarks: wait_queues: Record metrics
Enhance the wait_queue benchmark to output resulting summary
metrics as records, so when it runs with Twister the results
are parsed and saved into twister.json and recording.csv files
for further analysis.
Minor documentation edits and make ClangFormat happy.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-12-20 08:33:14 +01:00
Dmitrii Golovanov
422c9d6c7b tests: benchmarks: wait_queues: Turn off verbose output
Turn off verbose output by default as described in the README.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-12-20 08:33:14 +01:00
Dmitrii Golovanov
f3358259d6 tests: benchmarks: sched_queues: Record metrics
Enhance the sched_queue benchmark to output resulting summary
metrics as records, so when it runs with Twister the results
are parsed and saved into twister.json and recording.csv files
for further analysis.
Minor documentation edits and make ClangFormat happy.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-12-20 08:33:14 +01:00
Dmitrii Golovanov
2fd8abef7f tests: benchmarks: sched_queues: Turn off verbose output
Turn off verbose output by default as described in the
README.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-12-20 08:33:14 +01:00
Mariëlle Korthout
f5d71a3db3 tests: build_all: Add HS400x
Adds HS400x to build_all tests
Signed-off-by: Mariëlle Korthout <marielle.korthout.jc@renesas.com>
2024-12-20 03:18:19 +01:00
Gerard Marull-Paretas
b51f998063 tests: fix zephyr/drivers/gpio.h usage
Only include the header if using any of the GPIO API calls/
struct/defines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-20 03:17:25 +01:00
Gerard Marull-Paretas
179576d059 tests: add missing CONFIG_GPIO=y
All tests using the GPIO API must enable the CONFIG_GPIO Kconfig
option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-20 03:17:25 +01:00
Daniel Leung
f786ecc075 tests: mem_protect/mem_map: add data cache manipulations
This adds data cache manipulations, flushing and invalidation,
to the tests where buffer content are being written and
compared. These tests map different virtual pages to the same
physical pages, and write to one of the mapped virtual
addresses. Some SoCs may cache the virtual address separately
and writes to one virtual address will not be reflected to
another virtual address, this failing the comparison. So we
need to manually flush the cache after writing to the buffer,
and invalidating cache before reading. Note that not all reads
and writes need this treatment as some of them only needs to
test for access permissions, and not the memory content.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-19 21:54:16 +01:00
Daniel Leung
352fed6b21 tests: mem_protect/mem_map: limit CPUs to 1 if incoherent cache
For CPUs with incoherent cache under SMP, the tests to read/write
buffer (... majority of tests here) may not work correctly if
the test thread jumps between CPUs. So use the test infrastructure
to limit the test to 1 CPU.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-19 21:54:16 +01:00
Raffael Rostagno
f98868eb81 tests: uart_elementary: esp32: Add test configs
Add test configuration for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-19 19:56:06 +01:00
Raffael Rostagno
31ea95fb52 tests: uart_basic_api: uart_elementary: Get baudrate from device tree
Add option (BAUDRATE_FROM_DTS) to get baudrate value from
device tree, for devices which differ from standard (115200).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-19 19:56:06 +01:00
Manuel Argüelles
bf7837b8ac dts: bindings: rename nxp,kinetis-rtc compatible
Rename "nxp,kinetis-rtc" compatible to "nxp,rtc" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-19 19:55:43 +01:00
Riadh Ghaddab
e0f0256538 zms: optimize write function by skipping unnecessary reads
when performing a write ZMS checks if the data exists in the storage to
avoid double writing the same data and save some memory cycle life time.
However this downgrades the write performance.
Enable this feature only when CONFIG_ZMS_NO_DOUBLE_WRITE is enabled.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-12-19 19:55:30 +01:00
Valerio Setti
3fa522c720 tests/samples: remove ENTROPY_GENERATOR from BT related tests/samples
Since now Mbed TLS automatically selects ENTROPY_GENERATOR (or the
test generator, depending on the platform) we can remove this dependency
from all BT related tests and samples.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-19 17:53:37 +01:00