Commit graph

13135 commits

Author SHA1 Message Date
Dominik Ermel d3e7adc7da tests/flash/common: Disable soc flash for SPI with nrf52840dk
The commit sets CONFIG_SOC_NRF_FLASH=n for SPI/QSPI Flash tests
as building internal Flash driver is not needed in these
scenarios.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Dominik Ermel 30f6740512 tests/flash/common: Missing CONFIG_FLASH_PAGE_LAYOUT=y
Test depends on this option to get page information from
device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Krzysztof Chruściński 8e65ed94cb tests: drivers: uart: uart_pm: Add support for nrf54h20dk
Add configuration for nrf54h20dk.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński c72b6a75ba tests: drivers: uart: uart_pm: Limit scope for nrf54l15
Some configurations which are not valid for nrf54l15. Mainly those
which are using ENHANCED_POLL_OUT option which is not applicable for
nrf54l15 because it has ENDTX_STOPTX short so PPI connection is not
needed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński 3424c7af7f tests: drivers: uart: uart_pm: Minor adjustments in the test
Modifying arbitrary delay to cover for receivers with timeout.
Adding a delay between polling and asynchronous checking to cover
for cases when CPU processing is fast enough so that both checks
may overlap.
Allow error code for uart_rx_disable call.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński a0bb05eb4c tests: drivers: uart: uart_pm: Call pm action from the thread context
PM action shall be called from the thread context thus switching to
k_work instead of the k_timer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Abderrahmane Jarmouni d834d4f974 tests: drivers: spi_loopback: modify stm32 configs
modify stm32 configs to add f7 series in dma w/ Nocache Mem test cases.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-04-19 16:40:33 +00:00
Franciszek Pindel ff0cc742c1 fs: ext2: Test removing indirect blocks
This commit adds test for the situation when all blocks
referenced from the top-level indirect block are removed.

Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
2024-04-19 10:13:09 +02:00
Sebastian Głąb 5e4bbd5c7c tests: drivers: spi: Add negative test cases
Extend test coverage by adding tests that check invalid use
of the SPI API.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-19 10:11:36 +02:00
Luca Burelli 51195f4884 llext: set integration platform on relocatable test
This particular test was ignored in CI because, when using
platform_key, Twister picks the specific platform very early in
the process and it is possible that the chosen one is later
filtered out. To fix this, use the `integration_platforms` key
instead to specify the platforms where the test is expected to
complete successfully.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-19 10:10:39 +02:00
Luca Burelli 992d14948b llext: remove LOADER_BUILD_ONLY code
The latest commits allow llexts to be built on any architecture, even on
those where llext loading is still unsupported, which is very useful for
testing purposes. This means that the LOADER_BUILD_ONLY logic that was
added for this purpose in 1408d1e5b8 is no longer needed.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-19 10:10:39 +02:00
Manuel Argüelles 5d2670ac1f drivers: pwm: mcux_ftm: allow to select clock source
FTM internal counter can be clocked by one of three clock sources
independent of the module bus clock. This patch introduces a DT property
to perform the clock selection from DT.

DT sources are updated to keep the current clock selection for all boards,
with exception of ucans32k1sic board which is migrated to use system
clock by default, as this seems to be a better choice for most cases.
Some PWM LED samples require slower clock so overlays are added for
those cases.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-04-19 10:08:53 +02:00
Nikodem Kastelik 01ea0f2d7e tests: boards: nrf: add i2c driver test with TWIS slave
Test defines a lopback between i2c driver master and nrfx TWIS slave
to verify their functional correctness.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-19 02:23:16 +01:00
Krzysztof Chruściński 1e6a2a00e2 tests: drivers: spi: spi_loopback_test: Add nrf54h20dk support
Add support for nrf54h20dk for the SPI loopback test.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 08:48:05 -07:00
Nikodem Kastelik 1f9bec7f08 tests: drivers: timer: nrf_grtc_timer: add nRF54H20 target
GRTC peripheral is present on nRF54H20,
so the tests should be executed on this target as well.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-18 08:41:04 -07:00
Alberto Escolar Piedras 5a329202c9 tests/bsim: sysbuild: Set primary MCU idx properly
When using sysbuild,
set the primary MCU index to be the app core
only when we are building the test app in the app core.

