Commit graph

16700 commits

Author SHA1 Message Date
Fabrice DJIATSA
5daad8f7c1 tests: drivers: spi_loopback: add latency tolerance for some boards
Set a convenient latency for each platform, since each platform
reacts differently to the driver.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-16 14:03:05 -04:00
Fabrice DJIATSA
c5f5fc1fa8 tests: drivers: spi: spi_loopback: enable nucleo_c071rb to run test again
Due to RAM overflow by 3200 bytes, decrease size of SPI_LARGE_BUFFER.

signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-16 14:03:05 -04:00
Tien Nguyen
8507859371 tests: drivers: gpio: Add support for RZ/V2N-EVK
Add support for RZ/V2N-EVK

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-06-16 14:00:22 -04:00
Piotr Krzyzanowski
c67db3fd36 tests: drivers: spi: spi_loopback: Add NULL spi_buf_set test
Add the test_spi_null_tx_rx_buf_set

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-06-16 08:29:56 +02:00
Chris Friedt
bced298f8b tests: drivers: optee: workaround for ENOMEM
The optee suite was failing in test_suspend() after a call to
k_aligned_alloc() which returns -ENOMEM. The alignment requirement is
4096 bytes, which seems reasonable, but what is odd about that is
that the alignment fails in spite of

CONFIG_SRAM_SIZE=145131134582784
and
CONFIG_HEAP_MEM_POOL_SIZE=270044

So there is plenty of memory available for this test and alignment
considerations should not be an issue.

Removing `CONFIG_DEBUG=y` solved the problem for me.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-14 12:37:26 -04:00
Anas Nashif
e5edf45596 tests: c_lib: thrd: run test on 1 cpu
This test fails sporadically on SMP, so make it run only on one CPU.

Related to zephyrproject-rtos/zephyr#91620

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-14 12:36:48 -04:00
Szymon Janc
34e47f4040 tests: Bluetooth: Fix DFUM and MBTM in PTS ICS
Exporting tools is not yet fixed and those needs to be manually
adjusted.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-06-13 15:42:53 -07:00
Fabrice DJIATSA
8912f070bb tests: drivers: i2c: i2c_api: add a scenario for ci building
add scenario in build-only operation to check for CI failures
when interrupt is disabled for the STM32 i2c driver.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-13 14:29:39 +02:00
Fabrice DJIATSA
ad1c215bc2 tests: drivers: i2c: i2c_api: add board overlays
add arduino_i2c node in overlay files to be enable building the i2c_api
test on multiple stm32 boards,compatible for both i2c V1 and V2
driver.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-13 14:29:39 +02:00
Shrek Wang
46ba523ba8 net: tcp: Align TCP seqence validation with Spec
According to RFC 793, the seqnum test includes 4 cases when STATE >
TCP_SYN_SENT:

      Seg-len Recv-win    Test
      ------- --------    ---------------------------------------
        0       0         SEG.SEQ = RCV.NXT
        0      >0         RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
       >0       0         not acceptable
       >0      >0         RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
                       or RCV.NXT =< SEG.SEQ+SEG.LEN-1 <RCV.NXT+RCV.WND

After the seq validation, the 'send duplicated ACK' code in FIN_WAIT1/
2/CLOSING/TIMEWAIT state processing is duplicated, so remove them.

Added TEST_CLIENT_SEQ_VALIDATION ztest case in tests/net/tcp.

Signed-off-by: Shrek Wang <inet_eman@outlook.com>
2025-06-13 14:28:50 +02:00
Bjarki Arge Andreasen
b41feb9abc drivers: serial: nrfx_uarte: assert clock control enabled
clock control is required for "fast instances" so assert clock
is enabled alongside PM DEVICE RUNTIME. Update UART tests to
reflect this requirenment.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-13 11:12:43 +02:00
Michał Stasiak
f9be8753f5 tests: boards: nrf: i2c_slave: allow more instances
Allow more TWIS instances to be tested.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-06-13 10:10:38 +02:00
Khanh Nguyen
e0c79214e7 tests: boards: renesas: elc: add ztests for Renesas ELC driver
Add a new test suite for the Renesas ELC driver.

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-06-13 10:09:35 +02:00
Marcin Wierzbicki
67edf2292a boards: nxp: add support for S32K148 evaluation board
Support for NXP S32K148 evaluation board (s32k148_evb).

