Commit graph

14120 commits

Author SHA1 Message Date
Daniel DeGrasse
138e9591f8 tests: net: wifi: exclude RW612 based boards
Exclude RW612 based boards from the WiFi testsuite, as these boards
require binary blobs be downloaded in order to build as expected

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:22 +02:00
Jilay Pandya
179f990e46 tests: drivers: stepper: build all
This commit introduces preliminary build all test for stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Emil Gydesen
eaf92a1494 tests: Bluetooth: CAP: Initiator unicast start unittests
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-26 17:27:36 -04:00
Nicolas Pitre
c9aa98ebc0 kernel: mmu: support for on-demand mappings
This provides memory mappings with the ability to be initialized in their
paged-out state and be paged in on demand. This is especially nice for
anonymous memory mappings as they no longer have to allocate all memory
at mem_map time. This also allows for file mappings to be implemented by
simply providing backing store location tokens.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:25:41 -04:00
Peter Mitsis
ee7bbf55e0 tests: latency_measure: Add busy threads for SMP
The latency_measure benchmark is designed for systems with a single
CPU. When the system allows for multiple CPUs, instead of forcing
a single CPU to be used via 'prj.conf', spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-26 14:45:04 -04:00
Yong Cong Sin
74f46bd421 arch: riscv: stacktrace: print additional arg when fatal error
Print `sp`/`fp` in traces.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
074931057c subsys/debug: remove CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
Having `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` to select the
`CONFIG_SYMTAB` or to explicitly not print the symbol name
during exception stack unwind seems unnecessary, as the extra
code to print the symbol name is negligible when compared with
the symbol table, so just remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
ab676fdb86 arch: arm64: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Also, `EXCEPTION_STACK_TRACE_MAX_FRAMES` is unused and
made redundant after this change, so remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
06a8c35316 arch: x86: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Jonathan Rico
4ab8073b87 tests: Bluetooth: disable optimizations in unit test
Very very weird behavior.

Deleting the `options & BT_LE_ADV_OPT_USE_NRPA` branch in
`id.c:bt_id_set_adv_own_addr` makes the test pass. But add a log in that
branch, and you'll see that we never take it in the UT binary..

I don't have time for this, maybe some compiler guru or C language
lawyer can look at that decompiled function and figure out the root
cause.

Someone should also really fix the Bluetooth unit tests and make them
run on any Bluetooth related PR. Also nightly.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-26 18:51:11 +02:00
Sebastian Głąb
ffd065f93e tests: drivers: flash: Move negative tests to a separate project
Move negative tests for flash driver to a separate test suite.
Run negative tests only on platforms that are aligned.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-26 17:08:19 +02:00
Raffael Rostagno
2ea9483009 drivers: spi: esp32c2: esp8684: Add support
Addded support to SPI2 module for ESP32C2 and ESP8684 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 17:06:02 +02:00
Jamie McCrae
edee1ed9a0 tests: mgmt: mcumgr: Add enum_mgmt test
Adds a test that checks the functionality of this new management
group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Anas Nashif
376085c9ed tests: kernel: add missing test call argument
Add missing param argument.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-24 07:17:15 -04:00
Valerio Setti
f23d800094 test: mbedtls: new test for PSA crypto initialization and RNG configuration
Add a simple test to showcase how RNG can be configured on different
platforms in order to allow Mbed TLS's PSA crypto implementation to
work properly.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
98ddf107fa mbedtls: rename CONFIG_MBEDTLS_ZEPHYR_ENTROPY and move it
- Slightly improve the name of this kconfig adding the suffix
  _POLL in order to highlight that this adds a callback
  function used to poll data.

- Description was also updated to point out that this symbols
  might not only use the (secure) entropy driver, but also
  generic number generators, some of which are not really
  secure.

- The symbol was move from Kconfig to Kconfig.tls-generic because
  this is where MBEDTLS_ENTROPY_C is located and since
  MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
  makes sense if the entropy module is also enabled), we add
  also the "depends on".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Axel Le Bourhis
