Commit graph

16700 commits

Author SHA1 Message Date
Emil Gydesen
6a03778309 tests: Bluetooth: CAP: Only advertise for tests that use connections
Move test_start_adv out from init and only call it for the
tests that require a connection.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-10 16:22:34 +01:00
Axel Le Bourhis
5dfd41e51a nxp: combine MONOLITHIC_BT and MONOLITHIC_IEEE802154
Combine BLE and 802.15.4 monolithic build under a single config to make
it less error prone.
The choice between a BLE/802.15.4 combo firmware and a BLE only firmware
is done depending on the Soc (like RW610 vs RW612).

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 11:11:38 +01:00
Mario Paja
03b936f279 tests: drivers: build_all: ethernet: add lan9250 build test
Add build test for microchip lan9250

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2024-12-10 11:10:34 +01:00
Krzysztof Chruściński
9d478d7675 logging: frontends: stmesp_demux: Add support for turbo logs
Add support for handling optimized short log messages (aka turbo logs).
There are 2 types of turbo log messages:
- No arguments. D16MTS is used for that on channel > 32768
- One numeric argument. DM16 followed by D32MTS is used.

Additionally, in order to be able to get source name for log messages
coming from owned by cpuapp co-processors (PPR and FLPR) there must
be a way of passing location of constant source data from PPR/FLPR to
cpuapp which handles ETR data. This method is added in the commit as
well. PPR/FLPR sends D32M during the boot with address of constant
source data section. Demultiplexer stores those addresses and it is
able to retrieve source name for log messages from PPR/FLPR.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Pavel Vasilyev
0d0669167b tests: bluetooth: buf: Test the freed buf callback
This commit adds a unit test that checks the freed buffer callback of
the bluetooth data buffer API.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-12-10 11:09:36 +01:00
Fin Maaß
1d4249dea6 logging: remove part for when gmtime_r is not available
now that CONFIG_POSIX_C_LANG_SUPPORT_R will
add a custom implementation for gmtime_r() if that
is not provided by the toolchain, we can simply depend on
that, instead of using out own.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
048e7dc502 tests: logging: log_output: net: add test for syslog output
add test for syslog log output.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Valerio Setti
22e30e04f5 tests: disable NRF5 entropy driver on some bsim/qemu tests
CONFIG_ENTROPY_GENERATOR is now enabled by default as soon as
"zephyr,entropy" is set in the device-tree. Since the sub-Kconfig
CONFIG_ENTROPY_NRF5_RNG is also enabled by default on nrf boards,
this means that the driver is pulled in the build and intialized
at boot. This might cause runtime issues during some IRQ/kernel
tests, so it's better to remove "zephyr,entropy" on these tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
e3817d0ffc test: misc|shell: disable "zephyr,entropy" chosen property
When "zephyr,entropy" is enabled the corresponding entropy driver is
pulled in the build and initialized during boot. This

- changes the initialization sequence expected by "check_init_priorities";
- add one extra device to the expected list in "shell_device_filter".

Therefore this commit removes the "zephyr,entropy" propery to return the
test to the original state.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
8564df571a samples/tests: bluetooth: remove ENTROPY_GENERATOR selection
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Stephan Linz
4488ed1a20 tests: drivers: build_all: display: add config for 16-bit transfer
Add configuration with 16-bit transfer to C4 by the new `xfr-min-bits`
property. Such a setup generally only allows `write-only` access.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Francois Ramu
df86315a41 tests: drivers: flash RDP testing on stm32h7
Add the configuration to run the testcase
with READOUT_PROTECTION (RDP) on stm32h7 disco kits

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Andries Kruithof
d64293b185 Bluetooth: Audio: unittest fails when BT_MAX_CONN = 1
There is a unittest to verify that the distribute broadcast code procedure
is not called with the same peer twice. This test requires a minimum
of two connections, so we disable this test when only 1 connection
can be made

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-09 09:50:00 +01:00
Bjarki Arge Andreasen
59779ebe4b pm: policy: event: use uptime ticks
Update events to use uptime ticks, which is a monotonic clock which
in the same res as kernel ticks. This makes comparisons simple and
removes the complexity of dealing with wrapping counter values.

