Commit graph

16700 commits

Author SHA1 Message Date
Johan Hedberg
3063f18942 Bluetooth: Host: Remove unnecessary hci_driver.h includes
None of these files actually use anything from the hci_driver.h header
file.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Alberto Escolar Piedras
4558056f81 tests/bsim: Also runtime test the UART drivers for the nrf54l15
To increase coverage.

Note that we call twister separatedly for this target, due to the 54l15
overlays using UARTE20 which is indexed in simulation as "2", but as
the nrf52833 does not have 3 instances. So "-uart2_loopback" is not
a valid option for a 52833 executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
9c386cab93 tests uart_pm: Enable for nrf54l15bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
eec736355c tests uart_mix_fifo_poll: Enable for nrf54l15bsim
Enable this test in the simulated nrf54l15 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
dd2f4117e3 tests uart_async_api: Enable in nrf54l15bsim//cpuapp
Enable this test in the simulated nrf54l15 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Jukka Rissanen
c2802618df tests: net: socket: tcp: Add min_flash to the test config
Add minimum flash requirement to the tests. This will effectively
exclude nrf5340dk/nrf5340/cpuapp/ns as it does not have
enough flash for the application.

Fixes #81608

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 11:33:52 +01:00
Anas Nashif
28796076d8 tests: kernel: common: optimize filters
Optimize filters and remove build_on_all, this option is already used in
the synchronization sample which has more coverage on small platforms.

Since we only build, it does provide basic sanitcheck for the kernel as
well.

This reduces testplan on PRs and push events by almost 1000 entries that
would only be built or filtered at runtime.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-21 19:22:35 -05:00
Mahesh Mahadevan
21d0a3b699 tests: pwm: Add support for SCTimer PWM on FRDM-MCXN947
Add overlay files to enable test of PWM over SCTimer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Krzysztof Chruściński
f235ddb2cf tests: drivers: uart: async_api: Add uart120 instance to nrf54h20dk
Add second instance to be tested on nrf54h20dk. uart120 is a fast UARTE
which works on fixed pin locations. It is not available for cpuppr core.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
d2b69a4ec7 tests: drivers: uart: async_api: Rework for multi instance
Rework the test to be able to run on multiple instances.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
bc007fd53b tests: drivers: uart: async_api: Add missing static keyword
Multiple variable in the test were missing static keyword.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Benedikt Schmidt
53ae195f0d drivers: fpga: replace runtime checks with buildtime asserts in iCE40
Replace NULL checks for the set and clear registers with BUILD_ASSERTs
in the iCE40 device instantiation.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-21 20:11:47 +01:00
Pieter De Gendt
f05deb1aa4 python: Format trivial files where only newlines were missing
Apply formatting on files that only needed adding newlines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-21 20:10:51 +01:00
Dominik Ermel
77ebf82b3e storage: flash_map: Don't generate flash area when no device
Change in default flash map generation, where partitions hanging of
disabled devices will not have flash area generated.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-21 14:48:44 +01:00
Emil Gydesen
b4f3763c31 tests: Bluetooth: Audio: Use same recv_cb for all tests
This commit changes the BSIM tests to use the same recv callback
for all tests. The purpose of this is to reduce code duplication
and make it easier to maintain the tests.

This also changes the recv_cb so that in case of any error we log
the most recently received SDU, which should provide more
information about why a test failed in case of RX error.

PBP had to be updated a bit to support the audio_stream
struct.

Also modifies a check and log in bap_stream that was less than
helpful to determine if it was the stream or the endpoint that
was NULL.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 14:47:49 +01:00
Seppo Takalo
23345d203e tests: coap_client: Add test for non-confirmable request
Add test for sending multiple non-confirmable requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
d64748cc52 tests: coap_client: Refactor tests
Refactor tests to be a bit shorter, so its easier to read
and copy-paste for a new testcase

All idioms like "ret = somecall(); zasser.." are replaced with just
"zassert_ok(some_call());"

Commonly used structures are global and initialized once.