179c85aa06 tests: net: socket: udp: clear control data buffer before recvmsg
Currently, the test doesn't clear the control data buffer before
calling recvmsg. This leads to recvmsg being unable to add the new
control data, which corresponds to the current received data.
This commit aims to clear the control data buffer to match most use
cases, when the control data buffer is empty before calling recvmsg.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-08-23 15:50:37 +01:00
Arkadiusz Cholewinski
3580d8b6d6 tests: ztest: Add ztest param test.
Introduces the test for testing the new functionality
of ztest shell.

Passing -r (repeat iter) parameter. This allows to run
a particula testcase or testsuite several times.
Passing -p (any value) parameter. This allows to provide
a parameter to a test at runtime.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Chris Friedt
87062af85b tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Torsten Rasmussen
3382e28737 tests: cmake: add test cases for CMake YAML module
This commit provides a basic set of tests for Zephyr's CMake YAML
module.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Rubin Gerritsen
d82424ba36 tests: bluetooth: hci_uart_async: Set thread name after creation
When running on native_posix, the thread needs to be created
before the thread name can be set.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Karthikeyan Krishnasamy
c044f0c89d tests: lib: c_lib: add test suite for remove api
Add test suite for remove of zephyr native libc

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
e8ab88bd15 tests: posix: fs: add test suite for rmdir
add test suite for POSIX API rmdir

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Mathieu Choplain
eaa799a9b5 tests: dma/chan_blen_transfer: move buffer to DMA-accessible memory
This commit moves the test buffer from ITCM (not accessible by DMA) to DTCM
on several NXP boards, to make the test successful.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Mathieu Choplain
3099491f3e tests: dma/chan_blen_transfer: relocate TX and RX buffers
This commit places the chan_blen_transfer DMA test's TX and RX buffers
in a separate file that gets entirely relocated. This ensures that the
buffers reside in the correct memory, without breaking other things
due to relocation of test data/code.

Fixes #75676.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Emanuele Di Santo
b41054340d tests: arch: arm: arm_irq_vector_table: fix compilation for nRF9280
Fix compilation for nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9e1862ff66 tests: drivers: watchdog: wdt_basic_api: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9dcb3cc189 tests: drivers: watchdog: wdt_error_cases: fix compilation for nRF9280
Fix compilation by defining the watchdog flags for nRF9280 as well.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Andreas Moltumyr
9f90a3d1ad tests: drivers: adc: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
a33b0887d0 tests: lib: cpp: cxx: add nRF9280 to exclusion list
Nordic HAL is not compatible with C++98.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Szymon Janc
d9f348962c tests: bluetooth: tester: Fix BTP_BAP_BROADCAST_SINK_BIS_SYNC command
After recent changes to BIS bitfield it is no longer required to adjust
BIS Index bitfield.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-22 14:23:05 -04:00
Lucien Zhao
67a30da697 tests: drivers: i2c: support i2c_target_api cases for RT1180
Add corresponding i2c configuration for cm33/cm7 core
Test cm33/cm7 core passed on my local

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Declan Snyder
a097cdc4fe soc: nxp: Centralize flexspi related configuration
Currently this code related to how to configure the
flash size and address when using flexspi to XIP is copy
pasted in all sort of places and ways all over the tree,
let's clean this up and have single point of control over
this configuration.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Yong Cong Sin
fe94d4354a libc: common: implement multiple time functions
Implemented the following:
- `asctime_r()`
- `asctime()`
- `localtime()`
- `localtime_r()`
- `ctime()`
- `ctime_r()`

Specifically:
- the implementation of `localtime()` & `localtime_r()` simply
  wraps around the gmtime() & gmtime_r() functions, the
  results are always expressed as UTC.
- `ctime()` is equivalent to `asctime(localtime(clock))`, it
  inherits the limitation of `localtime()` as well, which only
  supports UTC results currently.