Otherwise, if the test app is build in the net core,
the test command line parameters won't be sent by default
to it, and tests will fail.

Luckily, these tests are only built in CI using sysbuild
when we target the 5340bsim app core, and in all but 2,
even if sysbuild was used, this setting was propagated
to the zephyr build if we had separate net and app core
images.
The issue was introduced during the transition to
hwmv2.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 08:05:55 -07:00
Krzysztof Chruściński d0224ab19f tests: drivers: counter: nrf_rtc: Add nrf52_bsim overlay and adapt test
Add overlay for nrf52_bsim to the fixed_top test.
For bsim board RTC register address has to be translated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 08:05:39 -07:00
Krzysztof Chruściński 0cc08cde62 tests: drivers: counter: nrf_rtc: Fail if no devices
Test was passing if there were no RTCs enabled given the false positive.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 08:05:39 -07:00
Krzysztof Chruściński 94ee67e411 tests: drivers: counter: nrf_rtc: Move overlay to boards dir
Move overlay to boards directory.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 08:05:39 -07:00
Emil Gydesen 53fa757cea Bluetooth: Audio: Shell: Add additional controller configs to audio.conf
The configuration file is mostly tested for the nRF53 series
where the controller configuration is usually from the
hci_ipc sample.

This means that the existing audio.conf before this commit
has not really been tested for audio, and were missing a few
configurations to make it work properly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-18 14:55:49 +02:00
Alberto Escolar Piedras cf533cc89b tests input/gpio_keys: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 35c90a5cc1 tests input/gpio_kbd_matrix: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 8ce6a53494 tests kscan/kscan_input: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 2b68f22d55 tests adc/adc_rescale: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 2da2028aaf tests input/kbd_matrix: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 6d8f0f58d5 tests dfu/mcuboot_multi: Add missing overlay for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras f664cffd9d tests input/longpress: Add missing overlays for native_sim_64
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 14cf0c5b71 tests check_init_priorities: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Alberto Escolar Piedras 73c0ca109c tests/subsys log_backend_fs: Add missing overlays for native_sim
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.

This is one of those. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-18 12:20:14 +02:00
Dominik Ermel 3238ab50d3 tests/drivers/flash_simulator: 64bit native_sim/native_posix overlays
Added missing overlays for native_sim/native/64
and native_posix/native/64 platforms.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-18 12:18:41 +02:00
Hake Huang 7f115412b1 tests: driver: vmu_rt1170 remove hwv1 overlay
remove hwv1 overlay to avoid conflicts with hwv2

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-18 11:12:13 +02:00
Hake Huang 246803cb35 tests: adc_api: fix build issue
after HWv2 the board overlay need to be dedicated

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-18 11:12:13 +02:00
Hake Huang 36ab337e3c tests: adc_api: fix build issue with bl654_dvk_nrf52840_pa
need use dedicated board overlay to support HWv2

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-18 11:12:13 +02:00
Hake Huang 23197260a8 tests: driver: adc_api : update test overlay for hwv2
board overlay need align with board hwv2 naming

fixing: #71437

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-18 11:12:13 +02:00
Dominik Ermel db49d0ee26 tests/fs: Add missing native_sim_native_64.overlays
Prevent native_sim/native/64 platforms from failing at build.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-18 11:08:35 +02:00
Bartosz Miller 32dd4ec4e8 drivers: Extend coverage for i2s driver
Add more tests cases in the i2s driver error management area
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-04-17 10:20:13 -07:00
Konrad Derda b26b01bc38 tests: net: mcast_routing: add verification of multiple interfaces
This commit adds a test for veryfing new functionality of storing
mutliple interfaces per single multicast routing entry.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-04-17 14:39:35 +02:00
Eran Gal e58dfac374 drivers: dac: Add TI DACx0501 driver
Adds a DAC driver for Texas Instruments DACx0501 family of devices

