Commit graph

15182 commits

Author SHA1 Message Date
alperen sener
b78eea256b Tests: Bluetooth: Tester: Mesh DFUM and BLOB should have own elements
Moving the blob client, dfd server and dfu server to their own
elements and increasing the CONFIG_BT_MESH_TX_SEG_MAX to 8 to fit
new composition data into composition data page status message.

Standalone mesh blob client and DFU distributor/update server models
requires one element and those elements only contain the main models
and the models they extend to.

Referring to MshMBT_v1.0 Section 6.1:
The BLOB Transfer Client model defines the messages listed in Table 6.1
, and requires one element: the BLOB Transfer Client Main element. The
BLOB Transfer Client Main element contains the BLOB Transfer Client
main model.

And referring to MshDFU_v1.0 Sections 6.1.1 and 6.2.1:
6.1.1
The Firmware Update Server model adds the state instances listed in
Table 6.1 and Table 6.2 and the messages listed in Table 6.3 to the
model it extends, and requires one element: the Firmware Update Main
element. The Firmware Update Main element contains the Firmware Update
Server main model and all the models that the main model extends.
6.2.1
The Firmware Distribution Server model adds the state instances listed
in Table 6.7 and Table 6.8 and the messages listed in Table 6.9 to the
model it extends, and requires one element: the Firmware Distribution
Main element. The Firmware Distribution Main element contains the
Firmware Distribution Server main model and all the models that the
main model extends.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-12-04 09:23:44 +01:00
Fabio Baltieri
98ecf25873 tests: threads_ext: move min_flash and min_ram parameters to test level
One of the tests is failing since it was split out in 1a633609a0
triggering an assertion:

ASSERTION FAIL [((((size_t)(16)) << 10) - (((uintptr_t) (&_end)) -
0x20000000)) >= 8192] @
WEST_TOPDIR/zephyr/lib/libc/newlib/libc-hooks.c:139

Fix it by making the min_flash and min_ram parameters up to overall
test level.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-04 02:02:29 +01:00
Jeppe Odgaard
c41570871b drivers: sensor: tmp116: support set sample frequency
Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-12-03 19:57:06 +01:00
Tim Lin
e7b7356dc4 tests: drivers: build_all: Add IT8801 mfd drivers test
Add build tests for the IT8801 MFD drivers, including GPIO,
Input and PWM functionalities.

GPIO, Input test: west build -p always -b native_sim
PWM test: west build -p always -b it82xx2_evb

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-12-03 19:56:50 +01:00
Chaitanya Tata
537b52e7fe tests: drivers: nrf_wifi: Add a build all test
This helps maintaining of various modes in nRF Wi-Fi driver.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-03 15:49:11 +00:00
Georgios Vasilakis
28bd478a0b tests: arm_thread_swap: Add overlay for nRF54H20
Disable the IPC communication between the domains
for the arm_thread_swap test since it is not needed
and it causes a flash oveflow for the no opmitization
test case.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2024-12-03 13:07:03 +01:00
Ioannis Karachalios
221c4d3e4d tests: pwm_loopback: Fix inverted pulse measurement deviation
For the inverted pulse measurements, that should reflect
the duty-cycle off interval, the 1% deviation in test_capture
should be adjusted so it reflects duty-cycle off.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Ioannis Karachalios
b1e863e3e7 tests: pwm_loopback: Capture disable omission issue
As per the PWM API definition, -EBUSY should be returned
when pwm_enable_capture is called and capturing
is already enabled. This commit deals with adding
a ztest_suite_before_t function that should disable
capturing at the end of a single test. Some tests, though,
such as test_pulse_capture, execute two sub-tests
and so, capturing is disabled in between. In fact, the omission
of pwm_disable_capture should not only result in aborting
a single test, but it can also raise system exception
due to invalid context. This is the case for
z_impl_pwm_capture_cycles where z_pwm_capture_cycles_callback
can be fired whilst the routine has already aborted and so
struct z_pwm_capture_cb_data data, defined within function
declaration, should not longer be valid.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Iacopo Moles
bd69ae46bc boards: waveshare: rp2040_zero: Initial support
This PR adds supports for Waveshare RP2040 Zero

Signed-off-by: Iacopo Moles <iacopo@icpmol.es>
2024-12-03 10:17:49 +01:00
Johan Hedberg
8b02141ca7 Bluetooth: Controller: Replace BT_CTLR with HAS_BT_CTLR
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-03 10:16:44 +01:00
Pieter De Gendt
856f4f8b59 drivers: edac: Place API into iterable section
Add wrapper DEVICE_API macro to all edac_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-03 10:16:29 +01:00
Neil Chen
80361b8fe0 tests: dac: frdm_mcxa156: add dac test support
add frdm_mcxa156 defines in source

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-03 08:27:08 +01:00
Marvin Ouma
1a633609a0 tests: posix: common: separate posix threads_ext to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves pthread_attr into a singular
testsuite at tests/posix/threads/ext app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-12-03 04:01:56 +01:00
Akaiwa Wataru
1bb5c34f98 tests: kernel/sched: 32-bit tick wraparound during k_sleep() execution
This test reproduce the issue: https://github.com/zephyrproject-rtos/zephyr/issues/79863