Added tests for these newly implemented functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
Jonathan Rico
0b3c67c31b Bluetooth: audio: Make unit tests compile
The tests manually include sources that are normally conditionally
included (ie based on kconfig values) in the stack.

The tests should be fixed by the original authors.
For now, force-on the hidden kconfig that enables the log options.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Szymon Janc
6d19bcf333 tests: bluetooth: tester: Fix user_data size in pools
There was hardcoded value for user_data which is no longer valid.
Use proper CONFIG_BT_CONN_TX_USER_DATA_SIZE for that.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-21 18:27:37 +01:00
Armando Visconti
42da38b50f tests: sensors: build_all: fix warnings on i2c
Fix warnings generated when performing sensor drivers build test
due to typos in i2c DT definition.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Tomasz Moń
b7664f27c8 usb: device_next: Make stack High-Bandwidth aware
Add macros for converting between Max Packet Size and total payload
length. Allow drivers specify whether endpoint supports high-bandwidth
interrupt and high-bandwidth isochronous transfers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
60835aa393 usb: Add missing wMaxPacketSize endian conversions
wMaxPacketSize in endpoint descriptor is stored in little-endian order,
but the mps parameter passed to functions is in host order.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Dawid Niedzwiecki
befcb801b4 tests: lib: cpp: add __maybe_unused to unused variable
The foos variable is not really used. Add __maybe_unused to silence
compiler.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-21 08:58:37 +02:00
Nithin Ramesh Myliattil
baa5683e59 bluetooth: BAS: add battery level status char to bas service
Added the battery level status char to bas service
as per bas_1.1 spec. Added BSIM test for BAS service
to test the NTF/INDs of BAS characteristics.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-08-20 18:59:14 -04:00
Szymon Janc
4216bed418 tests: bluetooth: Fix line endings for imported ICS configuration
Unfortunatelly new Qualification Workspace is not able to properly import
ICS if file is UNIX line endings.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-20 18:57:43 -04:00
Jan Müller
c910520f4d Bluetooth: Host: Rework enabling of scanner
To make the scanner module more understandable and more streamlined, I
reworked the update mechanism of the scanner. The scanner tracks now the
parameters that were used to enable it and the reason why it is running.
This facilitates state logic and allows other modules to "start the
scanner", altough it is already running.
This is mostly a refactoring and not a functional change.

Added a test to verify the behavior.

Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no>

add to task
2024-08-20 14:54:25 -04:00
Ricardo Rivera-Matos
7d58579a17 dts: bindings: drv2605: Requires actuator-mode prop
Requires the actuator-mode property to be set as there is no safe
default value.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Chang An
e8db417a00 LE Audio: add conn parameter for bt_vcp_vol_rend_cb
Add conn parameter to status/flags callbacks of bt_vcp_vol_rend_cb
to differentiate between remote and local changes.

Signed-off-by: Chang An <chang.an_1@nxp.com>
2024-08-20 14:45:35 +02:00
Aytürk Düzen
5f00c18005 tests: bluetooth: tester: add nrf54h20 configs
Added:
nrf54h20dk_nrf54h20_cpuapp.overlay: Choose uart136 hwfc 115200
nrf54h20dk_nrf54h20_cpuapp.conf

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-08-20 14:44:44 +02:00
Pisit Sawangvonganan
b7d55d8ec6 style: tests: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Thao Luong
4cebe5354f drivers: adc: initialize to add ADC driver
Add minimal ADC driver code for EK-RA8M1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-08-20 10:31:43 +02:00
Sebastian Głąb
1a48a0174f tests: drivers: flash: common: Increase test coverage
Add functional test for flash_erase().
Add negative tests for flash_read(), flas_write(), flash_erase(),
flash_fill() and flash_flatten().
Add functional test for flash page layout.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-20 10:31:11 +02:00
Daniel DeGrasse
744f67c587 tests: fs: fat_fs_api: add support for testing SDMMC devices
Add support for testings SDMMC devices using the fat_fs_api test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-20 10:30:41 +02:00