Commit Graph

16855 Commits

Author SHA1 Message Date
Gerson Fernando Budke
b478cd8f37 linker_script: Remove some remaining SUBALIGN in iterable sections
The #91219 miss some entries when doing the clean-up. This removes
some of remaining SUBALIGN entries in the iterable sections. It do
not consider SECTION_PROLOGUE and zephyr_linker_section entries.

Fixes #92349

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-07-07 10:07:56 -05:00
Gaetan Perrot
369d5b170c tests: net: socket: getaddrinfo: Remove unused assignment
In check_dns_query(), the assignment `ret = -ENOMEM` was never used since
the function returns false immediately afterward.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-07 10:05:51 -05:00
Mathieu Choplain
697d0f845d tests: arch: common: ramfunc: fix the project's name in CMake
The name used in CMakeLists for this test is "zero_latency_irqs" despite
testing the ramfunc feature instead. This might be a copy-paste mistake
as it was originally "arm_zero_latency_irqs", which is another test that
exists.

Change the project name in CMakeLists to match what the test truly is.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-07 10:04:45 -05:00
Yong Cong Sin
ba3573f87f tests: drivers: syscon: remove dev pointer check
`DEVICE_DT_GET()` guarantees that the `dev` pointer can never
be `NULL`, the check is therefore redundant, remove it.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Grzegorz Chwierut
095d3186e6 tests: fix: limit platforms in boot.with_mcumgr.test_upgrade_ble
Missed in #91596 that more platforms are added in common part.
Excluded nrf9160dk/nrf9160 and nucleo_wba55cg from
configuration with BLE.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-07-04 16:41:01 -10:00
Tim Pambor
ee1468b675 tests: net: socket: Fix function signature
Update the process_dns function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-04 14:21:23 -10:00
Tim Pambor
f682a173d8 net: socket: mgmt: Fix function signature
Update the trigger_events function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-04 14:21:23 -10:00
Jan Tore Guggedal
a7ce6055b7 zbus: Fix NULL pointer use in zbus_chan_rm_obs()
Fix a bug in zbus_chan_rm_obs() where removing the first observer in a
channel's observer list would cause undefined behavior due to accessing
a member of a NULL pointer.

The issue occurred when prev_obs_nd was NULL (indicating the first node
in the list) and the code attempted to pass &prev_obs_nd->node to
sys_slist_remove(). This resulted in accessing the 'node' member of a
NULL pointer, which is undefined behavior even when taking its address.

The sys_slist_remove() function is designed to handle a NULL prev_node
parameter correctly for removing the first element in a list. The fix
ensures we pass NULL directly instead of attempting to compute the
address of a member within a NULL pointer.