The wrapping is particularly problematic for events since this makes
it quite complex to track if an event has occured in the past, or
will occur in the future. This info is needed to know if an event
has actually been handled or not.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-09 03:55:52 +01:00
Chris Friedt
6aa760a4d9 tests: posix: env: colocate with single_process option group
Move the previously singular env testsuite to be with the
other features that are part of the POSIX_SINGLE_PROCESS
Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-09 03:55:02 +01:00
Daniel Leung
d1c5e1317e tests: multi_level_backend: limit allowed platforms
The tests should only be allowed on supported platforms instead
of blanket enabling on architectures. There are platforms which
do multi level interrupts but cannot run the tests.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-09 01:39:39 +01:00
Fabian Blatz
bea5fc71c4 tests: drivers: build_all: stepper: Add adi,tmc2209
Adds the adi,tmc2209 driver to the build all stepper test.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-07 16:01:41 +00:00
Daniel Leung
b5b00134c5 tests: demand_paging/mem_map: move malloc config to prj.conf
Both tests set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0 so extract
it to prj.conf. The tests require malloc arena size to be 0 to
run successful. By refactoring the config, it is now able to
with west build and still passing.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-07 16:01:10 +00:00
Jakub Michalski
191d38dee8 posix: define POLLPRI in posix/poll.h
Add the POLLPRI constant defined by POSIX and test for it.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2024-12-07 14:17:11 +01:00
Jakub Michalski
f4cb7e35ec posix: define nfds_t in posix/poll.h
Add the nfds_t type defined by POSIX and test for it.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2024-12-07 14:17:11 +01:00
Chris Friedt
55db0d84a8 tests: posix: threads_ext: remove stale comment
For a long time now, it's been possible to call
`pthread_attr_init()` and have it just to The Right Thing (TM)
without having to statically assign a stack.

Remove the stale comment and commented-out code.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-07 14:16:34 +01:00
Artur Dobrynin
d11f726942 tests: bsim: bluetooth: using full nrf52bsim board name
Some places kept using partial nrf52bsim board name which led to
inconsistencies.

Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2024-12-07 02:03:31 +01:00
Artur Dobrynin
cdec82e103 tests: bsim: bluetooth: host: enable on nrf5340bsim/nrf5340/cpunet
Some bluetooth host tests can be run on nrf5340bsim/nrf5340/cpunet.
This commit enables building and running these tests.

Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2024-12-07 02:03:31 +01:00
Artur Dobrynin
9cae99c1d2 tests: bsim: bluetooth: host: streamline conf files
Currently different test cases within the same folder are using largely the
same config files with only subtle variations. It is better instead to have
a base config file with general configuration, aided by overlay files for
specific cases.

Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2024-12-07 02:03:31 +01:00
Artur Dobrynin
e0f74cf1b0 tests: bsim: bluetooth: host: use twister to compile tests
Bluetooth host bsim tests are compiled with shell scripts, but it is
possible to use twister, which supports compilation (but not running
at the moment). Compiling with twister requires fewer shell scripts,
provides cleaner interface and more flexible configuration.

Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2024-12-07 02:03:31 +01:00
Josuah Demangeon
25f56342da tests: lib: devicetree: Add tests for endpoint DT macros
Add tests for the new port / endpoint DT macros

