Commit graph

16700 commits

Author SHA1 Message Date
Rubin Gerritsen
69fb606579 Bluetooth: Host: Define bt_security_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
4e30803e15 Bluetooth: Host: Define bt_gatt_err_to_str()
The function reuses the ATT implementation.
To make the function simpler to use, the function handles both positive
and negative values.

Unfortunately the APIs do not document if the API returns an
errno val or a GATT return value.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
b25985ad6a Bluetooth: Host: Define bt_smp_err_to_str()
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.

BT_SMP_ERR_SUCCESS was added for completeness.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
94d712e5cf Bluetooth: Host: Define bt_att_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
TOKITA Hiroshi
e96cfe0478 tests: arch: arm: arm_irq_vector_table: Do not run if GEN_ISR_TABLES=y
The Renesas RA ICU forcibly enables GEN_ISR_TABLES, and it remains
enabled even if it is disabled in prj.conf.
Adding `not CONFIG_GEN_ISR_TABLES` to the filter condition to skip
this case.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-20 12:57:54 +02:00
Jordan Yates
17d466918f tests: fs: nvs: add mps2/an385 support
Add support for running the test with the simulated `mps2/an385` board.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-19 13:43:45 -04:00
Aleksandr Khromykh
3cf219fb97 Bluetooth: Mesh: align mesh and host psa usage
Commit aligns usage mesh and host PSA.
Since PSA crypto is supported in host then
there is no reason to switch off some of host
features to get rid of tinycrypt functions in
the final image.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-19 13:24:08 -04:00
Francois Ramu
deaa40aeb9 tests: drivers: spi loopback testing on the nucleo_h743/h753 boards
Reduce the spi1 clock freq to pass the testcase on the nucleo
_h753zi or nucleo_h743zi boards
Connect D11 & D12 pins on the board to pass the test

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-19 13:23:06 -04:00
Francois Ramu
5716429c01 tests: subsys: lorawan testing on the nucleo_wl55jc with timeout
Running the tests/subsys/lorawan/clock_sync/ requires a long timeout
to pass. Set a timeout: 500 to cover most of the usecase

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-19 13:22:49 -04:00
Arkadiusz Cholewinski
012520d2d7 Kernel: Integration test
Propose scenarios of integration test for kernel testing.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-06-19 13:41:06 +02:00
Jonathan Rico
d3dbf890bf tests: Bluetooth: make an L2CAP multilink stress test
This test's purpose is to stress the TX data path in the case of multiple
connections.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-19 13:38:49 +02:00
Dawid Niedzwiecki
cda3baf10c tests: drivers: counter: counter_basic_api: run on google_dragonclaw
Add google_dragonclaw board definition and allow running the
drivers.counter.basic_api.stm32_subsec test on the board.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-18 19:59:42 -04:00
Swift Tian
beef60df65 samples: tests: dts: mspi: update ambiq specific MSPI dts
Updated apollo3p_evb overlay files for MSPI peripheral devices.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Manuel Argüelles
989a30807f tests: drivers: counter: nxp s32: test all PIT channels
Make sure that all PIT channels are tested.

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-18 19:55:20 -04:00
Bjarki Arge Andreasen
1fc26b8974 drivers: rtc: api: Add helper for determining calibration
Add helper function which calculates the required calibration to
1 Hertz from the actual frequency of an RTC. This helper is both
functional and adds to the documentation of the RTC calibration
API.

The rtc.h header now includes zephyr/kernel.h instead of
zephyr/types.h as __ASSERT_NO_MSG is now referenced in the header.

The commit additionally extends the rtc_api_helpers test suite
with a test to validate the conversion function itself.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-18 14:35:55 -04:00
Yong Cong Sin
67578faefe lib: cpp: remove deprecated Kconfigs
These Kconfigs should have been deprecated for more than 2
releases, remove them:

- `CONFIG_CPP_MAIN`
- `CONFIG_CPLUSPLUS`
- `CONFIG_LIB_CPLUSPLUS`
- `CONFIG_EXCEPTIONS`
- `CONFIG_RTTI`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
e6295b5279 log: remove CONFIG_LOG_DOMAIN_ID
`CONFIG_LOG_DOMAIN_ID` has been deprecated for years and
shouldn't be used according to its documentation, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
1899e4f667 bluetooth: remove CONFIG_BT_DEBUG_LOG
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
94e12d595e net: lwm2m: remove deprecated functions & definition
These functions have been deprecated for more than 2 releases,
remove them:

