Commit graph

16700 commits

Author SHA1 Message Date
Hake Huang
810aba8d9b tests: disk_performance : mimxrt1060_evkc support
add support for mimxrt1060_evkc board

fixes: #84417

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-02-05 17:50:18 +01:00
Hieu Nguyen
a93a30239b tests: drivers: pwm: Add support for RZ/G3S-SMARC
Enable PWM driver tests for RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Martin Hoff
e783f69ebf test: driver: uart: add silabs slwrb4180a overlay for async usart test
Add overlay for slwrb4180a board to test async silabs usart driver with
dma.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Robin Kastberg
20360ce95b tests: kernel: Don't use VLA in pipe_api test.
In the current pipe_api test file we inadvertantly use VLA.
Toolchains are allowed by standard to allocate VLA on
heap for example. Therefore in my opinion we shouldn't
use VLA atleast in kernel+kernel tests.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-05 14:57:49 +01:00
Bartlomiej Buczek
dc7c396a0b tests: boards: nordic: add nrf comp tests.
Tests use nordic specific comparator api which enable it's
runtime reconfiguration.

As there were no tests prepared when introducing this api,
PR adds some to extend test coverage.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2025-02-05 12:24:59 +01:00
Vinayak Kariappa Chettimada
21cb301447 samples: Bluetooth: GATT write commands with connection PHY Update
Update the Central and Peripheral GATT write command sample
to measure throughput across all supported connection PHYs.

Cover the sample in BabbleSIM CI testing to validate the 2M
PHY throughput after all supported PHYs have been changed
once.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-05 08:16:30 +01:00
Tom Hughes
81f5581a86 tests: kernel: thread_apis: Fix -Wsometimes-uninitialized warning
Building kernel.threads.apis with clang warns:

tests/kernel/threads/thread_apis/src/main.c:362:6: error: variable 'ret'
is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:380:6: note: uninitialized
use occurs here
        if (ret != 0) {
            ^~~
tests/kernel/threads/thread_apis/src/main.c:362:2: note: remove the 'if'
if its condition is always false
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:362:6: error: variable 'ret'
is used uninitialized whenever '||' condition is true
[-Werror,-Wsometimes-uninitialized]
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:380:6: note: uninitialized
use occurs here
        if (ret != 0) {
            ^~~
tests/kernel/threads/thread_apis/src/main.c:362:6: note: remove the '||'
if its condition is always false
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:329:9: note: initialize the
variable 'ret' to silence this warning
        int ret;
               ^
                = 0

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-05 05:40:51 +01:00
Jilay Pandya
8272b36b5b drivers: stepper: tmc50xx: extend tmc5041 to tmc50xx
Extend tmc5041 to tmc50xx in order to accomodate tmc5072

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-02-05 01:14:47 +01:00
Peter Mitsis
11f69fb686 tests: Fix thread_metric message processing
Changes the type of both the tm_message_sent and tm_message_received
arrays from 'unsigned long' to 'unsigned int'. The test expects those
arrays to be 16 bytes long. This was a problem on 64-bit platforms
as 'unsigned long' is 8 bytes, which made the arrays 32 bytes long.
On both our supported 32-bit and 64-bit platforms, 'unsigned int'
works out to be 4 bytes long, thereby giving us the requisite 16
byte buffer.

Although a case could be made for using 'uint32_t', this was not
chosen simply to keep the structure as close as practical to the
original thread_metric implementation.

Fixes #83864

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-02-05 01:12:52 +01:00
Måns Ansgariusson
c01ba39070 tests: rtc_api: Disable update callback after test completion
The update callback remains enabled after the test finishes, leaving the
RTC in a modified state. This change ensures the callback is properly
disabled, restoring the RTC to its original condition.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-02-05 01:12:41 +01:00
Måns Ansgariusson
535814a731 tests: rtc: add epson rx8130ce to rtc build test
Include the Epson RX8130CE RTC driver in the RTC build tests to ensure it
compiles correctly and remains free of build regressions.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-02-05 01:12:41 +01:00
Marvin Ouma
6b3750f73c tests: posix: common: separate xsi realtime passing to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves mqueue into a singular
testsuite at tests/posix/message_passing app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2025-02-04 15:00:24 +01:00
Kalle Kietäväinen
52b8e3d370 tests: kernel: metairq: Ensure meta-IRQ can preempt a cooperative thread
The intention of the test is to have a meta-IRQ preempt a cooperative
thread, then ensure the same cooperative thread is resumed back to instead
of a higher priority thread. Thus, the test needs to assert that the lower
priority cooperative thread is not yet complete when it makes the higher
priority thread ready to run.

This change reveals bugs like #80574, where the meta-IRQ is unable to
preempt a cooperative thread.

Signed-off-by: Kalle Kietäväinen <kalle.kietavainen@silabs.com>
2025-02-04 12:03:20 +01:00
Emil Gydesen
026a2c54ae tests: Bluetooth: Audio: Spring cleanup for audio test files
Add missing and remove unused includes. Fix spelling mistakes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-04 12:03:04 +01:00
Johann Fischer
3bfe163811 usb: device_next: implement blocklist for classes
In the usbd_register_all_classes(), we may need to skip some instances
as they may have very specific function like USB DFU "DFU mode" which
should not be available by default.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-04 11:55:25 +01:00
Robert Lubos
a31e3537b5 tests: net: tls_ext: Fix scheduling race
After recent kernel changes there's some thread scheduling race when
running tests, therefore add k_yield() at the end of the test to make
sure the network stack has a chance to run in between tests.
Make sure CONFIG_NET_TCP_TIME_WAIT_DELAY is set to 0 so that TCP
connections are released immediately.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-04 11:55:17 +01:00
Robert Lubos
32dd87365d tests: net: http_server: core: Fix scheduling race
After recent kernel changes there's some thread scheduling race when
running tests, therefore add k_yield() at the end of each test to make
sure the server thread has a chance to run and do the cleanup.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-04 11:55:17 +01:00
Fabio Baltieri
3a66b3853e drivers,test: use the new DT_FOREACH_PROP_ELEM_SEP
Use the new DT_FOREACH_PROP_ELEM_SEP macro instead of
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(...)).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-02-04 09:18:55 +01:00
Emilio Benavente
1bb6e58976 tests: drivers: Add MCXW72 Overlays
Add MCXW72 Overlay for PWM, ADC, SPI testing

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>

enabled support
2025-02-04 09:17:04 +01:00
Hieu Nguyen
2e76631bae tests: drivers: counter: Add support for RZ/G3S-SMARC
Add test support for Counter driver of RZ/G3S-SMARC

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-02-04 09:16:34 +01:00
Erwan Gouriou
55e310de0b tests: uart_async_api: Disable DCACHE on stm32n6 targets
Until MPU support is enabled, disable DCACHE support for
this series of test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-03 19:56:49 +01:00
Aksel Skauge Mellbye
140e2c229b tests: drivers: adc: Enable ADC tests on Silabs dev kits
Add overlays for xg24_dk2601b and xg27_dk2602a for the accuracy test.
Update the api test to use named macros for readability.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-02-03 19:51:46 +01:00
TOKITA Hiroshi
e3351279de tests: drivers: gpio: gpio_basic_api: Enable test on rpi_pico series
Add an overlay for `rpi_pico` and `rpi_pico2` to run this test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-02-03 19:50:43 +01:00
McAtee Maxwell
99783513be adc: add cyw920829m2evk_02 overlays to relevant adc samples/tests
- Add overlay for samples/.../adc_dt
	- Add overlay for tests/.../adc_api

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2025-02-03 19:50:11 +01:00
Krzysztof Chruściński
fe6a4d0f93 tests: drivers: uart: uart_async_api: Use 4Mbaud for nrf54h20dk uart120
Use high baudrate when testing uart120 on nrf54h20dk/nrf54h20/cpuapp.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-03 11:17:31 +01:00
Krzysztof Chruściński
38c129da39 tests: drivers: uart: uart_async_api: Tweak test_read_abort test
Test was staring a TX transfer and aborting it after 300 us from
the timer handler. Test was assuming that ongoing transfer will
not finish in those 300 us. This might not be true for higher
baudrates. Instead of using fixed timeout, a value is calculated
from the baudrate and targets to abort the transfer after approx.
20 bytes of 95 byte long transfer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-03 11:17:31 +01:00
Christian Galante
2fdfa973ee tests: drivers: build_all: comparator: add silabs_acmp test configurations
Add build test configurations for the silabs_acmp comparator. Enable this
build testing on all series 2 silabs boards that currently support the
comparator driver.

Signed-off-by: Christian Galante <christian.galante@silabs.com>
2025-02-03 11:16:57 +01:00
Christian Galante
270db3c40d tests: drivers: comparator: gpio_loopback: extend to xg24 and xg29 boards
Add board overlays to execute the comparator gpio_loopback testsuite on
xg24_dk2601b and xg29_rb4412a. The testsuite was executed and was seen
to pass on both boards locally with twister.

Signed-off-by: Christian Galante <christian.galante@silabs.com>
2025-02-03 11:16:57 +01:00
Benjamin Cabé
21156f88a6 tests: adc: wio_terminal: enable adc0 node
the adc0 node is now disabled by default in the soc
enable it so that adc test passes for this board

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-01 11:27:37 +01:00
Jukka Rissanen
94361d5964 tests: net: vlan: Support case where VLAN count is 0
Make sure the tests work if VLAN count is set to 0. This means
that only priority tagged (tag 0) VLAN frames can be received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-31 16:12:50 +01:00
Grzegorz Swiderski
0282f57fc8 tests: drivers: adc: adc_api: Add overlay for nucleo_f072rb
It's a copy of `nucleo_f070rb.overlay`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-01-31 16:10:30 +01:00
Chaitanya Tata
ffb2f8764f tests: nrf70: Add enterprise security tests
nRF70 can only choose a single security method due to limiting memory,
so, add individual tests to ensure build.

This is based on tests/net/wifi/configs test.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-31 09:40:00 +01:00
Piotr Krzyzanowski
cb7690a17f tests: pwm: pwm_gpio_loopback: nrf test stability
Improve test stability in 54l15 case
by measuring duty cycle after two periods

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-01-31 09:39:49 +01:00
Raffael Rostagno
931c671cc2 tests: drivers: pwm: Update gpio config
Update gpio config for more correct handling.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-31 09:39:23 +01:00
Terry Geng
49308e45d2 drivers: adc: ads1x4s0x: Add ADS124S0X support into existing drivers
Refactor code for ADS114S08 (12 ch, 16 bit) to accommodate ADS114S06
(6 ch, 16 bit), ADS124S06 (6 ch, 24 bit), and ADS124S08 (12 ch, 24 bit).

Signed-off-by: Terry Geng <terry@terriex.com>
2025-01-31 09:39:07 +01:00
Terry Geng
43079c8086 drivers: adc: ads114s0x: Rename variables, preparing for adding new devices
Renamed ads114s0x/8 to ads1x4s0x.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-01-31 09:39:07 +01:00
Michał Stasiak
cec083edd1 tests: drivers: pwm: add support for nRF54H20 cpuppr PWM
Added support for nRF54H20 cpuppr PWM in pwm_api test.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-31 09:38:25 +01:00
Yasin Ustuner
45f50f858e tests: drivers: build_all: Add build test for ad7124 driver
This commit adds build-only test of ad7124 spi based
adc.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Hake Huang
1b23b91527 tests: drivers: gpio: fix gpio test failure for rt1060_evkc
the gpio for test has a pull up in revc, so need skip pull test

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-01-30 16:22:03 +01:00
Nikodem Kastelik
34b14bbc48 tests: drivers: retained_mem: add support for nRF5340 DK
nRF5340 SoC supports retained_mem driver.
Add test configuration confirming this.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Dominik Ermel
56ef352f17 tests/stream_flash: Prepare for stream_flash_erase_page removal
Keep on testing the function but fix logic where applicable
and remove last_erased_page_start_offset which has been replaced
with erased_up_to in stream_flash_ctx.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-30 14:13:42 +01:00
Luca Burelli
3741a0b744 tests: yaml: add test for generator expressions
Add tests to the YAML suite for generator expressions. The test checks
that generator expressions are handled as expected at different stages:

 - immediately after yaml_save(), the file must contain only non-genex
   entries;
 - at a later time, after the target has been built, the file must
   contain all the expanded genex values.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-30 14:10:53 +01:00
Luca Burelli
e8e8597dbd tests: yaml: test the API in CMake script mode as well
To verify proper functionality, the YAML module test suite is now run
twice: once in the regular CMake project mode and once in the CMake
script mode.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-30 14:10:53 +01:00
Luca Burelli
d5ac588280 tests: yaml: add test for APPEND LIST operation
This test verifies that the APPEND LIST operation in yaml_set() works as
expected.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-30 14:10:53 +01:00
Luca Burelli
5d4e63faa6 tests: yaml: refactor to remove unused variables
This introductory commit removes the ignored 'actual' variable from the
'yaml_set()' calls in the tests to make the code cleaner. Also, a badly
indented block is fixed in the 'message()' macro.

No functional change is introduced by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-30 14:10:53 +01:00
Robert Lubos
571d773d24 tests: net: socket: udp: Verify recvmsg buffer lengths
Make sure that buffer configuration and buffer lengths provided in
struct msghdr are left intact after being processed by recvmsg().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-30 14:09:35 +01:00
Robert Lubos
fcc8d7288f tests: net: socket: tcp: Verify recvmsg buffer lengths
Make sure that buffer configuration and buffer lengths provided in
struct msghdr are left intact after being processed by recvmsg().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-30 14:09:35 +01:00
Michał Stasiak
2a642f1894 tests: drivers: sensor: temp: Add support for nRF54L20 and nRF54L09 PDKs
Add support for nRF54L20 and nRF54L09 PDKs in temp_sensor
twister tests.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-30 14:08:19 +01:00
Théo Battrel
161222050c Tests: Bluetooth: Add 'device_name' GATT test
The goal of this test is to ensure that setting the device name by
writing to the GAP 'Device Name' characteristic work as expected.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-01-30 11:15:03 +01:00
Théo Battrel
e3cf59bfd3 Tests: Bluetooth: Add MTU exchange procedure in testlib
Add `bt_testlib_att_exchange_mtu` function to simplify the procedure.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-01-30 11:15:03 +01:00