Commit graph

16700 commits

Author SHA1 Message Date
Valerio Setti
aa64dd32f1 samples|tests: secure-storage: allow all test rng sources
Add MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG to the list of
test Kconfigs. Typical use case of this:

- the platform has "zephyr,entropy" defined in the devicetree which means
  that CSPRNG_AVAILABLE is set;
- for some reason the board actually does not have any entropy driver
  enabled (ex: ENTROPY_BT_HCI is disabled in nrf5340bsim when BT is _not_
  enabled in the build);
- since TEST_RANDOM_GENERATOR is enabled then also TEST_CSPRNG_GENERATOR
  would be;
- unfortunately the call to psa_generate_random() would fail in
  get_random_data() (in modules/mbedtls/zephyr_entropy.c) because
  MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG is not set and it would
  not reach "subsys/random/random_test_csprng.c".

This commit fixes this problem.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-19 17:53:37 +01:00
Jan Behrens
75463fe950 drivers: stepper: test: Added drv8424 to stepper_api and build_all tests
Adds the drv8424 stepper driver to the build_all/stepper test and the
stepper_api test. The later test is also modified to ensure compatibility.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2024-12-19 15:21:44 +01:00
Jan Behrens
4bd2ab7e1d drivers: stepper: test: Added drv8424 driver tests
Adds 2 test suites for the drv8424 stepper driver, testing API conformity
and return values in the first suite and gpio pin values in the second
suite

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2024-12-19 15:21:44 +01:00
Pieter De Gendt
05b89ffafb tests: modules: nanopb: Test on Big Endian platform
Add a big endian test platform for validating serialization.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-19 15:20:11 +01:00
Sara Touqan
d7034e041c tests: drivers: i2c: Enable i2c2 for nucleo_u083rc board.
This commit enables I2C2 on nucleo_u083rc board
for i2c_target_api test.

Signed-off-by: Mohammad Badawi <zephyr@exalt.ps>
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
2024-12-19 15:19:56 +01:00
Mohammad Badawi
fb5c4c9042 tests: drivers: adc: Enable DMA for nucleo_u083rc board for adc_api
Since DMA is supported by the nucleo_u083rc board, it should be enabled
in the board overlay for the ADC adc_api test, similar to the board
nucleo_h743zi.

Signed-off-by: Mohammad Badawi <zephyr@exalt.ps>
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
2024-12-19 15:19:56 +01:00
Dominik Ermel
44e5f952ac tests/flash: Correct flash size for nrf52840 mx25 hi-perf tests
Correct expected flash size from flash_get_size.

Fixes #82619

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-19 15:19:32 +01:00
Dominik Ermel
9dad01c6dd tests/flash: Improve flash_get_size output on error
Now expected vs read size will be logged in case of error
to make it easier to understand problem or correct test
settings.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-19 15:19:32 +01:00
Jukka Rissanen
a2a0cc8074 tests: net: vlan: Add testing of link layer header embedding
Create a special Ethernet interface that supports link layer
embedding. Add a test that uses this special Ethernet interface
to verify that the L2 header is embedded to the first net_buf.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-19 10:21:28 +01:00
Sebastian Głąb
df20c6d70f tests: drivers: watchdog: Run tests on nRF54L20pdk
Add overlays and align watchdog tests
to be executed on nrf54L20pdk.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-12-19 10:21:11 +01:00
Jukka Rissanen
9fcf424d41 tests: net: igmp: Add re-join multicast group test
Make sure we send IGMP report when re-joining the multicast group
when interface goes up after operative down event.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-19 10:20:56 +01:00
Dominik Ermel
54435e000a storage/flash_map: Add FIXED_PARTITION_BY_NODE macro
Macro allows to instantiate flash_area object pointer from DTS node.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-19 07:07:07 +01:00
Andries Kruithof
b8428df7c6 tests: Bluetooth: CAP: remove compiler warning
There is an unused variable, which may result in a compiler warning.

Since we can not guarantee the value of this variable
we can not test for it, so it is removed.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-19 04:19:01 +01:00
Robin Kastberg
3405648b7d tests: arm: remove GNUC ifdef
It is better to get compile error rather than #error

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-12-19 04:18:48 +01:00
Ryan McClelland
73af324c07 tests: drivers: sensor: add build_all for lsm6dsv16x
Add a build test for the i3c lsm6dsv16x.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-18 22:12:04 +01:00
Sylvio Alves
74d4008cc1 drivers: wifi: make WIFI_BUILD_ONLY_MODE global symbol
Convert vendor specific **_WIFI_BUILD_ONLY_MODE symbol as global
in order to provide common build flag to enable CI with no blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-18 18:17:16 +01:00
Peter Mitsis
35435928c2 kernel: Decouple sleep from suspend
Sleeping and suspended are now orthogonal states. That is, a thread
may be both sleeping and suspended and the two do not interact. One
repercussion of this is that suspending a thread will no longer
abort its timeout.