To avoid cross-test side-effects, suite_after-function is added
to cleanup all requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
34a6d5a5dc tests: coap_client: Proper slow-down
Use real-time scheduler with 100x speedup, so timeouts are
accurate enough, but still fast for tests to run.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Omkar Kulkarni
b160063efb Tests: Bluetooth: mesh_shell: Update prj.conf
Updates and aligns the project config file to enable usage of multiple
keys so that users are not required to manually update the project
config file for testing most common mesh scenarios requiring multiple
netkeys and appkeys.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-11-21 14:46:47 +01:00
Carles Cufi
21475774fc boards: nordic: nRF54L15DK: Add basic support for the L05 and L10 ICs
The nRF54L05 and nRF54L10 are identical to the nRF54L15 except for their
memory sizes. Add support for emulating those ICs on the nRF54L15DK.
This commit only adds support for the main application core. Support for
the FLPR core may be added later.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
e78832034f soc: nordic: Introduce the nRF54L05 and nRF54L10
These two new ICs are variants of the nRF54L15 with different memory
sizes:

- nRF54L05: 500KB RRAM, 96KB RAM
- nRF54L10: 1022KB RRAM, 192KB RAM
- nRF54L15: 1524KB RRAM, 256KB RAM

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Håvard Reierstad
0b35b38ef5 Bsim: Bluetooth: Mesh: Add multicast bridge tests
Adds two new tests for the Subnet Bridge feature, testing group and
virtual addresses as destinations. The tests are based on the existing
`brg_simple.sh` test, with the addition of a new node and a new subnet
to make sure that messages are bridged to multiple subnets, but only
subnets that have a corresponding entry in the bridging table.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-21 09:25:11 +01:00
Håvard Reierstad
77e017306e Bsim: Bluetooth: Mesh: Rename/refactor send_ra
Renames `bt_mesh_test_send_ra` to `bt_mesh_test_send_data` and changes
the corresponding callback funciton as it is used outside of the replay
attack tests, and can be used to send custom data. The function is
extended to accept a UUID parameter to allow sending data to virtual
addresses.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-21 09:25:11 +01:00
Emil Gydesen
c4fbe38219 Bluetooth: BAP: Depend on BT_PER_ADV_SYNC instead of select
Change the select of BT_PER_ADV_SYNC and BT_EXT_ADV to
depends on. This is an effort to reduce the use of
select for Kconfig options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
4c86a5cc8d Bluetooth: BAP: Depend on BT_PAC_{SNK,SRC} instead of select
Modify ASCS and BAP Broadcast sink to depend on the PAC options
instead of selecting them.

Since Kconfig does not support "depends on X if Y",
a select for PAC_{SRC,SNK} is used depending on
ASCS_ASE_{SRC,SNK}.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
c0f86011cb Bluetooth: BAP: Depend on BT_ISO_SYNC_RECEIVER instead of select
The BAP Kconfigs option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
d22c7b0cf2 Bluetooth: BAP: Depend on BT_ISO_BROADCASTER instead of select
The BAP_BROADCAST_SOURCE Kconfig option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
df6b5981bf Bluetooth: Audio: depends on GATT instead of select
Modify the Kconfig options to depend on the GATT
features rather than selecting them.

This is part of an effort to reduce the amount of
selects we use in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Federico Di Gregorio
f8ab959d7e boards: opta: RS485 support
This set of changes enables the RS485 hardware connected to usart3 and
provides some overlays that allow for easily running the modbus
rtu_client and rtu_server samples on Opta.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Valerio Setti
516886be1b mbedtls: MBEDTLS_ENTROPY_POLL_ZEPHYR default on if MBEDTLS_ENTROPY_C
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to
poll some entropy source to gather data that will then be
processed by CTR/HMAC-DRBG modules. This means that in most
of the cases, once MBEDTLS_ENTROPY_C is enabled then also
MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was
done manually until now, as the long list of samples/tests
demonstrate.