- lwm2m_engine_update_observer_min_period
- lwm2m_engine_update_observer_max_period
- lwm2m_engine_create_obj_inst
- lwm2m_engine_delete_obj_inst
- lwm2m_engine_set_opaque
- lwm2m_engine_set_string
- lwm2m_engine_set_u8
- lwm2m_engine_set_u16
- lwm2m_engine_set_u32
- lwm2m_engine_set_u64
- lwm2m_engine_set_s8
- lwm2m_engine_set_s16
- lwm2m_engine_set_s32
- lwm2m_engine_set_s64
- lwm2m_engine_set_bool
- lwm2m_engine_set_float
- lwm2m_engine_set_objlnk
- lwm2m_engine_set_time
- lwm2m_engine_get_opaque
- lwm2m_engine_get_string
- lwm2m_engine_get_u8
- lwm2m_engine_get_u16
- lwm2m_engine_get_u32
- lwm2m_engine_get_u64
- lwm2m_engine_get_s8
- lwm2m_engine_get_s16
- lwm2m_engine_get_s32
- lwm2m_engine_get_s64
- lwm2m_engine_get_bool
- lwm2m_engine_get_float
- lwm2m_engine_get_objlnk
- lwm2m_engine_get_time
- lwm2m_engine_register_read_callback
- lwm2m_engine_register_pre_write_callback
- lwm2m_engine_register_validate_callback
- lwm2m_engine_register_post_write_callback
- lwm2m_engine_register_exec_callback
- lwm2m_engine_register_create_callback
- lwm2m_engine_register_delete_callback
- lwm2m_engine_set_res_buf
- lwm2m_engine_set_res_data
- lwm2m_engine_set_res_data_len
- lwm2m_engine_get_res_buf
- lwm2m_engine_get_res_data
- lwm2m_engine_create_res_inst
- lwm2m_engine_delete_res_inst
- lwm2m_engine_path_is_observed
- lwm2m_engine_send
- lwm2m_send
- lwm2m_engine_enable_cache

And additionally, the following definition:
- LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Jakub Topic
3de17474b0 tests: drivers: rtc: skip alarm callback test if not supported
Check for ENOTSUP on alarm callback test if ALARM functionality is
enabled but callbacks are not supported

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-17 12:09:15 -04:00
Robert Lubos
2fc0c128c9 tests: net: conn_mgr_monitor: Remove debug logs
Printing event name during event processing caused unexpected delays on
slower platforms, making the tests fail. As according to the tests
author those prints were unintentional leftovers, just remove them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-17 12:08:51 -04:00
Chris Friedt
12cc7bbd8a net: sockets: use z_finalize_typed_fd() to identify as sockets
Fill-in the mode field of the fd_entry so that the
implementation can be made aware that the specific file
descriptors created are sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-15 07:47:12 -04:00
Nazar Palamar
36fb0279d2 test: bluetooth/tester: fix ccc_find_by_attr
Added check if ccc_values[i].attr != NULL,
before accessing to ccc_values[i].attr structure:
(handle == ccc_values[i].attr->handle)

On 20829 platform it's causing hard fault, not sure about
another platforms (in GAP testing).

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Nazar Palamar
492439af79 test: bluetooth/tester: add overlays for cyw920829m2evk_02 board
- added overlays for cyw920829m2evk_02 board

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Trent Piepho
d7e03dd148 drivers/sensor: si7006: Support SHT21 and HTU21D
These three sensor types are all largely compatible.  The SHT21 and
HTU21D can be supported by this driver by sending command 0xE3 instead
of 0xE0 to read the temperature.

Mention the sensor names in bindings and Kconfig to help those looking
for support to find it.  There have been at least five PRs attempting to
add SHT21 and/or HTU21D support that did not realize the Si7006 is the
same.

As mentioned in PR #22862, the Sensirion SH21 is the original.  The dts
bindings are adjusted (in a backward compatible way!) to make the sht21
the base binding and si7006 is derived from that.

Examples of dts compatibles:

TE Connectivity née Measurement Sepcialties HTU21D:
compatible = "meas,htu21d", "sensirion,sht21";

Sensirion SHT21:
compatible = "sensirion,sht21";

Silicon Labs Si7006
compatible = "silabs,si7006";