Threads are now created in the 'sleeping' state instead of a
'suspended' state. This dovetails nicely with the start delay that
can be given to a newly created thread--it is as though the very
first operation that a thread with a start delay is a sleep.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-18 18:17:03 +01:00
Peter Mitsis
5710e034e7 kernel: Introduce _THREAD_SLEEPING state bit
At the present time, Zephyr does has overlap between sleeping and
suspending. Not only should sleeping and suspended be orthogonal
states, but we should ensure users always employ the correct API.
For example, to wake a sleeping thread, k_wakeup() should be used,
and to resume a suspended thread, k_thread_resume() should be used.
However, at the present time k_thread_resume() can be used on a
thread that called k_sleep(K_FOREVER). Sleeping should have nothing
to do with suspension.

This commit introduces the new _THREAD_SLEEPING thread state along
with some prep-work to facilitate the decoupling of the sleeping and
suspended thread states.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-18 18:17:03 +01:00
Karthikeyan Krishnasamy
b0389ce5b5 drivers: adc: add ads131m02 adc driver
ADS131M02 is Texas Instruments 2-channel, 24-Bit differential
input ADC which support wide range datarate.
Driver add support for adc read, channel configure, adc sampling
mode configuration and power management.

[1]. https://www.ti.com/lit/ds/symlink/ads131m02.pdf

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-12-18 18:16:40 +01:00
Robert Lubos
3be01802cf tests: net: lib: http_server: Add tests for PUT/PATCH/DELETE methods
Add additional test cases which verify that the HTTP server code can
handle PUT/PATCH/DELETE request types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-12-18 18:15:02 +01:00
Guillaume Gautier
ccf5e1ede2 tests: drivers: adc: api: add test for nucleo_f103rb with dma
Adds an ADC DMA test for Nucleo F103RB board now that support for it is
added in the ADC driver.
Reading multiple channels in F1 is only possible with the DMA, hence the
necessity to have a dedicated twister test for it.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Raffael Rostagno
30542797d9 tests: drivers: pwm: Revert PWM capture change for pulse check
Reverts a change regarding how the test checks the pulse output
from a capture event. A pulse capture will produce a value that has
the same polarity (and range) as programmed by pwm_capture().
Checking 'pulse_capture' against 'period - pulse' means expecting
the driver to return a capture value that is not inverted as well,
which would cause test cases to fail.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-18 15:32:23 +01:00
Jordan Yates
17925dde0e tests: zbus: channel_id: test channel IDs
Test the new channel identifiers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-18 12:47:24 +01:00
Khoa Nguyen
40744c36d7 tests: drivers: adc: Support RA8, RA6, RA4 to test accuracy and api
Add overlay to support test adc_accuracy_test and adc_api in boards:
EK-RA8D1, MCK-RA8T1, EK-RA6M1, EK-RA6M2, EK-RA6M3, EK-RA6M4, EK-RA6M5,
EK-RA6E2, FPB-RA6E1, FPB-RA6E2, EK-RA4M2, EK-RA4M3, EK-RA4E2, EK-RA4W1

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-18 12:46:31 +01:00
Khoa Nguyen
d54353bce8 tests: drivers: adc: Remove test id for EK-RA8M1
- Remove test id device of ek_ra8m1 in testcase.yaml of
adc_accuracy_test

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-18 12:46:31 +01:00
Sebastian Głąb
eaf9992889 tests: drivers: retained_mem: Run test on nrf54l20pdk
Add overlays to execute retained_mem test on nrf54l20pdk.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-12-18 12:45:42 +01:00
James Roy
4553a21fe5 devicetree: Add DT_FOREACH_ANCESTOR macro
Add 'DT_FOREACH_ANCESTOR' macro to get a list of
ancestor node of a given node_id.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-12-18 10:17:09 +01:00
Benjamin Bigler
f1087d2042 drivers: adc: tla202x: add support for tla2022 and tla2024
This extends the tla2021 driver to support tla2022 and tla2024

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-12-18 08:33:49 +01:00
Nathan Olff
6b03380778 tests: drivers: adc: adc_emul: write test for raw func set
write test for raw value func set function

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Nathan Olff
3f55e21691 tests: drivers: adc: adc_emul: add test for const raw value function
write test for raw const adc emul function

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Stoyan Bogdanov
92aeb787c7 drivers: gpio: max22190: Add MAX22190 octal input with diagnostics
Add max22190 gpio driver with input functionality, since device
support only input without output.

Implemented diagnostic functionality for all 8 channels
which include various check to over/under voltage and wire break.
Filtering configuration is done from devicetree on per channel
bases and is configured on chip start.

In case some fault condition occure FAULT pin drive LOW which
prop to FAULT registers to be read. Data is stored in data structure
for furter analizes and ERR message is printed in console.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-12-18 03:04:46 +01:00
Aurelie Fontaine
e12b23d3de tests: sensor: update sensor compatible icm42670p
Update i2c and spi dtsi test to comply with new compatible icm42670p.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-18 03:04:31 +01:00
Raffael Rostagno
b98bedeeb9 drivers: mcpwm: overlays: Move test config files
Move test config files to 'socs' folder, for cleanup.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 23:14:19 +01:00
Jiafei Pan
968b22802d tests: gpio: basic_api: not use pull up if it is not supported
Don't use pull_up if it is not supported by GPIO controller, so that
can make the test is not broken.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-12-17 23:13:40 +01:00
Matías Román Camilletti
4ca5acac45 dsp: utils: Implemented float/fixed type conversions
The DSP library does not provide functions to convert fixed
representations (Q7,Q15,Q31) to float or double and viceversa. This commit
implements those functions using a shift argument to indicate the number
of decimal places.

