Commit graph

14120 commits

Author SHA1 Message Date
Alberto Escolar Piedras
14e4de6415 Revert "net: sockets: move select() implementation to zvfs"
This reverts commit 49ac1912b2.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
1a2d508e68 Revert "posix: device_io: implement pselect()"
This reverts commit 305ec62a6b.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
ade54b35ca Revert "posix: device_io: use mode argument correctly in open()"
This reverts commit 499a633976.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
0642737847 Revert "tests: posix: headers: add checks for posix signals option group"
This reverts commit 308322e9b9.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Mathieu Choplain
38ab4b38db tests: dma/chan_blen_transfer: place TX buf in RAM
This commit removes the const qualifier from TX (source) buffer
of the chan_blen_transfer DMA test to ensure it gets placed in
RAM rather than flash. This ensures the test can pass on hardware
where the DMA controller is unable to access flash.

Fixes #75125.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-03 15:27:26 +02:00
Tahsin Mutlugun
700ebe1b55 tests: drivers: i2c: i2c_target_api: Use address-width property
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Tahsin Mutlugun
223447262c tests: drivers: i2c: i2c_target_api: Support 16-bit word addresses
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Sreeram Tatapudi
d0474cefde tests: bluetooth: shell: Enable flow control
Enabling UART flow control for CYW20829

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Declan Snyder
94815e7955 tests: arm_irq_vector_table: Fix RT/WXXX
Fix preprocessor expression for custom vector table due
to OS timer isr being needed. The parentheses are missing.
Also add RW6xx to the list which has the same isr needed for ostimer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-02 09:19:46 +02:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Krzysztof Chruściński
7a6b355535 tests: boards: nrf: dmm: Adjust test to dmm changes
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
ce157c689d tests: lib: spsc_pbuf: Do not run test with cache
Test was using a configuration which enforces cache management in the
packet buffer. However it shall not be used if producer and consumer
is the same core. Testing this configuration on a single core does
not make sense as it actually fails on cores with data cache.

Making this configuration build_only so it is checked against
compilation errors.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Krzysztof Chruściński
e367231f29 drivers: uart: uart_elementary: Add missing pull-ups to nrf54h20dk
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 09:05:33 -04:00
Bjarki Arge Andreasen
5343ae6817 tests: drivers: rtc: rtc_api: add config for alarm time mask
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.

To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.

Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-28 20:58:22 -04:00
Johann Fischer
a79700623d tests: drivers: udc: add build_only test case
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
ef512305fb tests: drivers: udc: updates to pass testing on supported platforms
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.

Tweak pool size and number of buffers to pass the test with high-speed
drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Henrik Brix Andersen
1c0f241b92 tests: drivers: can: api: restore default bitrates
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.

Fixes: #73723

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-28 20:55:53 -04:00
Daniel Leung
9a08fdc1df tests: logging/dictionary: enable pytest to test output
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
d1c222a7c7 tests: logging: copy dictionary logging sample into tests
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.

Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Jordan Yates
3905e8d6be tests: lib: cmsis_nn: add missing filter dimension
Specify the missing filter dimension that was the reason for the v6.0.0
version bump.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
TOKITA Hiroshi
1bcebbafac tests: subsys: display: cfb: Add CFB tests
Add test cases for testing basic CFB functions.

These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
Emil Gydesen
7b0784c1f6 Bluetooth: ASCS: Validate num_ases in CP requests
Add validation of the number of ASEs in control point
write requests.

This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.

This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.

Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:20:47 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Jordan Yates
cf870e8350 bluetooth: correct bt_le_scan_param scan type
The `type` parameter of `struct bt_le_scan_param` is documented as
taking a `BT_LE_SCAN_TYPE_*` value, not a `BT_HCI_LE_SCAN_*` value.

In practice this makes no difference as the values are defined as the
same integer, but does result in `<zephyr/bluetooth/hci.h>` not needing
to be included.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 11:34:36 +02:00
Chris Friedt
308322e9b9 tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Emil Gydesen
15d66ccc23 Bluetooth: Tester: Fix issue with initializing adv_params
The macro was changed to return a const pointer, but the
BTP use the returned pointer in a non-const way.

Modify the usage so that the macro is used to initialize
the adv_param instead, and then provide a non-const pointer
to tester_gap_create_adv_instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 15:14:48 -04:00
Aleksander Wasaznik
8cd98b139d Bluetooth: test: privacy/legacy: Scan continuously
Some controllers, like the SoftDevice Controller can miss the first few
advertisements after the host tells it to start scanning. The DUT would
assumes the first RPA advertisements report it gets is the first that
was sent, but it was actually not the first. This would skew the
tester's judgement about the timing of RPA rotations.

To remedy this, the tester will scan continuously and switch between
expecting the identity address and the RPA without stopping the scanner.

The tester will tell the DUT to switch to RPA after it has received the
identity address advertisement. This ensures that the tester will not
miss the first RPA advertisement.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-27 10:55:55 -04:00
Chris Friedt
499a633976 posix: device_io: use mode argument correctly in open()
Previously, we had only used the flags field and ignored mode
with the open() function.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
305ec62a6b posix: device_io: implement pselect()
Implement pselect() as it's required by POSIX_DEVICE_IO

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
49ac1912b2 net: sockets: move select() implementation to zvfs
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
93973e2ead net: sockets: move poll implementation to zvfs
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Alex Fabre
648f6dcac4 boards: st: add adc1 peripheral for nucleo_h533re
This nucleo board inherit from the root `h5` dts some special nodes:
- `vbat` on adc1 channel 2
- `vref` on adc1 channel 17
- `die_temp` on adc1 channel 16