Signed-off-by: Josuah Demangeon <me@josuah.net>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-12-06 22:23:31 +01:00
Manuel Argüelles
87798f9e16 arch: arm: rename CPU_HAS_NXP_MPU to align with binding
Following the binding rename to "nxp,sysmpu", update the Kconfig
option to align with the binding name and to better reflect the
option's purpose.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-06 22:23:06 +01:00
Jilay Pandya
030444822e drivers: stepper: api: rename stepper_set_target_pos to stepper_move_to
rename stepper_set_target_position to stepper_move_to in following files:
- doc/hardware/peripherals/stepper.rst
- doc/releases/migration-guide-4.1.rst
- drivers/stepper/adi_tmc/adi_tmc5041_stepper_controller.c
- drivers/stepper/fake_stepper_controller.c
- drivers/stepper/gpio_stepper_controller.c
- drivers/stepper/stepper_shell.c
- include/zephyr/drivers/stepper.h
- include/zephyr/drivers/stepper/stepper_fake.h
- tests/drivers/stepper/shell/src/main.c
- tests/drivers/stepper/stepper_api/src/main.c

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-06 22:21:44 +01:00
Jilay Pandya
05e94ed234 drivers: stepper: api: rename stepper_move to stepper_move_by
rename stepper_move to stepper_move_by in following files:
- include/zephyr/drivers/stepper.h
- include/zephyr/drivers/stepper/stepper_fake.h
- doc/hardware/peripherals/stepper.rst
- doc/releases/migration-guide-4.1.rst
- drivers/stepper/adi_tmc/adi_tmc5041_stepper_controller.c
- drivers/stepper/fake_stepper_controller.c
- drivers/stepper/gpio_stepper_controller.c
- drivers/stepper/stepper_shell.c
- tests/drivers/stepper/shell/src/main.c

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-06 22:21:44 +01:00
Andries Kruithof
6f180e49f9 Bluetooth: Audio: set correct project name in CMakeList.txt
Some of the unittests had an incorrect project name in the
CMakeList.txt file
This is corrected here

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-06 22:20:57 +01:00
Théo Battrel
d5d3ac7427 Tests: Bluetooth: Build Host with different configurations
The new `host_config_variants` goal is to be able to test specific set
of configurations when building the Host without the need of having a
specific application for it.

The first test check that the Host build correctly with
`CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY` enabled.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-12-06 18:20:21 +01:00
Emil Gydesen
e12096ee4a tests: Bluetooth: Tester: Increase RTT_MESSAGE_SIZE
Sets CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256 as some log
messages are longer than 128 (default) and may be truncated
with the existing configuration and implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:55 +01:00
Emil Gydesen
829519dd6f Bluetooth: BAP: Add broadcast sink callback structs
These callbacks are trigger for changes that affect the entire
broadcast sink, such as the BIG synced and terminated events.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:06 +01:00
Emil Gydesen
0ae976166f Bluetooth: CAP: Add broadcast source callback structs
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:06 +01:00
Emil Gydesen
ab9ee0817d Bluetooth: BAP: Add broadcast source callback structs
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:06 +01:00
Krzysztof Chruściński
384e940c66 drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC
Deprecate mode which is using TIMER+(D)PPI for reliable byte counting.
Recently a new approach is added (CONFIG_UART_NRFX_UARTE_ENHANCED_RX)
which supports reliable byte counting without additional HW resource.
This mode is planned to be the only supported RX path mode.

Enhanced RX has slightly different behavior. There are no partial RX
packets (events with non-zero offset). There is UART_RX_BUF_RELEASED
after each UART_RX_RDY event.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-06 12:14:02 +01:00
Lucien Zhao
30c45057ae tests: drivers: pwm: pwm_api: support mimxrt1180_evk board
Set tpm5 status as ok
add pwm-0 as aliases

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-06 12:13:54 +01:00
Alexander Svensen
49e5a0dc5a bluetooth: tester: audio: Add NULL checks
- Add NULL checks for broadcast_source_stop
- Add NULL checks for broadcast_source_release
- Return -ESRCH if trying to stop ext_adv before creation

Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
2024-12-06 12:13:03 +01:00
Neil Chen
765b3aac30 tests: drivers/adc/adc_api: Support adc api test for NXP frdm_mcxa156
Support adc api test for NXP frdm_mcxa156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-06 10:01:26 +01:00
Chris Friedt
3f60489fae tests: benchmarks: move pthread_pressure to benchmarks/posix
The pthread_pressure test was not a typical test per se. It was
a benchmark in search of the proper home.

Let's move it to the correct place in the Zephyr tree, add a
doc, and provide some reporting.

