Commit graph

13461 commits

Author SHA1 Message Date
Krzysztof Chruściński 33db820400 tests: drivers: uart: async_api: Add nrf54h20 support
Add overlays for nrf54h20dk.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-24 18:04:46 -04:00
Swift Tian 5df8ca2965 tests: sensor: fix compile
Add CONFIG_EMUL=y to prj.conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian cf5a273aa5 tests: subsys: fix emul test compile
Add CONFIG_EMUL=y to the test .conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Sebastian Bøe afbaaf241d samples: wdt_basic_api: nrf: Add missing nrf overlays
Add missing nrf overlays to fix the sample at build time.

Copied from samples/drivers/watchdog/boards.

It is not clear why the build failure was not detected earlier.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe 9ef16f55cd boards: nordic: 54l: use wdt31 instead of wdt30
Use wdt31 instead of wdt30 as wdt30 is hardware fixed to secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Alberto Escolar Piedras ab50b375e5 tests/posix/env: set CONFIG_PICOLIBC=y
Chosing by default in the prj.conf
PICOLIBC ensures we also use an embedded
libC even when built for a native target
and even if we dont set POSIX_API.

This ensures the test will build and pass
properly when built with default configuration
from command line without using the test yaml.

This change does not affect the build result
for other targets as those defaulted already
to PICOLIBC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-24 09:57:31 -05:00
Francois Ramu 362588037e tests: drivers: rtc api testing with timeout
Add a timeout to the tests/drivers/rtc_api testcase so twister
can end properly when running with twister.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-24 09:56:29 -05:00
Babak Arisian b0dceffacc Bluetooth: Audio: add bt_audio_get_chan_count
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.

This PR fixes #69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-05-24 09:55:37 -05:00
Dmitrii Golovanov d38913ba48 tests/kernel/timer/timer_behavior/pytest: aligh grpcio version
Align grpcio version with logic2-automation package fixing its fail
on Channel.unary_unary() call with missing _registered_method argument..

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-24 09:54:05 -05:00
Andrzej Głąbek 418210dbf3 tests: drivers: wdt_basic_api: Allow testing without PAUSE_HALTED_BY_DBG
This is a follow-up to commit e53e5448ee.

In the above commit, the calls to `wdt_setup()` were modified to use
the `WDT_OPT_PAUSE_HALTED_BY_DBG` option to prevent problems with
flashing of boards after this test was executed on them (the still
active watchdog could interrupt such flashing), but this option
is not essential to the test itself. And if a watchdog driver does not
support pausing when the CPU is halted by a debugger (this is the case
for example for wdt_counter), it is not able to pass the test because
of that option. Add then the possibility to continue the test when
pausing by debugger is not supported.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 08:24:56 -04:00
Andrzej Głąbek ccedcd1ac0 tests: drivers: wdt_basic_api: Add missing failure indications
Two API calls that are supposed to set up the watchdog are not actually
causing the test to fail, only error messages are printed. This patch
adds the proper return statements.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 08:24:56 -04:00
Krzysztof Chruściński c026b55fe5 tests: drivers: clock_control: nrf_lf_clock_start: Fix SYNTH test
Test was not covering nrf54l15 which had Synth source bitfield
renamed. Changing the test to use Kconfig to determine if
Synth is present.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-24 07:50:53 -04:00
Aleksander Wasaznik 26f3073b9a Bluetooth: audio: tests: Switch to one-time adv
This patch removes all uses of the adv auto-resume feature in the audio
bsim tests, and instead makes all adv starts explicit.

The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-24 07:48:54 -04:00
Emil Gydesen cc602a6941 tests: Bluetooth: Fix incorrect comments about adv sets
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.

Modified the comment to omit the scannable part
and corrected the connectable part.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-24 07:46:43 -04:00
Szymon Janc d3c0dfbf36 tests: Bluetooth: tester: Fix assert in OTS
MCS OTS support doesn't implement OTS checksum and if this is globally
enabled assert is triggered.