Signed-off-by: Matías Román Camilletti <matias.camilletti@owl-services.com>
2024-12-17 20:55:27 +01:00
Guennadi Liakhovetski
527d1020fe llext: add a detached section test
Test LLEXT "detached section" functionality. This adds a test to load
an extension with a function placed in an ad-hoc section and run a
function in it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-17 20:55:15 +01:00
William Tambe
f510314a28 tests: guard variable used only with CONFIG_TRACE_SCHED_IPI
Change to prevent build failure when CONFIG_SCHED_IPI_SUPPORTED is
defined and CONFIG_TRACE_SCHED_IPI is not.

Signed-off-by: William Tambe <williamt@cadence.com>
2024-12-17 20:54:48 +01:00
Emil Gydesen
62f90c62ab tests: Bluetooth: Tester: Refactor audio TX
Instead of relying on the bap_send_cmd and a ring buffer,
the tester will now automatically start transmitting on
streams can that transmit once they enter the streaming state,
and stop again once once they leave the streaming state.

This ensures that we are always sending, which help pass
the PTS tests that require us to send, without having the
autopts client constant telling the tester to send.

This also ensures that we actually send SDUs of the right size
by not relying on a ring buffer, but using a separate thread
that sends data from a predefined array of ISO mock data.

This is easily expandable to multiple streams (including a mix
of unicast and broadcast) using different SDU sizes and easy to
expand to also use one or more software codecs.

The design is based on the TX thread for the BAP Unicast
Client sample and the audio babblesim tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-17 17:53:23 +01:00
Bjarki Arge Andreasen
3c7e49956d tests: drivers: clock_control: nrf: add global hsfll clock
Extend test suite to test global HSFLL clock.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Vinayak Kariappa Chettimada
8e3bf831d4 tests: bsim: Bluetooth: Multiple single central to multilink peripheral
Test covering multiple single link central devices
connecting to single multilink peripheral device.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-17 15:22:18 +01:00
Vinayak Kariappa Chettimada
1aa68de993 tests: bsim: Bluetooth: Single multilink central to multiple peripheral
Test covering single multilink central device connecting to
multiple single link peripheral devices.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-17 15:22:18 +01:00
Vinayak Kariappa Chettimada
6794b5ebf2 tests: bsim: Bluetooth: Enable GATT client in multiple_id test
Enable GATT Client, MTU exchange in the multiple_id bsim
test.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-17 15:22:18 +01:00
Vinayak Kariappa Chettimada
5f06511e91 samples: Bluetooth: Update central multilink and peripheral identity
Update central multilink sample to use continuous scanning
to speed up connection setup.

Update peripheral identity sample to be configurable for
bsim testing as multiple devices with configurable count
of supported connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-17 15:22:18 +01:00
Fabio Baltieri
8a92eec91b tests: secure_storage: fix the platform_allow list
It really wants to be a list list, not a space list.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-17 13:41:16 +01:00
Tomi Fontanilles
7ace449109 tests: secure_storage: psa: its: add a test for the ZMS ITS store module
Add a test scenario for the ITS store module implementation that uses
ZMS for storage.
Reorganize the others at the same time.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Tomi Fontanilles
0ea6f352e7 secure_storage: add a ZMS-based implementation of the ITS store module
It becomes the new default when the secure_storage_its_partition
devicetree chosen property is defined as it is a preferred alternative.

See the help message of the
`CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS` Kconfig option
for more information.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Marvin Ouma
d27e4dc463 tests: posix: common: separate xsi_threads_ext into standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves tests in the xsi_threads_ext
option group into a singular testsuite tests/posix/xsi_threads_ext
app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-12-17 09:48:49 +01:00
Hao Luo
63904f3a19 drivers: rtc: add rtc support for apollo3&3p
Add RTC support for Apollo3 and Apollo3 Plus Soc

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-12-17 05:48:58 +01:00
Sandra Schmidt
ad6ef7de09 test: arm: irq: Add overlay files for cy8ckit_062s2_ai
Changed interrupt priority for GPIO.
See https://github.com/zephyrproject-rtos/zephyr/pull/81464

Signed-off-by: Sandra Schmidt <sandra.schmidt@arrow.com>
2024-12-17 03:39:18 +01:00
Valerio Setti
ff8b970b33 tests: tls_configurations: adjust Kconfig in overlay-ec
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC is promptless so it cannot
be selected. Moreover it's also automatically enabled by
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE in the same overlay file
so there would be no need to explicitly enable it.

As for the IMPORT, EXPORT, DERIVE they are needed for the TLS connection
to work properly. Previously it was working because at least IMPORT and
EXPORT are internally enabled by Mbed TLS at build time. So here we
are basically doing the same enablements with Kconfigs in clear.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-16 22:56:43 +01:00