Commit graph

13345 commits

Author SHA1 Message Date
Johann Fischer 29003ff264 usb: bos: cleanup Binary Device Object Store header
We could reuse the BOS header, but there are parts that are only needed
in the legacy device support or used internally and the tests. Move this
parts to the appropriate places.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Ederson de Souza a0ee472a6f tests/misc: Add llext EDK test
This test uses pytest to generate an EDK from a simple Zephyr
application, and uses this EDK to build a simple extension, to ensure
that EDK generation is sane.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-05-17 16:21:48 +01:00
Marcin Niestroj 3a9ae1878f tests: socket: udp: reduce SO_PRIORITY from 8 to 6 for NSOS compatbility
According to 'man 7 socket' about SO_PRIORITY:

  Setting a priority outside the range 0 to 6 requires the CAP_NET_ADMIN
  capability.

So use 6 instead of 8, in order to make UDP socket tests pass with native
offloaded sockets on native_sim platform.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Krzysztof Chruściński 90b654ee86 tests: drivers: uart: uart_mix_fifo_poll: Add nrf54h20dk overlays
Add overlays for nrf54h20dk (cpuapp and cpurad).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-17 10:34:02 +02:00
Tom Burdick b249535093 sensors: Add channel specifier
Use a structured channel specifier rather than a single enum when
specifying channels to read in the new read/decoder API.

Replaces usages of a seperate channel and channel_index parameter
where previously used with a struct sensor_chan_spec.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-17 09:30:18 +02:00
Flavio Ceolin 4e91d8e7c3 tests: smbus_emul: Remove unnecessary definition
pcie_prob() has been deprecated and it is not needed
in the test.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Jeppe Odgaard 332d362595 tests: drivers: build_all: sensor: add tsic_xx6
Enable PWM and PWM_CAPTURE in conf and add pwm node to app.overlay.

Add TSic xx6 node to pwm.dtsi.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-16 18:57:24 -04:00
Alberto Escolar Piedras a1576af7af tests/kernel timer_api: Test absolute timers with loosing ticks
Let's also explicitly test that absolute timeouts trigger
at the correct time, even if the kernel has not seen
system clock timer announcements for a while.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 18:56:14 -04:00
Mahesh Mahadevan d44a414574 tests: pm: power_mgmt_soc: enable testing on rd_rw612_bga
Enable the SoC power management test suite on the NXP RW612 EVK
development board.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mateusz Michalek dc59cb56ed tests: storage: flash_map: _NODE macros
adds API checks for fixed partitions access macros that are
called with nodes as an argumet.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-16 16:21:34 +02:00
Alberto Escolar Piedras 13a5536838 boards nrf54l15bsim_nrf54l15_cpuapp: Enable counter tests
These tests run fine in this board, let's provide an
overlay and enable them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 15:19:08 +01:00
Emil Gydesen 73528a326e Bluetooth: Audio: Shell: Remove increased workqueue stack size
The LC3 in the shell is now done in separate threads with their
own stacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-16 15:51:45 +02:00
Emil Gydesen f573c3eb01 Bluetooth: Audio: Shell: Fix build errors for USB=n
When CONFIG_USB_DEVICE_STACK=n then the sine wave
generator was enabled, which caused build errors.

This commit fixes those errors and also adds the
nRF5340 as a build target for the USB tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-16 15:51:45 +02:00
Henrik Brix Andersen aed0fbf774 drivers: can: remove initial bus-speed/bus-speed-data properties
Remove all CAN controller "bus-speed" and "bus-speed-data"
properties. These all use the default bitrates set via Kconfig.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-16 09:23:59 +02:00
Daniel DeGrasse 1a256c7c21 tests: subsys: sd: report bus frequency, report timing correctly
Report bus frequency, and use correct names for the timing modes when SD
cards do not support UHS modes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Yong Cong Sin 8c8123466a tests: arch: common: stack_unwind: cleanup Kconfig
Refactor to cleanup some Kconfigs that are not required by
certain architectures to produce the traces.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-16 09:20:19 +02:00
Daniel DeGrasse 2be937dca4 tests: drivers: sdhc: setup SDHC IO before test
Rather than relying to the alphanumeric test ordering implemented in
ZTEST to ensure certain tests run first, setup the SDHC IO properties to
known good values before starting any of the tests. This allows the SDHC
tests to run in any order, rather than needing certain tests to run
first.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:18:07 +02:00
Zhaoxiang Jin 1805c4797f tests: drivers/regulator/voltage: Add regulator test for NXP frdm_mcxn947
Support regulator(vref) output vt oltage test for NXP frdm_mcxn947

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Zhaoxiang Jin 3dc82a6606 tests: drivers/adc/adc_api: Support adc api test for NXP frdm_mcxn947
Support adc api test for NXP frdm_mcxn947

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Daniel DeGrasse 22fa0c0885 test: drivers: disk: disk_access: add STM32 specific testcase
STM32 devices with an SDMMC driver will still need to be tested, but
they do not use the SDHC framework for their disk driver. Therefore, add
a special testcase to validate disk access support for devices with the
STM32 specific SDMMC DT compatible enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-15 17:28:21 +02:00
Sebastian Głąb 4041a2507d tests: drivers: watchdog: wdt_error_cases: Add test scenario
Add test scenario that verifies correct error code
returned by wdt_setup() when called just after wdt_disable().