This commit solves this dependency by defaulting
MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as
MBEDTLS_ENTROPY_C is set. As a consequence, all manual
enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests
are removed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Valerio Setti
08bd9c72bd mbedtls: use CSPRNG whenever possible as PSA random source
The main problem of MBEDTLS_PSA_CRYPTO_LEGACY_RNG is that it
brings in some legacy modules (entropy + ctr_drbg/hmac_drbg)
which means extra ROM/RAM footprint.
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG instead simply calls to the
CSPRNG which makes it definitely smaller.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Marvin Ouma
91749dfeb3 tests: posix: common: separate posix xsi streams to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves stropts into a singular
testsuite at tests/posix/xsi_streams app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-20 15:58:26 -05:00
Daniel Leung
55ad66a30c tests: ztest/base: fix incorrect userspace filtering
The filter here should be used to filter for capability:
whether the platform configuration supports userspace. And if
it does support userspace, we then enable CONFIG_TEST_USERSPACE
(and thus CONFIG_USERSPACE) for testing. We should not be
filtering for whether userspace is enabled, but should really
be filtering for whether userspace is supported.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-20 15:58:15 -05:00
Daniel Leung
df4883ad23 tests: thread_error_case: fix incorrect userspace filtering
The filter here should be used to filter for capability:
whether the platform configuration supports userspace. And if
it does support userspace, we then enable CONFIG_TEST_USERSPACE
(and thus CONFIG_USERSPACE) for testing. We should not be
filtering for whether userspace is enabled, but should really
be filtering for whether userspace is supported.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-20 15:58:15 -05:00
Alberto Escolar Piedras
f79d879d50 tests: Thread-Metric: Fix filter description
Correct the description of why we exclude the POSIX arch

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-20 15:56:16 -05:00
Volodymyr Fialko
1310856348 tests: riscv: test PMP stack guards
Test if PMP protected regions prevents write access.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
2024-11-20 08:25:49 -05:00
Mara Furland
30fa48558e boards: qorvo: add DWM3001CDK support
Add support for the decawave DWM3001C board from qorvo

Signed-off-by: Mara Furland <mara@fur.land>
2024-11-20 10:16:58 +00:00
Lingao Meng
836fa88cbd kernel: work: Add missing ASSERT for args
Add missing ASSERT for dwork & queue.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-20 10:15:20 +00:00
Jakub Wasilewski
8e881959a4 boards: hifive_unmatched: add support for S7 and U74 targets
Add `hifive_unmatched//s7` (earlier selected by default, using
`hifive_unmatched`) and `hifive_unmatched//u74` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
2423c87d54 boards: hifive_unleashed: add support for E51 and U54 targets
Add `hifive_unleashed//e51` (earlier selected by default, using
`hifive_unleashed`) and `hifive_unleashed//u54` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
84434ba006 arch: riscv: add Kconfig option for imprecise FPU state tracking
According to the RISC-V Instruction Set Manual: Volume II, Version 20240411
(Section 3.1.6.6), some implementations may choose to track the dirtiness
of the floating-point register state imprecisely by reporting the state to
be dirty even when it has not been modified. This option reflects that.

Also add a filter in `tests/arch/riscv/fpu_sharing/` based on imprecise
FPU state tracking

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Anas Nashif
3364a35f05 Revert "irq: multilevel: compile 3rd level IRQ APIs only when enabled"
This reverts commit 2152b8e414.

This commit is breaking CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 22:40:13 -05:00
Yong Cong Sin
2152b8e414 irq: multilevel: compile 3rd level IRQ APIs only when enabled
This revert the idea of 3fa7d78 from #78845.

The 3rd level IRQ APIs won't compile when
CONFIG_3RD_LEVEL_INTERRUPT_BITS=0.

Updated testcase accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-19 20:04:32 -05:00
Daniel DeGrasse
71c80932a9 tests: drivers: build_all: display: fix conflicting nodelabels
Some nodelabels in the display build_all test overlay lacked a "test"
prefix, causing test failures on boards that also define displays with
this nodelabel. Prefix these nodes with "test" to resolve this issue.

Fixes #81610

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-19 18:35:32 -05:00
Anas Nashif
71bb882221 tests: cpp: remove obsolete target
nrf54h20dk@0.8.0/nrf54h20/cpuapp was dropped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 18:21:19 -05:00
Krzysztof Chruściński
662f412a35 tests: drivers: uart: async_api: Add nrf54h20 cpuppr
Add configuration for nrf54h20dk/nrf54h20/cpuppr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 17:52:33 -05:00
Nazar Palamar
6172092730 test: arm: irq: Add overlays files for Infineon boards
Changed interrupt priority for GPIO, default 6 is not suitable for
for the ZERO_LATENCY_IRQS function used in this test.
used in this test.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-11-19 17:50:44 -05:00
Khoa Nguyen
8e46d26106 drivers: i2c: Add config I2C for EK-RA8D1 and MCK-RA8T1
Add config support I2C for EK-RA8D1 and MCK-RA8T1.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-19 09:52:44 -05:00
Tri Nguyen
c8938737c0 drivers: i2c: Support for RA6 devices
Add devices node that support I2C for RA6 boards

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
2024-11-19 09:52:44 -05:00
Emil Gydesen
8e017ebff3 tests: Bluetooth: Audio: Increase RX buf count for bsim
The tests were using the default of 1 which is very low,
especially when we might have multiple RX streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-19 09:52:28 -05:00