Signed-off-by: Eran Gal <erang@google.com>
Co-authored-by: Martin Jäger <17674105+martinjaeger@users.noreply.github.com>
2024-04-17 14:37:21 +02:00
Armin Brauns 2c8ea07b34 tests: add test for loopback disk access
This sets up a backing device, creates a FAT file system, then opens a file
as a loopback device and runs the disk_access tests on that.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-04-15 10:55:29 -07:00
Karthikeyan Krishnasamy 8c8868c51e tests: posix: fs: add test suite for ftruncate
Add test suite support for posix ftruncate

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-15 13:23:37 -04:00
Karthikeyan Krishnasamy feae0a229b tests: posix: fs: add test suite for fsync
Add test suite for posix fsync

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-15 13:23:37 -04:00
Alberto Escolar Piedras becf4c1c81 tests/bsim: Fix not detecting failures
b0339136c1
Broke the check for failed bsim tests.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-15 16:24:12 +02:00
Robert Lubos 9a52efb29e tests: net: tcp: Replace test case numbers with enums
So far test cases in TCP test suite were represented by magic numbers.
With the increasing size of this test suite, it started to become
troublesome to follow, which number represents which test case or what
number can a new test case get.

Introduce a new enum for the test suite, which can be used to represent
individual test case. It simplifies adding new test cases (test case ids
are now defined in a single place, so easier to extend), and also
improves code readability.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-15 12:51:52 +02:00
Robert Lubos b1adbbe0be tests: net: tcp: Add test case verifying FIN with data processing
Verify, that when TCP stack received FIN packet containing data bytes,
the data is provided to the application and respective seq/ack counters
are updated respectively.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-15 12:51:52 +02:00
Gaetan Perrot 0b51d37f35 posix: Implement test for isastream
Add tests for `isastream()`

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-04-13 20:23:34 -04:00
Dominik Ermel 78ddcdd6fa tests/disk_access: Add flash-disk overlay for testing
Adds native_posix overlay and modifies code to allow testing
flash-disk access.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-13 07:04:24 -04:00
Celina Sophie Kalus 325f22a16f tests: posix: eventfd: Add ioctl F_SETFL test
Add a test to protect against future regressions in the ioctl F_SETFL
operation of eventfd. Flags are set and unset and validity of the file
descriptor is checked by reading and writing.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-04-13 06:00:08 -04:00
Seppo Takalo 51d80a9838 net: lwm2m: Allow CoAP block size to be changed
Allow changing the CoAP Block-wise transfers block-size
for subsequent GET requests.

It looks like Leshan switches block size back to its
configured value, if it is smaller.
So even when we send block N=0 with size of 512, Leshan
seem to handle that properly but still asks N=2 with
block size 256(if that is configured).

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-04-12 09:14:36 -04:00
Vinayak Kariappa Chettimada 7ece6aed16 Bluetooth: Controller: Fix regression in BT_RX_STACK_SIZE use
Fix regression in BT_RX_STACK_SIZE use due to
commit b91728619c ("Bluetooth: host: remove
`CONFIG_BT_RECV_BLOCKING`").

Profiling of Controller Rx thread has been mentioned in
commit 586ba9fd13 ("Bluetooth: Controller: Increase
BT_RX_STACK_SIZE for BT_HCI_RAW enabled").

Also, move the TX_STACK_SIZE value as default in Kconfig
from the explicit value being set in hci_ipc sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-04-12 13:48:57 +02:00
Jukka Rissanen d40abe8c0f net: vlan: Fix net_eth_get_vlan_tag() to check correct interface
The network interface parameter for net_eth_get_vlan_tag() should
be the VLAN interface so use the search loop properly.
Earlier the main interface could be checked.

Add also test cases for this so that we can catch that the func
works properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-12 11:54:33 +02:00