Commit graph

13543 commits

Author SHA1 Message Date
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