The issue is discussed here:
https://github.com/zephyrproject-rtos/zephyr/issues/72914

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-06-27 08:49:49 -04:00
Emil Gydesen
1fc67d22d1 tests: unit: util: Add unit test of utf8_trunc and utf8_lcpy
The two functions did not have unit tests, and at least one
issue with input validation have been indentified and fixed
prior to these.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 08:48:31 -04:00
Patryk Koscik
65a80d5bc2 tests: posix: getopt: hifive1: reduce MIN_REQUIRED_HEAP_SIZE to 1024
This commit reduces `CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE` from
2048 to 1024 for the SiFive HiFive1 board.

Otherwise, the test fails on the following assert from Newlib:
memory space available for newlib heap is less than the minimum required
size specified by CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2024-06-27 08:51:18 +02:00
Oleksii Moisieiev
7c64a8b1a7 drivers: tee: optee: handlde GET_THREAD_COUNT call
Optee driver should handle GET_THREAD_COUNT call. This limitation is
set in Optee-OS during build and limits number of symultanious calls
to optee. Add sym to handle this limitation.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
97ec5548bd tests: drivers: optee: handle exchange capabilities call
Capabilities should be set correctly or optee will show error message:
[00:00:00.000,000] <err> optee: OPTEE does not support dynamic shared
memory

Test suite should set optee UID or the following error message should
be displayed:
[00:00:00.000,000] <err> optee: OPTEE API UID mismatch

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
3301c450e0 tests: drivers: tee: Fix normal_call behaviour in tests
During SMC_RPC_FUNC_ALLOC call optee driver puts new shm object to a4
and a5 variables and then expects this object to be in a1 and a2 from
OP-TEE OS. Fixed behaviour so normal_call callback will act the same
way as OP-TEE OS

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
92408c02d9 tests: drivers: optee: Introduce unit tests for the OP-TEE driver
This should test OP-TEE driver basic functionality without
communication with real OPTEE OS.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Tom Burdick
c6830034d6 tests: Remove vmu_1170 from spi_loopback tests
The board didn't have a proper overlay for the test and failed to build
the test case causing CI failures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
Tom Burdick
058253b4b6 icm42688: Follow st's devicetree bindings
Fix the devicetree bindings to actually be used as the default
configuration, following the example set by various ST sensor devices.

This requires sadly dropping enums and using #defines for various
options as well as repeating many numbers, but presumably is the way to
do it given the precedent set by ST with sensors like the lsm6dso.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
Duy Phuong Hoang. Nguyen
657d7a3662 tests: Exclude EK_RA8M1 from testing CPP98
The Renesas RA HAL isn't compatible with the C++98 standard so
skipping the test ek_ra8m1 on CI

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
The Thanh. Nguyen
f93f801c65 driver: serial: Add serial driver support for Renesas RA8 devices
Add implementation of sci_b_uart for Renesas RA device

Signed-off-by: The Thanh. Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
ee4613a3a6 boards: arm: Add initial support for EKRA8M1
Add support for the EK RA8M1 board
This board is using Renesas RA8M1 MCU.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Jukka Rissanen
4fefde2f09 tests: net: socket: Add tests for tracing
Make sure we at least build test the network socket tracing
support. The tracing tests do not enable networking so do the
socket tracing tests here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-26 15:49:43 +02:00
Bjarki Arge Andreasen
9d76f9ad37 tests: modem: cmux: extend test suite to cover release case
When the CMUX is released from its pipe, it must stop transmitting
data to it, and prevent starting any work which requires
transmitting data like connecting CMUX or opening a DLCI pipe.

This commit extends the CMUX test suite to validate this behavior.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-26 09:27:20 -04:00
Chris Friedt
9ada52f060 fdtable: replace z_ prefix with zvfs_ for fdtable.h functions
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.

ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.

There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.

- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-26 12:33:02 +02:00
Luca Burelli
e42549c632 llext: add a test for llext_find_section
Add a new test case that verifies that llext_find_section() returns the
correct offset for a symbol in a loadable extension. This exploits the
fact that in the STORAGE_WRITABLE cases, the symbol addresses will be
inside the ELF file buffer, so they can be easily compared.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
cec4be3a84 llext: rework test and sample coverage
This patch reworks the testcase.yaml and sample.yaml files for the llext
subsystem to further reduce the number of tests performed by CI while
improving overall coverage.

The following changes are introduced by this commit:

- Remove the arch_allow field from the common section to allow any arch
  to be tested in the build_only test. All other tests explicitly narrow
  down the arches they are applicable to.
- In addition to platforms with active issues, also exclude a number of
  platforms that are always skipped by the runtime filter due to
  RAM/Flash limitations.
- Add integration_platforms to limit the test count to a few selected
  platforms which are representative of the different arches.
- Remove a number of duplicate SLID tests and group them into a single
  test that covers both ARM and Xtensa architectures.
- Test the relocatable case on ARM as well.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
2ba545c5c6 llext: test: align ELF file buffers to 4k
The ELF files should be aligned to at least sizeof(elf_word) to avoid
issues. Use a larger value to ease debugging, since it reduces the
differences in addresses between similar runs.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00