Scenario:
- configure WDT timeout;
- start WDT by calling wdt_setup();
- remove all WDT timeouts by calling wdt_disable();
- confirm wdt_setup() returns error code due to lack
  of configured WDT timeouts.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-15 15:34:38 +01:00
Karol Lasończyk 00d2fc5135 tests: adc: Add overlay for nRF54L15 PDK for adc_api test
New file to make test works.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-15 15:33:41 +01:00
Seppo Takalo 6257576ce6 test: lwm2m: Enable DTLS Connection ID
Enable connection ID because it is on by default on the
client example as well.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Seppo Takalo a9e91af375 test: lwm2m: Add tests for Block-Wise transfers
Block-Wise GET, PUT and SEND

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Seppo Takalo 01b57b4999 net: lwm2m: Add offset to post-write callback
When Block-Wise transfer restarts, the post-write callback should
receive some indication that the block is actually a beginning of new,
instead of part of previous transfer.

Fixes #71351

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Emil Gydesen a6a14360a9 Bluetooth: BAP: Remove err from recv_state_removed callback
The callback is only ever called when we received a
notification from the BASS server that the receive state is
removed, which cannot contain an error code.
Thus it does not make sense for the callback to have an
error code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-15 14:57:20 +02:00
Valerio Setti dfae5ba7de mbedtls: fix entropy module enablement
- Do not set CONFIG_MBEDTLS_ZEPHYR_ENTROPY in
  tests/crypto/mbedtls because this can cause test failure on
  real devices in which test thread do not have access to
  drivers.
- make MBEDTLS_PSA_CRYPTO_RND_SOURCE depending on
  MBEDTLS_PSA_CRYPTO_C because it only makes sense when the
  latter is defined

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-15 14:55:16 +02:00
Andrzej Głąbek 53c350e17b tests: drivers: Add test for temperature sensor
Add a simple test intended primarily for checking the nRF temperature
sensor in its nrfs variant but intentionally was made generic enough
that it should be usable with other temperature sensors (after just
providing an overlay) and could be helpful in development of new
temperature sensor drivers, and possibly extended then if needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-15 09:25:30 +01:00
Francois Ramu 9023c27913 tests: arch arm: runtime nmi testing with dcache for ARM V7
For ARMV7 devices, use preferably the sys_cache_data_flush_all
function to flush the data cache

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:13:16 +02:00
Dawid Niedzwiecki c9649bdef8 tests: flash: stm32: add block registers tests
Add a test of FLASH_STM32_EX_OP_BLOCK_OPTION_REG and
FLASH_STM32_EX_OP_BLOCK_CONTROL_REG extended operations for stm32f4.