In this test, instead of waiting the 32-bit tick wraparound for several
days, patching the kernel internal tick with the test API.

Signed-off-by: Akaiwa Wataru <akaiwa@sonas.co.jp>
2024-12-03 02:37:03 +01:00
Pieter De Gendt
29c9b91340 drivers: serial: Place API into iterable section
Add wrapper DEVICE_API macro to all uart_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:56 +00:00
Pieter De Gendt
9dd07da0a1 drivers: flash: Place API into iterable section
Add wrapper DEVICE_API macro to all flash_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:48 +00:00
Pieter De Gendt
d0d8158280 tests: drivers: regulator: Test not implemented APIs with dummies
Instead of writing to existing fake APIs, use dummy devices with empty
APIs. This allows us to place APIs in ROM.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:41 +00:00
Pieter De Gendt
0668151a2f drivers: ipm: Place API into iterable section
Add wrapper DEVICE_API macro to all ipm_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:08 +00:00
Manuel Argüelles
4ab9172c92 dts: bindings: rename nxp,imx-lpspi compatible
Rename "nxp,imx-lpspi" compatible to "nxp,lpspi" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:47 +00:00
Manuel Argüelles
dbd20bd039 dts: bindings: rename nxp,kinetis-wdog32 compatible
Rename "nxp,kinetis-wdog32" compatible to "nxp,wdog32" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:39 +00:00
Pieter De Gendt
6d178f9cd9 drivers: gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all gpio_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:59 +00:00
Pieter De Gendt
a553af738d drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00
Pieter De Gendt
d76d7115d5 drivers: ptp_clock: Place API into iterable section
Add wrapper DEVICE_API macro to all ptp_clock_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 23:04:22 +01:00
Arkadiusz Balys
6464ea88fe net: openthread: Allow a platform to select a Settings backend.
Removed implying of NVS by the NET_L2_OPENTHREAD, and from now a
platform can choose between ZMS and NVS as a settings backend.
NET_L2_OPENTHREAD still requires NVS or ZMS backend so the config
depends on one of those.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-12-02 18:18:20 +01:00
Krzysztof Chruściński
51b6f66fce tests: kernel: timer: timer_behavior: Reduce tick frequency(nrf54l20pdk)
Test test_one_tick_timer_train was failing due not being able to
execute enough 1 tick timeouts. Decrease system ticks frequency
to make the test pass.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-02 14:23:22 +01:00
Jordan Yates
3a9e693087 tests: lib: devicetree: api: test DT_ANY_INST_HAS_BOOL_STATUS_OKAY
Add tests for the new `DT_ANY_INST_HAS_BOOL_STATUS_OKAY` macro.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-02 11:13:52 +01:00
Dominik Ermel
3cd862e62d tests/storage/flash_map: Support for no flash_area_open
The commit removes flash_area_open usage from tests, where it is not tested
and only used to obtain area.
The commit adds tests for flash_area_device_is_ready.
The commit adds test for flash_area_sectors, which is equivalent
of flash_area_get_sectors but takes flash area object instead of flash
area index.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-02 09:43:00 +01:00
Piotr Kosycarz
91dfe8f076 tests: drivers: gpio: gpio_basic_api: restore support for nrf54l15 flpr
Missing after PDK->DK.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-12-02 01:33:15 +01:00
Flavio Ceolin
4f33729ee0 tests: mem_protect/stackprot: Use __noinline attribute
Use Zephyr definition for noinline attribute.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-30 01:04:11 +01:00
Flavio Ceolin
f9d17b4233 tests: mem_protect/protection: Use __noinline attribute
Use Zephyr definition for noinline attribute.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-30 01:04:11 +01:00
Pieter De Gendt
122eb71dda tests: drivers: build_all: Add CMake linker test for ADC
Add a test case where CONFIG_CMAKE_LINKER_GENERATOR is enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-29 14:50:40 +01:00
Francois Ramu
1680887051 tests: drivers: clock control stm32 adc device clock setting
Tests the ADC clock domain on the stm32g0 serie
Possible ADC clock sources are SYStem clock (default) or PLL_P.
No clock source HSI for the ADC tested here.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-29 14:50:29 +01:00
Pieter De Gendt
e9e64bab35 drivers: bluetooth: hci: Place API into iterable section
Add wrapper DEVICE_API macro to all bt_hci_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-29 14:49:53 +01:00
Ludvig Jordet
dac8d7c397 Tests: Bluetooth: Mesh: Add Subnet Bridge KRP tests
This adds a test that checks that the Subnet Bridge behaves correctly
when one or more of the involved subnets are undergoing the Key Refresh
Procedure.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2024-11-29 14:49:34 +01:00
Ludvig Jordet
1453f6e4ea Tests: Bluetooth: Mesh: Refactor and cleanup of test_brg
This introduces a global variable controlling the number of remote nodes
used in a given test case. This allows removal of the `TEST_TYPE_...`
enums and further tests in the future that can use different remote node
counts.