This was detected by Undefined Behavior Sanitizer as "member access
within null pointer".

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2025-07-04 15:49:32 -05:00
Robert Lubos
aa4a8789d5 net: sockets: socket_dispatcher: Fix close function type
Socket dispatcher (and offloaded implementations in tests) register
fd as ZVFS_MODE_IFSOCK therefore they should register a  close2(
function instead of close().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
30c8702b05 tests: net: iface: Fix interface context misuse
The iface test suite uses two different interface types with two
different context types and iid tests mixed up the two. It attempted
to create a mac address for Ethernet interface (which uses
struct eth_fake_context), however the net_iface_get_mac() function
only works with Dummy interface context (struct net_if_test). In
result the Ethernet interface context was corrupted (mac address
overwritten the promisc_mode flag).

Fix this by extracting mac generation code into a common function, and
use it in the Ethernet iface initialization phase instead of directly in
the test.

This was reported by UBSAN:
  tests/net/iface/src/main.c:239:34: runtime error: load of value 11,
  which is not a valid value for type '_Bool'

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
2d49ef26ad tests: net: socket: udp: Don't call memset() on a NULL pointer
cmsgbuf pointer can be NULL, therefore verify that before calling
memset() on it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Shrek Wang
6a27fd2255 net: tcp: Add TCP ACK validation
According to RFC 793, ch 3.9 Event Processing,
after the connection is sync-ed with seqnum of both sides then,
        1. drop any received segment if the ACK bit is off.
        2. validate the acknum like this:
        SND.UNA =< SEG.ACK =< SND.NXT

The ACK validation is done before entering the state-machine, so
remove the flags <ACK> check in the state-machine processing.

Signed-off-by: Shrek Wang <inet_eman@outlook.com>
2025-07-04 13:08:57 -05:00
Alberto Escolar Piedras
f8cf1659bf tests/drivers display_read_write: Enable for native_sim//64
These tests can be run equally on native_sim//64.
Let's also allow them in it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-04 13:06:47 -05:00
Alberto Escolar Piedras
f8c2f37e03 tests/drivers display_read_write: Move common kconfig option to overlay
For native_sim[//64], these tests need to be built with
CONFIG_SDL_DISPLAY_USE_HARDWARE_ACCELERATOR=n

Until now we defined this option in the yaml file for each test
targetting the sdl display driver.
But if somebody builds the test directly, it will fail as these yaml
kconfig defined options would not be used.

Let's instead define it in a board overlay, so in that case the test
will also work.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-04 13:06:47 -05:00
Hake Huang
fe811defb2 tests: vector_table_relocation: fix a mis-use of SRAM_SIZE
SRAM_SIZE is given in kilobytes

fixes: #92533

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-07-04 13:06:13 -05:00
Mike J. Chen
93997dab8e tests: bsim: add early disconnect tests for iso and l2cap
Add early_disconnect test cases for iso/cis and l2cap/stress
to test the bluetooth stack handling of disconnects
while transmit is still in progress.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-03 11:59:02 -05:00
Tom Hughes
d732a51d56 tests: kernel: gen_isr_table: Don't use IRQ1 if already used
IRQ 1 is used by the LiteX timer, so we can't use it for the test:

gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)

Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0

Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-02 17:58:08 -05:00
Grzegorz Swiderski
d9c5545804 tests: kernel: interrupt: Fix for nRF54H20 FLPR
Use designated IRQ numbers, instead of generic defaults.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Tim Pambor
659382f1e9 tests: net: dns-sd: Use standard struct in_addr for IPs
Refactored the code to use the standard struct in_addr for
representing IPv4 addresses instead of a uint32_t combined
with the custom IP_ADDR macro.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-02 03:55:06 -10:00
Abderrahmane JARMOUNI
dd594d54f5 tests: kernel: device: expand device api coverage
Enhance device z_device_get_all_static API test

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Abderrahmane JARMOUNI
ddbc7efed6 tests: kernel: device: expand device api coverage
Add test coverage for device device_get_by_dt_nodelabel() API

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Abderrahmane JARMOUNI
1f4e78eb33 tests: kernel: device: add dev deinit api coverage
Add test coverage for device de-initialization API

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Sylvio Alves
ae3fb6e091 tests: boot: add Espressif boards to MCUboot test case
Include all supported Espressif SoC variants in the MCUboot
test suite to ensure proper CI coverage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-01 11:12:25 -10:00
Declan Snyder
0574ac7e84 tests: spi_loopback: skip hold_on_cs test if not supported
This early exit section is only reached if there is an error.
In the case of not supported, the ret variable will be 0 and zassert
won't happen. This is because the test was meant to be skipped, not
passed or failed, in this case. So add the skip call.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-01 11:00:43 -10:00
Emil Gydesen
e72e837971 tests: Bluetooth: Tester: VCP BSIM test
Adds BSIM testing of the VCP features of the BT Tester.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 10:54:09 -10:00
Cong Nguyen Huu
a53582dab8 tests/samples: drivers: create test, sample for psi5 driver
Create test, sample for psi5 driver

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Emil Gydesen
2298ec49c7 tests: Bluetooth: Audio: Add common start_broadcast_adv
Add a common function, start_broadcast_adv, to start
broadcast advertisement in the LE Audio BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 05:57:48 -10:00
Łukasz Stępnicki
d7fd99ecc6 tests: kernel: interrupt: generic ISR offset definition for nrf54h20 VPRs
All VPRs in nrf54h20 can have same ISR offset configuration.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-07-01 05:55:36 -10:00
Alberto Escolar Piedras
35a10937d7 tests/net: dhcpv6: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Adam Kondraciuk
017dca302c tests: drivers: timer: nrf_grtc_timer: Align tests with uptime changes
Update GRTC tests to reflect uptime reset at startup.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-30 15:23:44 -05:00
Shrek Wang
6527a1b23c net: tcp: Set the right th_win value in tester_prepare_tcp_pkt
The 16bit th_win in the TCP header was not set via htons(). It
will bring issues of wrong th_win value in the peer end. For
example, the 1280 (0x0500) TCP window size would be taken as
5 (0x0005) by the peer end.

Signed-off-by: Shrek Wang <inet_eman@outlook.com>
2025-06-30 15:16:02 -05:00
Karol Lasończyk
061036f9e3 tests: samples: Extend support for nRF54LM20A
Extends support and adds new overlays.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 18:26:57 -05:00
David Schneider
f3f851306d boards: waveshare: rp2040_plus: Initial support
Add support for Waveshare RP2040 Plus board a Raspberry Pi Pico like
board including a battery charger.

Signed-off-by: David Schneider <schneidav81@gmail.com>
2025-06-27 18:24:55 -05:00
Raymond Lei
dd90248a3a test: spi_loopback: nxp: Add Flexio spi test support
Add overlay file for RT1170 EVK and simply existing flexio spi overlay
file for RT1060 EVKC and RT1064 EVK. One flexio-spi interface for both slow
and fast tests. Fast baud rate set to 16Mbps now.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-27 09:05:47 -10:00
Jukka Rissanen
24843ae223 tests: net: ppp: Compile test with PPP statistics
Make sure the compilation is ok if PPP statistics is enabled.

This is related to commit 3e704256e3
("net: ppp: stats: Fix net_mgmt request handler format") which
was needed because earlier commit 5a9a39caf3
("net: mgmt: Convert the mgmt API to use 64-bit masks")
missed an compile problem because there was no compile test that
enabled CONFIG_NET_STATISTICS_PPP option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-27 09:05:22 -10:00
Johann Fischer
a1681112bd tests: usb: device_next: rework test configuration
Do not use qemu_cortex_m3 for the "build all" case, as it overflows and
provides no benefit over native_sim. Add native_sim/native/64 platform
to the tests.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
cc92d1c119 tests: usb: device_next: add test for string descriptors
Add test for the string descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
0598392a7d tests: usb: device_next: add test for incomplete control transfers
Add a test for incomplete control transfers with missing data and status
stages.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Henrik Brix Andersen
5ca8be264d tests: kconfig: functions: add tests for dt_compat_enabled_num
Add tests for the dt_compat_enabled_num Kconfig helper function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-27 10:07:01 -05:00
Benjamin Cabé
5e0ab3dad0 tests: net: lib: dns: dns_cache: test dns_cache_remove
Add tests for dns_cache_remove() API

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-27 10:05:40 -05:00
Mert Ekren
e7dd1e507a tests: drivers: spi: Add MAX32657 overlay files
Enable 'spi_loopback' test for MAX32657 boards.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2025-06-27 10:01:27 -05:00
Benjamin Cabé
3b0e134204 tests: net: npf: test NPF_ORIG_IFACE_[UN]MATCH rules
Add a test for the NPF_ORIG_IFACE_MATCH and NPF_ORIG_IFACE_UNMATCH
rules.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-27 14:14:49 +02:00
Tomasz Bursztyka
c341f5389d tests: misc: Fixing expected output on check_init_priorities test
check_init_priorities.py does no longer output any information about any
initialization function pointer as such pointer has been removed from
struct init_entry.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Fabrice DJIATSA
faf1b10d5c tests: drivers: adc: adc_api: increase adc prescaler
increase value of the adc-prescaler to avoid ADC
overrun.

adc driver related error log:
"E: ADC overrun error occurred ..."

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-27 12:22:40 +02:00
Grzegorz Chwierut
1f92890283 tests: upgrade: Upgrade with mcumgr using BLE transport
Extend tests/boot/with_mcumgr with BLE configuration.
Updated sample to use the source code from smp_svr.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-06-27 12:21:56 +02:00
Bjarki Arge Andreasen
160c196435 tests: drivers: spi: loopback: extend nrf overlays with miso/mosi
Add miso-gpios and mosi-gpios to nrf overlays required for
device_deinit testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Bjarki Arge Andreasen
ecb5457898 tests: drivers: spi: loopback: test device_deinit
Introduce test for device_deinit() which deinitializes the spi
bus, then configures miso as input, mosi as output using gpio,
utilizing the loopback to test directly controlling the pins.
Then reinit the spi device.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Julien Panis
a631df5cd8 tests: drivers: spi: spi_loopback: Add testcase for cc23x0
Enable DMA for the test.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-06-27 10:56:54 +02:00
Cong Nguyen Huu
1a3f46ce6e tests/samples: drivers: create test, sample for SENT driver
Create test, sample for SENT driver

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-06-26 18:50:07 -10:00
Bjarki Arge Andreasen
e0fa444b8d tests: drivers: i2c: target_api: extend nrf overlays with bus gpios
Add bus gpios to zephyr,user node in nrf overlays to enable testing
device_deinit test case.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-26 22:15:52 -05:00