Commit graph

16700 commits

Author SHA1 Message Date
TOKITA Hiroshi
cb99cd795d tests: drivers: build_all: fuel_gauge: Add devices to build test
Add build tests for the following devices.

- maxim,max17048
- ti,bq27z746
- sbs,sbs-gauge-new-api
- zephyr,fuel-gauge-composite

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:49:16 +02:00
TOKITA Hiroshi
20d17cfa6a tests: drivers: build_all: charger: Add config for sbs,sbs-charger
Add configuration to add `sbs,sbs-charger` to build test.

Also, adding emulator build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:49:16 +02:00
Yong Cong Sin
4da4ee8ece tests: arch: riscv: test csf registers value
Test if callee-saved-registers values are as expected.

Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-10-02 09:48:02 +02:00
Alberto Escolar Piedras
15774e1316 tests/boards/native_sim/cpu_wait: Correct ifdef
This test works both with native_posix and native_sim.
native_sim will eventually not set NATIVE_SIM_NATIVE_POSIX_COMPAT
(i.e. not pretend to be native_posix) so let's correct this ifdef

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-01 10:47:55 +01:00
TOKITA Hiroshi
df7f1ff5b5 tests: drivers: build_all: gnss: Add serial devices to build test
Add build tests for following devices.

- luatos,air530z
- quectel,lc86g
- u-blox,m8

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-01 10:01:23 +02:00
Mateusz Holenko
9905e27353 tests: thread_runtime_stats: Skip the test on virtual Cortex-R8 platform
Current clocks configuration for the platform makes it impossible
to pass the IDLE_EVENT_STATS_PRECISION check. This is to be addressed
in the future.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Marek Slowinski
2088f6d35f ztest: error_hook: Exclude cortex_r8_virtual from divide-by-zero tests
Cortex-R8 emulated in Renode doesn't trigger exceptions on divide by zero.
We only skip the virtual SoC, so the test will still apply on a physical
target.

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Emil Gydesen
fa4f2ffc47 Bluetooth: CAP: Add support for doing just disable for unicast stop
The unicast_stop function is changed to primarily do a
BAP disable instead of a release, with optional
support for releasing the streams once they have been disabled.

This also adds unittests for the procedure which also
allow us to remove the invalid param testing from the BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-01 09:54:04 +02:00
Emilio Benavente
a6ed05e765 tests: drivers: uart_async_api: fix userspace fault
Updated overlay files to test using nocache.
and run outside of usersapce mode to avoid
inaccessible memory regions when using nocache on RT parts.
Also updated testcase file to reflect nocache testing.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-09-30 17:00:17 -05:00
Ayush Singh
1b81489ec5 tests: drivers: adc: adc_api: Add beagleconnect_freedom overlay
- Enabling adc testing for beagleconnect_freedom

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Raffael Rostagno
4409573e72 tests: wifi: esp32: Functional tests for CI
Functional wifi tests for ESP32 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-30 16:57:50 -05:00
Ryan McClelland
996512d589 Revert "Revert "tests: drivers: i3c: add build of i3c_shell.c""
This reverts commit 50720f835b.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
alperen sener
9ae8ebfade Tests: Bluetooth: Tester: Increase the number of max mesh tx segments
Increasing the number of max tx segments to be able to fit composition
page 0 into composition data status message.

After the subnet bridge config client and server are added to the
tester, the size needed to report composition data page 0 increased.
Current behaviour of the tester is correct, dropping the element when
there is not enough space in data field, however the PTS application
does not handle the composition data status message without element.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-09-30 17:12:34 +01:00
Torsten Rasmussen
d128a078f6 cmake: change test message overwrite to macro
Fixes: #79052

The yaml CMake tests overwrites `message()` in order to verify correct
error handling. This was original done in a function and then using
a return call when an expected error has been raised.
Using a function() means the `return()` only returns the `message()`
and thus wrongly continue processing rest of the yaml file.

Change `message()` to macro so the return call correctly returns from
the calling yaml functions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-30 17:12:23 +01:00
Jukka Rissanen
759f3a0c7c tests/samples: net: Fix the max number of file descriptors
Make sure that CONFIG_ZVFS_OPEN_MAX in the tests and samples is at
least the same value as CONFIG_NET_SOCKETS_POLL_MAX so that we
cannot have more polled sockets than there are available file
descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-30 17:12:15 +01:00
Gerard Marull-Paretas
de70ebd66f boards: nordic: do not enable DMA_RAM21 region by default
This region is only required if certain fast peripherals make use of such
region for DMAing. It was now enabled on all builds, often resulting in:

```
[134/134] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       24372 B       248 KB      9.60%
             RAM:        4448 B       256 KB      1.70%
       DMA_RAM21:          0 GB        16 KB      0.00% <~~ Not used!
   DMA_RAM3x_APP:          40 B         4 KB      0.98%
        IDT_LIST:          0 GB        32 KB      0.00%
```

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-30 17:12:07 +01:00
Aksel Skauge Mellbye
bda8ae8c3f drivers: clock_control: silabs: Add clock control driver
Add clock control driver for Silicon Labs Series 2 and newer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Dominik Lau
455b45780d tests: drivers: dma: run dma tests on stm32f746g_disco
enabled dma loop transfer and channel blend to run
on stm32f746g_disco

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Michal Smola
f810e1318f tests: adc: Enable ADC tests for frdm_mcxc242 board
Enable ADC tests for frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-30 10:49:30 +02:00
TOKITA Hiroshi
2815b6d710 tests: drivers: build_all: gpio: Add ti,lmp90xxx-gpio configuration
Add the following devices to build tests.

- ti,lmp90xxx-gpio

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
0ea5ef8699 tests: build_all: gpio: Excluding app.overlay from ads1145s0x tests
- Exclude `app.overlay` from DTC_OVERLAY_FILES in
  `drivers.gpio.build.adc_ads1145s0x_gpio` tests to avoid duplicate builds.
- Modified so that adc_ads1145s0x_gpio.overlay can be tested alone.
- Delete the conffile and move its contents to extra_configs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
8d68f6a45b tests: drivers: build_all: gpio: Correct mcp230xx compatibility
The "microchip,mcp230xx" is not defined.
Correcting it to "microchip,mcp23017".

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
bcec0a29ef tests: drivers: build_all: gpio: Add modules that were not registered
Add the following devices to build tests.

- richtek,rt1718s
- st,stmpe1600
- adi,adp5585
- nordic,npm6001
- cypress,cy8c95xx-gpio
- ti,sn74hc595

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
2c1274f6a9 tests: drivers: build_all: Add power_domain drivers test
Add build_all test for power_domain drivers.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
Declan Snyder
4012161efb boards: frdm_mcxw71: Enable LPTMR
Enable LPTMR as counter, enable lptmr0 in board DTS and enable lptmr1 in
basic counter api test.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
TOKITA Hiroshi
61c5346095 tests: drivers: build_all: sensor: Add non-typical TRIGGER settings
The following devices enable TRIGGER in a way that is different from the
template definition, so add these settings to sensos_no_default.conf.

- bosch,bmc150
- bosch,bmm150
- bosch,bmp150
- ti,ina230
- we,wsen-itds
- lm77
- st,lsm9ds0-gyro
- ti,tmag5170

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-28 11:29:03 -05:00
Robert Lubos
7aef84ce52 tests: net: sockets: tls: Increase connect timeout
Since fc007eeef5 TLS sockets support
timeout based on CONFIG_NET_SOCKETS_CONNECT_TIMEOUT value. The TLS test
suite reduced this config value to speed up the tests, however it turns
out the 100ms timeout is too low to finalize the handshake on slower
platforms (nrf52840 specifically). Therefore increase the timeout value
to 200ms to prevent test failures on those.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-28 08:21:51 -05:00
Robert Lubos
1dca822483 tests: net: http_server: Add netif dependency
Some of the http_server tests suites were missing netif dependency.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-27 10:56:47 +01:00
Fabrice DJIATSA
31d24eb186 tests: drivers: adc: adc_api: update adc_api test
-add nucleo_u083rc and stm32u083c_dk overlays files
for testbench purpose.
- add platform_exclude property to skip test on boards
with little ram size.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>

tests: drivers: adc: adc_api: update adc_api test
2024-09-27 10:55:56 +01:00
Jamie McCrae
a9731b5d67 tests: mgmt: mcumgr: Add img_mgmt_slot_info test
Adds a test to exercise this new feature

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
TOKITA Hiroshi
6e5f1f19c9 tests: drivers: build_all: adc: Adding configuration for ti,tla2021
Add configuration for ti,tla2021 to enable build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
TOKITA Hiroshi
20ff7ddff9 tests: drivers: build_all: pwm: Add i2c-devices build test
Add build tests for following devices.

- maxim,max31790-pwm
- nxp,pca9685-pwm

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:24 -04:00
Babak Arisian
c0cfe49a54 Bluetooth: BASS: Add support for dynamic registration of BASS
Added support for dynamic registration and unregistration of the
Broadcast Audio Scan Service (BASS) within the scan delegator.
This enables both scan delegator and BASS to be registered or
unregistered dynamically at runtime.

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-09-26 17:42:39 -04:00
Emil Gydesen
ec2c5b0c1f Bluetooth: GATT: Replace magic number 0 with macro for auto ccc
Replace the magic number 0 with a #defined value for
the auto CCC discovery feature.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-26 17:41:24 -04:00
Raffael Rostagno
aaaffd20a6 tests: ethernet: esp32: Functional test for CI
Functional test for Ethernet for CI device testing

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-26 17:41:06 -04:00
Bartosz Miller
e26b9750ae tests: drivers: Add PPR support in NRF GRTC timer test
Test did not support PPR core due to failing GRTC channel allocation.
This change fixes the channel allocation and enables PPR core test.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-26 13:29:45 -05:00
Francois Gervais
13cad59542 tests: coap_client: wait enough for requests to be unallocated
As confirmable requests will stay allocated for (3 * ACK_TIMEOUT), we
need to adjust the timings so all requests are unallocated by the end
of the test.

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2024-09-26 09:20:23 -05:00
Rubin Gerritsen
417a9e81ec Bluetooth: Controller: Add device tree dependency to selection
This commit makes the device tree configuration decide
which link layer is compiled in. We do this to avoid
hard-to-understand linker errors referencing device tree nodes.