Currently, k_threads out-perform pthreads by almost a factor of
2. The theoretical maximum performance of pthreads would be at
parity of k_threads, since pthreads are a wrapper around kernel
threads. It would be great to reduce the gap.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-06 06:51:13 +01:00
Josuah Demangeon
9e908b1b72 drivers: video: add emulated Imager driver and RX driver
Add a new implementation of a test pattern generator, with the same
architecture as real drivers: split receiver core and
I2C-controlled sub-device, with changes of video format in
"zephyr,emul-imager" leads to different data produced by
"zephyr,emul-rx".

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-12-05 20:00:21 -05:00
Josuah Demangeon
46a262ffe6 drivers: video: common: Add utilities to seek frmival/caps structures
Introduce a video_get_format_index() utility to help finding a caps
entry out of a given format. Introduce several utilities to seek and
apply frame intervals.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-12-05 20:00:21 -05:00
Emil Gydesen
49a458e5aa tests: Bluetooth: Update PTS ICS with new spec versions
Added support for BAP 1.0.2, CSIS 1.01, PACS 1.0.2, PBP 1.0.1
Enabled support for extended adv in the LL (mandatory requirement)
Enabled support for multiple BIGs support in the LL.

Due to a bug in the BT qualification tool, the following
features are values in the .bqw file are manually added
<Feature>BAP 4/1</Feature>
<Feature>BAP 26/1</Feature>
<Feature>BAP 49/1</Feature>
<Feature>BAP 62/1</Feature>
<Feature>BAP 77/1</Feature>
<Feature>BAP 83/1</Feature>
<Feature>CSIP 3/1</Feature>
<Feature>CSIP 8/1</Feature>
<Feature>PBP 10/1</Feature>

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-05 16:13:55 -05:00
Dmytro Firsov
b3758a787c tests: kernel: exclude xenvm with GICv3 from device tests
The issue with mentioned test for GICv3 version of xenvm virtual
board is the same as for regular xenvm - device tree overlay for this
test overrides #address-cells and #size-cells property for original
device tree file (from 0x2 to 0x1), which leads to incorrect DT parsing
by actual Xen drivers. This causes build errors, so test should be
skipped for GICv3 platform too.

Same issue for regular xenvm was fixed by commit 40fe36669c ("tests:
kernel: exclude xenvm from device tests"). Issue for GICv3 appeared
after migrating to HWMv2.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2024-12-05 22:09:31 +01:00
Andy Ross
da35377256 tests/boards/mtk_adsp: Handle protocol skew
Recent kernel drivers for some devices have swapped the mailbox device
used for replies.  It used to be that all commands in either direction
were sent on mbox0 and all replies on mbox1.  Now mbox0 handles
commands and replies for "DSP to Host" communication, and mbox1 is for
"Host to DSP".  Listen to both devices for our simple test.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Vinayak Kariappa Chettimada
fbbde51853 Revert "test: bsim: bt: fix test scripts"
This reverts commit 18119e8f6e.

Audio tests are enabled back, but change to random number
seed is retained for the multiple identity test.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 15:18:11 +01:00
Vinayak Kariappa Chettimada
ab478f543c Revert "tests: bsim: comment out some failing AC tests"
This reverts commit 1320b3dd66.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 15:18:11 +01:00
Emil Gydesen
0851cb2772 tests: Bluetooth: CAP: Acceptor bsim test use ext_adv
Remove a duplicated advertising set in the CAP acceptor babblesim
test. The advertising set is configured in test_start_adv.

The BSIM test for the CAP acceptor used legacy instead
of extended advertising.

This also adds the required advertising data and validation
on the CAP initiator and CAP commander.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-05 15:18:11 +01:00
TOKITA Hiroshi
1d40a7ee34 tests: lib: devicetree: add test for zephyr,memory-region-flags attr
Add a test for zephyr,memory-region-flags.

This test tests the attributes of memory regions defined in the linker
script, but this information cannot be obtained at runtime.
It verifies that the expected memory region attributes are defined in
the linker.cmd.

Since no syntax analysis is performed, this is not an entirely rigorous
test but sufficient for practical purposes.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-05 06:39:46 -05:00
Andrew Featherstone
411c69234e tests: drivers: dma: Increase test coverage for RP2040
Increase test coverage for Raspberry Pi's RP2040. 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-05 12:29:33 +01:00