Silicon Labs Si7021
compatible = "silabs,si7021", "silabs,si7006";

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Swift Tian
2b103137ab tests: mspi: Add apollo3p_evb board to flash test
The apollo3p_evb board has a ATXP032 NOR flash and driver is tested
in mspi/flash test.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
4d83bc2c8c tests: mspi: Add apollo3p_evb board to api test
Add the apollo3p_evb board to test the MSPI controller implementation.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
292a4ebf21 tests: mspi: Add a mspi flash test
The mspi flash test is intended to test mspi flash device driver
implementation on MSPI bus. The test requires the device to have at
least two sectors of memory with MSPI_FLASH_SECTOR_SIZE as size.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
42d24e5716 tests: mspi: Add mspi api test
Add a MSPI controller API test and run on native_sim board.
The API implementation within mspi_emul.c is the test target.
The stub device emulator is added for convenience to test controllers.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Sadik Ozer
6bb6bfb458 tests: drivers: gpio: Enable gpio driver tests for max32670evkit board
Enable gpio driver test for max32670evkit

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-14 21:06:16 -04:00
Nicolas Pitre
51a5986b04 tests: demand_paging: extend memory access patterns
Add the ability to touch memory in the opposite direction from one loop
to the next so to exercize the LRU eviction algorithm.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 18:58:02 -04:00
Raffael Rostagno
3b732a1ade tests: rtc_clk: Added support to ESP32C6
Added support for C6 for CPU and LP clock testing

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
ec10f1b97f boards: esp32c6: Added PWM test file for esp32c6_devkitc
Added basic PWM test for esp32c6_devkitc

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
1173273f32 boards: esp32c6_devkitc: Added support for GP-SPI2
Added support for general purpose SPI2 (GP-SPI2)

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Daniel DeGrasse
65b10a14e0 tests: settings: functional: file: add native_sim/native/64 overlay
In 0be0d2175b (cmake: modules: extensions: Revert using common
board files), the overlay for `native_sim/native/64` in the settings
functional file test was not recreated. Duplicate the overlay used for
the `native_sim` target to support this test correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 18:51:01 -04:00
Benjamin Lemouzy
5c8937fbac drivers: sensor: lm75: add alert threshold support
Add SENSOR_ATTR_ALERT and SENSOR_ATTR_HYSTERESIS attributes support.
The code is heavily inspired by the one for lm77 sensor.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-06-14 18:48:32 -04:00
David Ullmann
ba75fe482a tests: add build test for reyax lora driver
adding test to build the reyax lora driver

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
Daniel DeGrasse
1893928d94 tests: drivers: build_all: display: clean up reg addresses
Clean up register addresses for devices defined as children of the dummy
SPI bus, so that they start from zero. This ensures all SPI chip select
gpio indices will be used

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 17:11:20 -04:00
Daniel DeGrasse
be23e70fff drivers: display: gc9x01: convert to MIPI DBI API
Convert galaxycore GC9X01 to MIPI DBI API. In tree boards and tests
using this display have also had their devicetrees updated to use the
new MIPI DBI SPI emulated device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 17:11:20 -04:00
Tomi Fontanilles
f2c643ba02 storage: flash_map: replace TinyCrypt by PSA
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.

The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.

As of now the implementation defaults to PSA only if TF-M is enabled
because a dependency loop happens if using `PSA_CRYPTO_CLIENT` as a
condition in `FLASH_AREA_CHECK_INTEGRITY_BACKEND`.

A test case is added for the PSA implementation, and an NS platform is
added to the base test case to verify the compilation on a TF-M-enabled
platform.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-06-14 14:02:08 -04:00
Chris Friedt
f4cb161393 tests: posix: add tests for shared memory objects
Add tests for shared memory objects.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
156eaab70e posix: move ioctl() from fdtable to posix
The ioctl() call should be a part of the _XOPEN_STREAMS
Option in posix, so move it there.

Create a zephyr-native zvfs_ioctl() in the layer below.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Robert Hancock
2d171efcec drivers: sensors: Add driver for LM95234 temperature sensor
Add a driver for the National/TI LM95234 Quad Remote Diode and Local
Temperature Sensor with SMBus Interface and TruTherm Technology.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-06-14 19:34:01 +02:00
Daniel DeGrasse
7714f8f87b tests: drivers: display: build_all: add uc81xx
Add uc81xx to display build test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 19:32:39 +02:00
Rubin Gerritsen
8799ab1ec2 test: Apply semantic patch file ztest_strcmp.cocci
This patch file updates the use of assertion macros
comparing strings.

Command line used:
```
./scripts/coccicheck --mode=patch \
--cocci=scripts/coccinelle/ztest_strcmp.cocci tests/
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:25:42 +02:00
Luca Burelli
6db484455d llext: remove the "modules_enabled" tests
These tests are simple copies of the existing tests with the addition of
the CONFIG_MODULES=y option. This different Kconfig setting has no
practical effect on the code, and the tests are therefore redundant.

Remove them to halve the number of tests.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 19:24:51 +02:00
Rubin Gerritsen
bfba19dc41 Bluetooth: Host: Add the API bt_hci_err_to_str()
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:17:48 +02:00
Johann Fischer
4191602f11 usb: device_next: add helper to register all available class instances
Add helper to register/unregister all available class instances.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Dmitrii Golovanov
01dcb942c6 tests: kernel: timer_behavior_external: Fix a typo
Rename `do_analysys()` to `do_analysis()`.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
d72dd3562e tests: kernel: timer: Fix log capture on external tool testing
Fix incomplete test log capture when the external tool is used
and Twister Pytest Harness script ends without reading output
from the last test case running on the device.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00