Adapt samples: adc_dt, adc_sequence.
Adapt tests: adc_api, gpio_basic_api, gpio_hogs.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2025-06-12 15:04:32 -07:00
Andrej Butok
1c780fb4dd tests: littlefs: add mimxrt1020/4-evk support
Adds support for mimxrt1020-evk and mimxrt1024-evk boards
to the littlefs test.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-06-12 09:38:33 -07:00
Benjamin Cabé
ec960096ec drivers: tests: rtc: relax y2k test seconds check
When testing y2k rollover, the seconds value can easily be off by one
since there is no guarantee that the RTC will be exactly on the second
boundary.
Relax the check to allow for a one second difference.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-12 13:40:59 +02:00
Benjamin Cabé
850a3b3131 drivers: tests: rtc: harden alarm tests
Ensure the alarm tests exercise rollover scenarios by setting RTC time
to a few seconds before midnight on a December 31st and alarm time to a
few seconds after midnight on the following day.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-12 13:40:59 +02:00
Benjamin Cabé
6acb085160 drivers: tests: rtc: add overlay for adafruit_macropad_rp2040
Allow to run the RTC test suite on Adafruit Macropad RP2040

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-12 13:40:59 +02:00
Szymon Janc
2e32b009b3 tests: Bluetooth: Update ICS to TCRL 2025-2
Changes to features:
 - removed not supported GATT client reliable write support
 - enabled BAP Broadcast Assistant
 - enabled PBP Broadcast Assistant
 - enabled GMAP 1.0.1
 - PAST support enabled where applicable
 - minor consistency check fixes

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-06-12 13:40:49 +02:00
Andrzej Głąbek
d963fc01e6 tests: boards: nrf: Add test for external flash XIP handling
Add nRF specific test to check if it possible for multiple users
to enable XIP independently and also if XIP can be successfully
re-enabled (see fb1d0785ae).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-06-12 11:45:10 +02:00
Fin Maaß
c2fff4a3e4 devicetree: Enhance DT_ENUM_HAS_VALUE macro for arrays
On arrays DT_ENUM_HAS_VALUE() and DT_INST_ENUM_HAS_VALUE()
were only checking the first index, this changes it to check all indexes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-12 11:44:46 +02:00
Fabrice DJIATSA
2e5f703c28 tests: drivers: adc: adc_api: enable nocache memory
The nucleo_f746zg board doesn't handle RX/TX buffers in
non-cacheable memory when required. This leads to an error
in the test_adc_api with the log:
Supplied buffer is not in a non-cacheable region.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-12 10:24:30 +02:00
Jiafei Pan
834576e8e4 tests: gpio_basic_api: add imx943_evk_mimx94398_a55 overly
Add board overlay for i.MX943 EVK Cortex-A Core.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 18:31:10 -07:00
Jiafei Pan
f4b3865a33 tests: gpio: gpio_basic_api: config to input if disconnected not supported
If GPIO_DISCONNECTED is not supported by GPIO driver, then try to configure
the pin to be input, otherwise there will be some unstable signal between
two test pins.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 18:31:10 -07:00
Benjamin Cabé
3c93678b2c tests: lib: min_heap: add test coverage for edge cases
Add missing tests for edge cases (ex. peek on empty heap, push to full
heap, ...) to get to 100% coverage (lines & branches)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 16:24:59 -07:00
Benjamin Cabé
37919afd78 tests: lib: min_heap: use more descriptive assert_ macros
make test cases more readable using more direct assert_ macros, for
example zassert_not_null(foo, ...) instead of
zassert_true(foo != NULL, ...).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 16:24:59 -07:00
Robert Lubos
35b1fa272d tests: net: offloaded_netdev: Add test for offloaded DNS APIs
Add test case verifying that offloaded DNS APIs are called as expected
and that enabling/disabling DNS offloading at runtime works.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-11 16:20:18 -07:00
Robert Lubos
8b7b2b5e9e tests: net: mqtt: client: Add test case for connect with iface binding
Add test case for verifying that MQTT client works fine if bound to an
interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-11 16:18:31 -07:00
Benjamin Cabé
0938eccd6d tests: crc: add tests for crc4 and crc4_ti functions
Implemented unit tests for the crc4 and crc4_ti functions as they were
missed when they were introduced

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 16:18:12 -07:00
Silicon Signals
655d5fd0d3 tests: drivers: build_all: audio: Add MAX98091 to tests
Add the MAX98091 codec to the I2C overlays for testing.