This also cleans up the test source by extracting common tester
initialization to separate functions, avoiding repetition.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2024-11-29 14:49:34 +01:00
Robert Lubos
6ac2ab70a2 tests: net: misc: Use different subnets on test interfaces
The test interfaces registered addresses within the same subnet. As now
only the subnet part of the address is verified when choosing source
address or interface, it was not deterministic which interface would be
selected. Therefore, make the two interfaces use two different subnets
so that tests that verified which address/interface was used work
reliably as earlier.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-29 11:44:39 +01:00
Robert Lubos
0ee17d9aa3 tests: net: ip-addr: Add test case verifying default iface is preferred
Add a test case which validates that if two network interfaces are
equally good wrt net mask for LL IPv4 communication, the default
interface is preferred.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-29 11:44:39 +01:00
Robert Lubos
9db7f8d0a0 tests: net: ip-addr: Add test case for an IPv4 LL address selection
Add a test case verifying that a proper source IPv4 address and
interface is selected for a given LL destination address.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-29 11:44:39 +01:00
Ilya Tagunov
065bd32220 tests: secure_storage: psa: enable malloc arena for Mbed TLS
The PSA Crypto implementation provided by Mbed TLS generally requires
some amount of heap to function, so enable the arena unconditionally
to make the test compatible with MINIMAL_LIBC configurations where the
arena is disabled by default.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-29 09:21:13 +01:00
Marvin Ouma
8faa486430 tests: posix: common: separate posix signal tests into a smaller testsuite
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves signal tests into a singular
testsuite at tests/posix/signals app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-29 05:42:17 +01:00
Gerard Marull-Paretas
9465610d9f samples, tests: lora: remove CONFIG_SPI|GPIO=y
This is no longer needed, drivers selects SPI and GPIO as needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-28 20:53:11 +01:00
Jukka Rissanen
16669ec4d5 tests: net: dns: Add test for invalid DNS answer parsing
Make sure we catch invalid answer during parsing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 20:52:20 +01:00
Jukka Rissanen
6f96915a14 tests: net: dns: Add checking of malformed packet
Make sure we test malformed packet parsing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 20:52:20 +01:00
Andy Ross
5364783ba1 soc: boards: Add Mediatek MT8186 and MT8188 audio DSPs
These are very similar devices to mt8195, minimal changes needed
beyond boilerplate configuration.

In the process, this reworks the board/soc layout to be HWMv2
compliant, with "adsp" becoming a CPU cluster beneath the SOC.  So the
name of the boards to west become e.g. "mt8195/mt8195/adsp" (which can
be shortened to "mt8195//adsp" if desired).

Note that the cpuclk driver is not yet ported, it works only with 8195
(the clocking/power architecture seems similar between the parts, but
the graph of wells and clocks is different and historically these have
been three separate drivers in SOF).  The biggest changes are in the
image/loader scripts, which needed some rework for cross-device
portability.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
cdd4cbcc67 soc/mtk_adsp: Remove "msg" API
This is a feature of the 8195 DSP only, which is used only vestigially
by SOF to store data that nothing reads.  The Linux kernel on the
other side uses a shared driver for all 81xx devices, which does not
expose the feature.  It seems to work, but it's not worth maintaining
a driver in tree for legacy hardware that will never use it.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Benedikt Schmidt
760210f39d drivers: fpga: separate drivers of iCE40 for SPI and GPIO bitbang
Separate the current driver for the FPGA iCE40 into two different ones.
One implements only the SPI load mode, the other one only the GPIO
bitbang mode.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-28 15:39:33 +00:00
Valerio Setti
1320b3dd66 tests: bsim: comment out some failing AC tests
This commit comments out some test AC cases that are failing in bsim.
These will be investigated in PR #82199.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Yong Cong Sin
e6dd68ec89 arch: riscv: introduce CONFIG_RISCV_GP_PURPOSE choice
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.

To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.

`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Yong Cong Sin
033804e266 arch: riscv: support CONFIG_USERSPACE in CONFIG_RISCV_CURRENT_VIA_GP
Reset the the `gp` register to `_kernel->cpus[i].current` when
`CONFIG_USERSPACE` is enabled on exception to keep it sane.

Updated the testcase to test both `CONFIG_RISCV_GP` and
`CONFIG_RISCV_CURRENT_VIA_GP`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Ilya Tagunov
8780d912fa tests/storage/stream_flash: add nrf52840dk/nrf52840 to platform_allow
If nrf52840dk/nrf52840 is an integration platform, it should also be an
allowed platform, otherwise the test run breaks down.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 12:07:58 +02:00