The following configuration creates a difficult to parse
linker error:
* BT_LL_CHOICE contains multiple entries, BT_LL_SW_SPLIT
  is selected.
* Each BT_LL_CHOICE has its own unique device tree node with its
  own "compatible".
* Only one of the link layer device tree nodes has status "okay",
  but not the one corresponding to BT_LL_SW_SPLIT.

The linker error indicates that code using the HCI driver fails
to link with the controller. This because the HCI driver device
tree node references the link layer selected in devicetree which
is not compiled in.

By adding a dependendency to the device tree node, this can no longer
happen. Instead, if BT_LL_SW_SPLIT is now selected in a configuration
file, a Kconfig warning will be issued:

```
warning: The choice symbol BT_LL_SW_SPLIT
(defined at subsys/bluetooth/controller/Kconfig:129) was
selected (set =y), but BT_LL_SOFTDEVICE (defined at
/home/ruge/ncs/nrf/subsys/bluetooth/controller/Kconfig:11)
ended up as the choice selection.
```

This should be easier to understand than:

```
...(hci_core.c.obj):(.data.bt_dev+0x16c):
undefined reference to `__device_dts_ord_132'
```

After this commit we should consider getting rid of link layer
selection from Kconfig completely as the link layer is in practice
selected through device tree.

Unit tests have been updated to satisfy the dts dependency.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-26 11:10:22 +01:00
Alberto Escolar Piedras
b5b91b3edb ipc: icmsg & icbmsg: Add support for POSIX arch targets
Add support in this IPC backends for POSIX arch targets in general,
and ensure the nrf5340bsim defines the buffer which will be used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
5dc810e261 ipc: pbuf: Provide function for Rx side initialization
Provide a new function for initializing the Rx side,
so users do not need to initialize the pointers by hand
if they did not use PBUF_DEFINE().

Let's also rename pbuf_init() to pbuf_tx_init() to clearly
signify the previous function was only meant to be used
by the Tx side.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Katarzyna Giądła
436d1bf628 samples: tests: Add support to tests on nrf54l15 DK
Align all existing samples/tests/applications which
contains nrf54l15pdk/nrf54l15/* by adding
nrf54l15dk/nrf54l15/* to enable twister builds.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-09-26 03:31:20 -04:00
Torsten Rasmussen
205691edce cmake: linker: evaluate CONFIG_LINKER_ITERABLE_SUBALIGN in CMake
Evaluate CONFIG_LINKER_ITERABLE_SUBALIGN in CMake instead of in the
linker script.

It cannot be assumed that a linker generator implementation is
pre-processed and therefore Kconfig settings cannot be used in those
but must be evaluated in CMake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-25 16:16:35 -05:00
Sylvio Alves
68479a8c8c tests: boards: rename espressif folder name
Current folder name is set to "espressif_esp32" and
might not reflect all kinds of SoCs as such as esp8684.
Rename the folder to "espressif" only.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-25 13:47:37 -05:00
Laurentiu Mihalcea
50720f835b Revert "tests: drivers: i3c: add build of i3c_shell.c"
This reverts commit ffb60c08e9.

Fixes #78990.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-25 09:10:23 -05:00
Luca Burelli
5ec5f24081 llext: test exporting DT devices to extensions
Add a new test to the simple llext test suite that verifies that DT
devices are properly exported to extensions. This is done by obtaining a
device handle from the DT and then trying to get the same handle at
runtime using the device_get_binding() API.

This test is optional because the current qemu_xtensa platform does not
have any usable DT devices to test with.

The LLEXT heap size is also increased to 64 kbytes to avoid heap
exhaustion when running the new test on mps2_an385.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Abderrahmane Jarmouni
3a9215a54e tests: drivers: dma: loop_transfer: add stm32h750b_dk config
Run test on stm32h750b_dk board

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-25 12:58:36 +02:00
Valerio Setti
a913c9f2e3 tests: tls_configurations: remove tests on native/64 platform
Since the same test might be run in parallel on different platforms,
the one that it's started later will fail due to port re-use for
the OpenSSL server.
Since it's not really required to run the tests on native_sim and
native_sim/native/64, the latter is removed in order to solve this
problem.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-25 12:58:04 +02:00
Emil Gydesen
390528101a test: Bluetooth: ext_adv_scanner: Fix bad use of adv_type
The adv_type is not a bitfield but was used as such.
Changed to do a proper comparison.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-25 04:04:46 -04:00
Alberto Escolar Piedras
4f152b2a81 tests/ztest: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
6593f2b696 tests/subsys/usb: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00