Signed-off-by: Silicon Signals <siliconsignalsforgit@gmail.com>
2025-06-11 16:17:08 -07:00
Benjamin Cabé
976f963d13 tests: unit: add unit tests for hex utilities
Ensure 100% code coverage of lib/utils/hex.c

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 10:25:14 -07:00
Fin Maaß
ed4d421ace drivers: ethernet: remove phy related configs from eth config
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Jamie McCrae
99650914c5 tests: lib: devicetree: Add sub-partition tests
Adds tests for sub-partition macros

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Adam Kondraciuk
bdab748bcf Revert "tests: arm_thread_swap: Add overlay for nRF54H20"
This reverts commit 28bd478a0b.

This commit can be reverted as the cause of test failure
has been removed in ipc service by increasing workqueue stack size.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-11 10:09:02 -07:00
Mike J. Chen
9075d53355 kernel: fix timeout bugs
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.

Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.

Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.

Add some tests for these changes to the timer_api test.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-11 09:56:13 +02:00
Fabian Blatz
c7a61d6418 tests: lib: gui: lvgl: Remove LV_FONT_SIMSUN_16_CJK symbol
In 9.3 due to font licensing issues LV_FONT_SIMSUN_16_CJK was deprecated.
Instead select now LV_FONT_SOURCE_HAN_SANS_SC_16_CJK symbol.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Luca Burelli
204a1cf30d tests: llext-edk: increase test timeout
The llext-edk test case is timing out on some workloads, so increase the
timeout to 120 seconds to accommodate longer execution times.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-11 08:18:20 +02:00
Emil Gydesen
e82cabb809 tests: Bluetooth: Audio: Add common TEST_SAMPLE_SIRK
Add a common definition of the TEST_SAMPLE_SIRK used by
the BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-10 22:13:14 +02:00
Keith Packard
513e6ed5d2 arch/common: Mark interrupt tables const when !DYNAMIC_INTERRUPTS
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.

This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-10 22:13:09 +02:00
Maksim Salau
bdd94261a5 modbus: serial: Add non-compliant mode with custom stop-bit settings
The mode is activated by the CONFIG_MODBUS_NONCOMPLIANT_SERIAL_MODE option
and allows any stop-bit setting for the serial port.

Signed-off-by: Maksim Salau <msalau@iotecha.com>
2025-06-10 12:53:23 -04:00
Emil Gydesen
44d5e8316d tests: Bluetooth: Fix use of BTP PAST event in BSIM
The is_valid_gap_packet_len check for
btp_gap_ev_periodic_transfer_received_ev referenced a field
that was recently removed.

Modify the check to just check the size, as the event now
has not variable length fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-10 12:51:32 -04:00
Bjarki Arge Andreasen
39233656b2 tests: spi: loopback: get spi controller before timed transfer
The test which measures and validates transfer times is using the
helper spi_loopback_transceive() to perform the transfer. This
helper internally gets the spi controller, which is useful for
most tests, but for this one, it means the time to get and put
the spi controller is included in the transfer time measurement.

This commit gets the spi controller before calling
spi_loopback_transceive() which results in only the actual
transfer time being measured.

Before this commit, on the nrf54h20:

  START - test_spi_complete_multiple_timed
  Transfer took 745 us vs theoretical minimum 108 us
  Latency measurement: 637 us
   PASS - test_spi_complete_multiple_timed in 0.008 seconds

  START - test_spi_complete_multiple_timed
  Transfer took 700 us vs theoretical minimum 54 us
  Latency measurement: 646 us

      Assertion failed at ...
  Very high latency
   FAIL - test_spi_complete_multiple_timed in 0.027 seconds