It verifies that the Option Byte and Control registers are blocked
correctly. The registers can be unlock after reboot, so it is needed
to separate this test from other tests.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-05-15 09:26:55 +02:00
Troels Nilsson 769409d41c Bluetooth: Controller: Add parameter to ISOALs sdu_write
For vendor datapaths that do not use a netbuffer to write SDUs
into, the callee of sdu_write currently has to keep track itself
of how much data has been written to the current SDU; This is wasteful
since ISOAL already keeps track of that. Add an sdu_written parameter
to the callback to inform the callee how much has been written to the
current SDU already so the callee can write using the correct offset

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-05-15 09:26:36 +02:00
Declan Snyder 14ef7d2d21 tests: adc: Test RW612 ADC
Enable RW612 RD board to test ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Johan Hedberg 484fe3f06c Bluetooth: Remove bt_read_static_addr() "hack"
This function was used to shortcut HCI for combined host + controller
builds. It doesn't provide much value and adds complexity to the HCI
driver interface, so just remove it. This means vendor-specific HCI
commands is now the only way for the host to access the same
information.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Johan Hedberg 18c23daee3 Bluetooth: Kconfig: Merge BT_HCI_VS_EXT into BT_HCI_VS
The naming of these two options was problematic, since it's both of them
are about vendor extensions, even though one has _EXT in the name and
the other doesn't. Just merge one option into the other. This has a
slight overhead on the controller side of enabling some more vendor
features if BT_HCI_VS is enabled, but that should hopefully be
acceptable.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Robert Lubos fab2f97364 tests: net: dhcpv6: Reapply LL address on iface up
The test suite assigns LL address to the interface manually, hence need
to reapply it whenever interface goes up.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-14 18:20:56 -04:00
Emil Gydesen 0f5aa8aa81 Bluetooth: Audio: Shell Remove BT_HAS_PRESET_CONTROL_POINT_NOTIFIABLE
Do not enable BT_HAS_PRESET_CONTROL_POINT_NOTIFIABLE as it
depends on EATT which isn't enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-14 18:18:36 -04:00
Bartosz Miller d8bffffda0 tests: drivers: Add more test cases for the i2c driver in controller mode
Extend coverage for the i2c master mode driver
This test suite uses external sensor BME688

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-05-14 17:04:24 +02:00
Bartosz Miller 7b82235e1e tests: drivers: Update uart_elementary suite with different configuration
Conigure UART to use 2 stop bits and even parity
in 'dual transmission' case
to cover more driver code cases.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-05-14 13:24:55 +02:00
Jamie McCrae 8ca399919b boards: Add chain length and colour mapping to LED strips
Adds chain length and colour mapping properties to LED strip devices
on boards where these parameters are now required

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Reto Schneider cba18a5943 tests: drivers: dma: loop transfer: Avoid fake pass
When the needed functionality is not available, its test should be
skipped, not passed.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-14 09:32:21 +02:00
Jordan Yates 23ca74b756 convert: use k_uptime_seconds
Replace usage of `k_uptime_get() / MSEC_PER_SEC` and
`k_uptime_get() / 1000` with dedicated function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Abderrahmane Jarmouni b903dff44f tests: drivers: uart_async: stm32: add test cases with DCache enabled
Add test cases/configs for async DMA uart with DCache on STM32F7/H7 boards

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Abderrahmane Jarmouni fdb3457058 tests: drivers: uart: async_api: support DCache with nocache memory
Add support for running tests with DCache enabled & put DMA buffers
in a nocache memory region to avoid coherency issues.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Najumon B.A 7f16b7fb94 tests: arch: x86 : update stack variable name in nmi test case
update stack variable name in nmi test case for BSP

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-13 16:07:11 -04:00
Fredrik Gihl 2d31d45429 drivers: sensors: Add support for ds18s20
Added support for the older ds18s20 inside the (newer) ds18b20.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-13 16:06:35 -04:00
Corey Wharton bf114c6b1a logging: add API to trigger immediate processing of logs
There are use cases where it's beneficial to trigger the log
thread to process log messages as soon as able instead of waiting
for the processing timer or threshold triggers. An example would be
to flush the log buffer before entering the idle thread after
forcing a system power state.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Corey Wharton 2b9c552050 logging: fix logging.async test
Test has code to test conditions where CONFIG_LOG_PROCESS_THREAD=y
but this option was not enabled in any of the tests. This code was
using removed APIs and did not build anymore. This change enables
the log thread for the logging.async and fixes the tests.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Robert Lubos f63f508c21 tests: net: sockets: tls: Add missing teardown delays
A few tests involving TCP were missing TCP teardown delay. Adding these
improves tests stability when testing in a loop for longer periods (i.
e. with CONFIG_ZTEST_SHUFFLE enabled).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-13 09:52:29 -05:00
Jordan Yates 557418ace6 tests: flash_simulator: reboot: added
Add a test for the flash simulator preserving memory across a
`sys_reboot` through the use of memory regions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jordan Yates 4bdc61132c tests: flash_simulator: move to subfolder
Move the implementation test to a subfolder so an additional test can be
added.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00