[00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0
ASSERTION FAIL [ots_init->cb->obj_cal_checksum]
     @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476
 Callback for object calculate checksum is not set

This should be reverted when Zephyr issue #72471 is fixed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-05-24 12:57:26 +03:00
Flavio Ceolin e0c955eba3 tests: uoscore: Set necessary PSA options
Set necessary psa options to the test execution.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 11:39:28 +02:00
Valerio Setti ffe79b5522 test: mbedtls: add custom target to check MbedTLS auto-generated files
This commit adds a custom target to tests/crypto/mbedtls in
order to verify that MbedTLS auto-generated files are up to
date.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Yong Cong Sin 2a3d9d0d90 arch: arm64: use symtab to print function name in stack trace
Selecting `CONFIG_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.

Added `arm64` to the `arch.common.stack_unwind.symtab` test.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Yong Cong Sin c1a925de98 arch: riscv: use symtab to print function name in stack trace
Selecting `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.

Updated the `stack_unwind` test to test the symbols in a
stack trace.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Aleksander Wasaznik 765b244c27 Bluetooth: host: tests: Switch to one-time adv
This patch removes all uses of the adv auto-resume feature in the host
bsim tests, except for the test of that feature itself, and instead
makes all adv starts explicit.

The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-23 11:51:07 -04:00
Ioannis Karachalios 5c1e7d94ac tests: drivers: memc/ram: Add support for Smartbond Pro DevKit.
Add configuration and overlay files to support the DA1469x development kit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Karol Lasończyk aef0eb275d tests: temp: Add overlay for nRF54L15 DK
Adds support to activate testing on TEMP.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-23 07:47:58 -04:00
Robert Lubos 48230f21c9 tests: net: socket: getaddrinfo: Increase ztest stack size
The ztest stack was to low to execute tests on some platforms (spotted
on nrf52840dk/nrf52840), hence increase it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-23 07:47:18 -04:00
Piotr Kosycarz f9ee925bb7 tests: drivers: uart: uart_pm fix 'rxbuf' may be used uninitialized
Fix for uart_pm/src/main.c:106:23:
error: 'rxbuf' may be used uninitialized [-Werror=maybe-uninitialized]

string.h:62:10: note: by argument 2 of type 'const void *' to 'memcmp'
   62 | int      memcmp (const void *, const void *, size_t);
      |          ^~~~~~
tests/drivers/uart/uart_pm/src/main.c:69:17: note: 'rxbuf' declared here
   69 |         uint8_t rxbuf[32];
      |                 ^~~~~

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-23 07:46:35 -04:00
Reto Schneider 1bedf6209b tests: net: net_pkt: Fix typo
This fixes what seems to be a copy and paste error.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-23 07:46:17 -04:00
Glenn Andrews 531c457550 Lib: SMF Modify HSM operation for UML-Style transitions
Modify the SMF such that state transitions from parent states choose the
correct Least Common Ancestor based on the transition source rather than
the current state.

SMF set as experimental.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-05-22 21:41:06 -04:00
Flavio Ceolin 3fb4e70306 tests: pm/device_runtime: Test pm_device_runtime_usage
Add tests covering possible branches in pm_device_runtime_usage()

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-22 15:08:39 -05:00
Flavio Ceolin 7ded97ee85 tests: pm/power_mgmt: Increase test coverage
Test device API for when a device does not implement device pm.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-22 15:08:39 -05:00
Emilio Benavente f966353b09 tests: drivers: gpio: gpio_basic_api: Added KE15Z Overlay file.
Added Overlay for testing GPIO on FRDM_KE15Z

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-05-22 15:42:48 -04:00
Alberto Escolar Piedras 02d988e784 tests/posix/env: Remove arch posix filter
This test runs fine in "native" targets
based on the toolchain and C library filtering.
As there is no need to exclude this architecture,
let's remove the exclusion to improve coverage.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:45:47 -05:00
Vinayak Kariappa Chettimada 32bc8f2221 tests: Bluetooth: init: Build time coverage for Controller optimization
Added build time coverage for added new Controller
optimization related Kconfigs.

New Kconfigs are either covered in samples.yaml or in the
tests/bluetooth/init conf files.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Flavio Ceolin 95dde52b1e tests: dynamic_thread_stack: Check thread stack permission
Check if a user thread is capable of free another thread stack.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-21 20:54:56 -04:00
Marcio Ribeiro d2c060d1ef test: dac: esp32s2_devkitc bugfix
add dts and dac setting for tests/driver/dac/dac_api

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-05-21 20:53:58 -04:00
Hake Huang 35e266d2c1 tests: dac: frdm_mcx947 add dac test support
add frdm_mcx947 defines in source

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-21 20:53:58 -04:00
Hake Huang ee91493e64 tests: dac: add rd_rw612_bga support
add dac rd_rw612_bga support

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-21 20:53:58 -04:00
Daniel Leung 8426a05e0e tests: mem_protect/userspace: use kconfig for other stack tests
This uses the newly introduced CONFIG_MEM_DOMAIN_ISOLATED_STACKS
to determine whether to proceed with the tests to access other
threads' stacks. This provides more precise control on when to
run or skip these tests.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Phi Bang Nguyen 9e03d5ada3 tests: drivers: build_all: video: Add test for mipi csi2rx
Add test case for mipi csi2rx driver. As this driver selects the csi
driver, the csi node has to be enabled as well.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Daniel DeGrasse 6347aa74c4 tests: drivers: build_all: add st7735r to test
Add entry for st7735r to display build all test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:50:08 -04:00
Krzysztof Chruściński a5931c716f tests: debug: Add test for MIPI STPv2 decoder
Add test suite.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-21 16:48:28 -04:00
Luis Ubieda 34e1333a43 tests: i2c: i2c_ram: Add nrf52840dk overlay
To make it compatible with this test.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-21 16:48:00 -04:00
Lucas Romero 3f50197a90 lib: bitarray: add method to find nth bit set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero 752d3c529e lib: bitarray: add method to xor two bitarrays
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero c5e5686805 lib: bitarray: add method to count bits set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
cyliang tw 10f0859967 tests: drivers: pwm: pwm_loopback: correct numaker_pfm_m467 pinmux
Fix pinmux of numaker_pfm_m467.overlay to meet pinmux format.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
cyliang tw 07e2e87fde tests: drivers: pwm: pwm_loopback: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for TEST_USERSPACE, so set CONFIG_TEST_USERSPACE=n.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
Emil Gydesen 96c1cfcfb0 tests: Bluetooth: CAP: Add missing CSIP function
The bt_csip_set_coordinator_csis_member_by_conn function
was seemingly missing, causing the CAP unit tests to not build.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-21 18:01:38 +02:00
Robert Lubos ec0e2d6308 tests: net: lib: http_server: Bump min_ram requirements
The values set as a min_ram requirement were far from the actual RAM
usage reported during build, make them more realistic.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-21 11:51:39 +01:00
Yong Cong Sin 10a807537b arch: riscv: Add support for stack unwind without fp
Add a stack unwind implementation that only uses `sp`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 20:52:18 -04:00
Robert Lubos 9c8ed2dca7 tests: net: ipv6: Add more test cases involving iface state changes
Add tests verifying valid IPv6 ND behaviors on interface state changes,
specifically:
* Verify RS is sent, and upon RA reception prefix and autoconf address
  added accordingly.
* DAD is triggered for autoconf, static and LL IPv6 addresses.
* IPv6 address is not used upon DAD conflict.
* IPv6 neighbor discovery works as expected.
* Multicast transmission/reception is functional after interface state
  changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos b9f7ffe79d test: net: ipv6: Cleanup Ethernet test interface operation
One of the test interfaces is defined as Ethernet interface, however it
was missing ethernet_init() call, hence for example interface flags were
uninitialized. This can cause issues with multicast tests, as
NET_L2_MULTICAST flag was missing on the interface.

Additionally, Ethernet-type interfaces should use struct
ethernet_context as a base for their context data, otherwise Ethernet L2
will reach to some rubbish memory locations.

Finally, since the interface now defines correct flags, all-nodes
multicast address is now added to the interface automatically as a part
of ND logic. Therefore, skip adding that address manually from
ipv6_setup().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos f33a183936 tests: net: ipv6: Fix packet leak
Receive callback has to unref the packet received, otherwise we leak
packet.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos 1d7239d00a tests: net: ipv6: Restore original LL address in test_change_ll_addr
Restore the original LL address on the interface after tests, instead of
generating a new one, to avoid dangling link-local IPv6 on the
interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos adc8fd8bbc tests: net: mld: Add more test cases involving iface state changes
Add more test cases verifying that MLD events/reports are sent
accordingly when interface state changes.

Introduce separate semaphores for waiting for network events, as having
a single one for transmit and events is ambiguous in tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos 62a55d03af net: ipv6: Fix RA RDNSS and DNS_RESOLVER interdependencies
A support for RDNSS option should not force DNS subsystem being enabled
in the system, especially that the option is enabled by default. It
should work the other way around - the option is supported only if DNS
was enabled by the user.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen 6924b0d49a tests: net: Exclude native_posix because of socket service
The native_posix board does not work well with eventfd so disable
it with tests that use socket service API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen 3770b07a0e tests: net: socketpair: Fix log printing
The LOG_MODULE_REGISTER() was not called anywhere so if one tried
to enable logging, there was a linker error about missing logger
functions.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen 7bfbc937e6 tests: openthread: Disable native_posix board
Eventfd is not compatible with native_posix so disable testing
for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen d3df57afd4 tests: openthread: Add CONFIG_NET_TEST to make self contained
Add CONFIG_NET_TEST=y to make the test self contained and not
trying to create native_posix Ethernet interface which will
normally fail.
This prevents this error from printing

[00:00:00.000,000] <err> eth_posix: Cannot create zeth (-1)

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen 94433b9ce2 net: mdns_responder: Convert mDNS responder to use socket service API
Instead of using net_context API directly, the mDNS responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen 9a40066b4f net: dns: Convert resolver to use socket service API
Instead of using net_context API directly, the DNS resolver is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Tomáš Juřena 2fe8e9853b tests: drivers: can: timing: enable all bitrates on STM32H745I-Disco
Enable testing of all CiA recommended bitrates on the STM32H745I.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-05-20 14:24:05 +03:00
Emil Gydesen c476456c59 Tests: Bluetooth: Add BSIM test of ISO BIS
Adds 2 tests for ISO broadcast.

First test is just a minimal test that sets up a BIG,
transmits data and verifies that it is being received
on the ISO sync receiver.

The second test creates a BIG, disables BT, enables BT,
and the verifies the above.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen c40856e5aa Bluetooth: ISO: Support bt_disable
Add support for bt_disable in the ISO implementation.
This involves clearing all information related to states
in the controller, such as the BIGs and CIGs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen f58ac3476f Bluetooth: CAP: Add reference to the set member for CAP discover
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:51:26 +03:00
Phi Bang Nguyen 04293dcfac tests: drivers: build_all: video: Add entry for ov5640
Add entry for ov5640 and add mimxrt1170_evk to the test platforms

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-17 14:50:56 -05:00
Ioannis Karachalios d9a49cb761 tests: drivers: rtc: Add support for Smartbond Pro DevKit
This commit should add support for the DA1469x Pro DevKit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:46:11 -05:00
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