After this commit:

  START - test_spi_complete_multiple_timed
  Transfer took 250 us vs theoretical minimum 108 us
  Latency measurement: 142 us
   PASS - test_spi_complete_multiple_timed in 0.008 seconds

  START - test_spi_complete_multiple_timed
  Transfer took 204 us vs theoretical minimum 54 us
  Latency measurement: 150 us
   PASS - test_spi_complete_multiple_timed in 0.008 seconds

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-10 10:23:20 -04:00
Bjarki Arge Andreasen
5163b8c96a tests: spi: loopback: use CONFIG_ZTEST_STACK_SIZE for thread stacks
The spi_loopback test suite creates three internal threads. The
stack sizes for these threads is hardcoded to 512, which is to little
for some socs, namely the nrf54h20 cpuapp if pm device runtime is
enabled. Instead, determine the stack sizes the same way ztest
stack sizes are determined.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-10 10:23:20 -04:00
Jérôme Pouiller
69202a7908 tests: drivers: memc: Simplify filters
Currently, every boards that implement a memory controller add an entry
in tests/drivers/memc/ram/testcase.yaml. However, the configuration is
exactly the same for all the boards. So, we can just consider that any
board that declare "memc" capability has to be tested.

For the record here are the boards that has the memc capability:

    adi/apard32690/apard32690_max32690_m4.yaml
    adi/eval_adin1110ebz/adi_eval_adin1110ebz.yaml
    adi/max32690evkit/max32690evkit_max32690_m4.yaml
    arduino/giga_r1/arduino_giga_r1_stm32h747xx_m7.yaml
    arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m7_1_0_0.yaml
    arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m7_4_10_0.yaml
    atmel/sam/sam4s_xplained/sam4s_xplained.yaml
    renesas/da1469x_dk_pro/da1469x_dk_pro.yaml
    sifive/hifive_unmatched/hifive_unmatched_s7.yaml
    sifive/hifive_unmatched/hifive_unmatched_u74.yaml
    silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.yaml
    st/stm32f746g_disco/stm32f746g_disco.yaml
    st/stm32f7508_dk/stm32f7508_dk.yaml
    st/stm32f769i_disco/stm32f769i_disco.yaml
    st/stm32h735g_disco/stm32h735g_disco.yaml
    st/stm32h745i_disco/stm32h745i_disco_stm32h745xx_m7.yaml
    st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.yaml
    st/stm32h750b_dk/stm32h750b_dk.yaml
    st/stm32h757i_eval/stm32h757i_eval_stm32h757xx_m7.yaml
    st/stm32h7b3i_dk/stm32h7b3i_dk.yaml
    st/stm32h7s78_dk/stm32h7s78_dk.yaml
    st/stm32n6570_dk/twister.yaml

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-10 13:28:48 +02:00
Szymon Janc
256401ed2b tests: Bluetooth: Tester: Add support for PAST
This adds support for BTP commands and events required for running
PAST tests.

struct btp_gap_ev_periodic_transfer_received_ev is also adjusted
to match BTP specification.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-06-10 13:28:31 +02:00
Mark Wang
263cc93827 tests: Bluetooth: Classic: Add uuid128 service test
add one sdp service that contains uuid128, improve test to save bumble
hci log.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-06-10 12:13:18 +02:00
Szymon Janc
ad37e04d17 test: Bluetooth: Tester: Fix build with EATT disabled
This allows to disable EATT when needed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-06-10 12:13:01 +02:00
Sai Santhosh Malae
6dcf2fdf34 drivers: adc: siwx91x: adc_api test app support
Add siwx917_rb4338a board overlay and congig files

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-10 12:07:33 +02:00
Tom Hughes
6f433a93ab arch: riscv: core: Add support for CONFIG_ISR_TABLES_LOCAL_DECLARATION
Adjust the linker scripts to use the same setup as ARM for
CONFIG_ISR_TABLES_LOCAL_DECLARATION.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-06-10 08:47:51 +02:00
Tahsin Mutlugun
836b6c2ca4 tests: drivers: dma: Add MAX32657 ns board overlay files
Enable 'chan_blen_transfer' and 'loop_transfer' tests for MAX32657EVKIT
nonsecure variant.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-06-10 08:47:42 +02:00