Commit graph

16700 commits

Author SHA1 Message Date
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
Piotr Kosycarz
5ae4f11c93 tests: drivers: enable more tests for nrf54l10 and nrf54l05
counter_basic_api, i2s_api, i2s_speed, uart_async_api

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-28 09:42:58 +01:00
Dominik Ermel
71fe68cab8 tests/stream_flash: Remove CONFIG_MPU_ALLOW_FLASH_WRITE=y
The commit removes storage.stream_flash.mpu_allow_flash_write as it was
pointless, and moves nrf52840, as integration platform, to
storage.stream_flash.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-28 09:39:17 +01:00
Marvin Ouma
69e8152fc1 tests: posix: common: separate posix spinlock tests into standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves spinlock into a singular
testsuite at tests/posix/spinlocks app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-27 22:52:56 -05:00
Valerio Setti
ba34d602fa tests: bt_crypto: fix kconfig for qemu_cortex_m3
Increase test and main stack sizes for the qemu_cortex_m3 platform
in order to be able to successfully run the test.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
18119e8f6e test: bsim: bt: fix test scripts
This commit fixes
tests/bsim/bluetooth/ll/multiple_id/tests_scripts/multiple.sh.
The reason is that this test seems to depend on random number
sequence in order to have the proper scheduling.

It also fixes some AC tests by commenting out failing test
cases. The reason of the failure is still unknown and needs
to be investigated in future work.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
55c0b2ea45 tests: bt: enable entropy sources where missing
Moving from TinyCrypt to PSA Crypto API caused an entropy source
to be always required, so this commit adds it in tests where
necessary.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
22faaee268 tests: bt: increase PSA key slots count when necessary
Increase the number of key slots in the PSA Crypto core
for some tests using more keys than the default (16).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
65751c1c33 tests: bt: add Mbed TLS headers to the build
Include Mbed TLS headers to the build system. This is required
because these tests do not follow the "standard build pattern"
of Mbed TLS in Zephyr, otherwise include files would be already
available after the library has been linked. In these examples
some BT source files and Kconfigs are manually added to the
CmakeLists.txt file bypassing the standard library build pattern,
so Mbed TLS headers must also be added manually.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
7c1b5059ca tests: bluetooth: replace TinyCrypt with PSA in unit tests
Replace all references to TinyCrypt with PSA Crypto API in BT unit
tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
0f4875b7d0 bt-mesh: deprecate BT_MESH_USES_TINYCRYPT
Since the TinyCrypt library is being deprecated in Zephyr, this
commit set TinyCrypt usage in BT mesh as deprecated and it sets
Mbed TLS PSA Crypto API as the default option (when TF-M is not
available).
Tests are also updated in this commit.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
f4592382bb bt: use PSA for HCI ECC and rename BT_TINYCRYPT_ECC
This commit sets PSA Crypto API as the default library to perform
ECC-DH in HCI, replacing TinyCrypt (which is being deprecated).
Therefore the symbol BT_TINYCRYPT_ECC is renamed as BT_SEND_ECC_EMULATION.
References in samples/tests are also fixed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Valerio Setti
da9ab6f593 bt: crypto/host: remove CONFIG_BT_USE_PSA_API symbol
CONFIG_BT_USE_PSA_API was used in BT crypto/host modules to select
PSA crypto API over TinyCrypt (which was the default until now).
Since TinyCrypt is being deprecated and PSA crypto API is the new
standard library for crypto operations, CONFIG_BT_USE_PSA_API is
no more needed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Pavel Vasilyev
4b6683cca1 test: bluetooth: bsim: mesh: test_access: Increase timeout between proc
Increase timeout between procedures in access_tx_transmitt test to avoid
packet loss.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-27 16:40:47 -05:00
Michał Stasiak
02bb624c31 tests: drivers: watchdog: disable DCACHE for nRF54H20dk
Disabled data caching for nRF54H20dk in wdt_basic_api test.
It caused variables stored in noinit section to be cached,
resulting in reset loop.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-11-27 10:38:52 -05:00
Jukka Rissanen
9332c2813e tests: net: socket: udp: Add min_flash to the test config
Add minimum flash requirement to the tests. This will effectively
exclude nrf5340dk/nrf5340/cpuapp/ns as it does not have
enough flash for the application.

Fixes #81862

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-27 10:38:15 -05:00
Andy Ross
7cdf40541b kernel/sched: Eliminate PRESTART thread state
Traditionally threads have been initialized with a PRESTART flag set,
which gets cleared when the thread runs for the first time via either
its timeout or the k_thread_start() API.

But if you think about it, this is no different, semantically, than
SUSPENDED: the thread is prevented from running until the flag is
cleared.

So unify the two.  Start threads in the SUSPENDED state, point
everyone looking at the PRESTART bit to the SUSPENDED flag, and make
k_thread_start() be a synonym for k_thread_resume().

There is some mild code size savings from the eliminated duplication,
but the real win here is that we make space in the thread flags byte,
which had run out.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-27 10:38:05 -05:00
Dominik Ermel
d31ad05d75 Revert "tests/storage/flash_map: Support for no flash_area_open"
This reverts commit 29f7f53f85.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-27 10:36:55 -05:00
Dominik Ermel
29f7f53f85 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-11-27 06:58:43 -05:00
Ilya Tagunov
b3a943d2d5 Revert "tests: posix: common: userspace: temporarily disable qemu_arc_em"
This reverts commit f415724831.
This is fine, as the underlying issue is solved.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-27 06:57:23 -05:00
Théo Battrel
66ff97e69b Bluetooth: Host: Deprecate BT_BUF_ACL_RX_COUNT symbol
Because the number of ACL RX buffers must be at least the number of
maximum connections plus one, increasing `CONFIG_BT_MAX_CONN` could
inadvertently lead to a build failure if the number of ACL RX buffers is
not also increased. This dependency may not be obvious to users.

To address this issue, this commit deprecates the
`CONFIG_BT_BUF_RX_COUNT` Kconfig symbol and computes the value in
`buf.h` using the new `BT_BUF_RX_COUNT` define. Note that the default
value and the minimum range value have been changed to 0 to "disable"
the option.

Additionally, to allow users to increase the number of ACL RX buffers,
this commit introduces the new `CONFIG_BT_BUF_RX_COUNT_EXTRA` Kconfig
symbol. The value of this symbol will be added to the computed value of
`BT_BUF_RX_COUNT`.

The configurations of tests and samples have been updated to reflect
these changes.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-11-27 10:30:59 +01:00
Jilay Pandya
719cd2639c drivers: stepper: refactor set_actual_position to set_reference_position
This commit refactos set_actual_position to set_reference_position.
stepper_set_reference_position is more apt in regards to what this func
actually does

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-27 10:29:47 +01:00
Gerson Fernando Budke
cffb66f5c6 drivers: rtc: sam: Add platform on API test coverage
The #81456 fixed the driver issue related to issue #81454. This add
the RTC configurations on sam_v71_xult board to enable test coverage.

Fixes #81454

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-27 08:17:37 +01:00
Aytürk Düzen
55bc3acf58 tests: bluetooth: tester: make hci_ipc confs generic for multi-core
nrf5340_hci_ipc.conf and nrf5340_hci_ipc_cpunet.conf were board specific
rename them for generic multi-core board support

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-11-27 08:16:50 +01:00
Marvin Ouma
3977703ebb tests: posix: common: separate posix c_lib_ext to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves fnmatch, getopt and getentropy
into a singular testsuite at tests/posix/c_lib_ext app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-27 08:16:35 +01:00
Aleksander Wasaznik
18fd49ea0e Bluetooth: Tester: Increase config values to make tests pass
Without this PTS tests do not pass. These values are copied from a
commit aimed at unifying the prj.conf files in this directory. I do not
know which of these are strictly necessary to make the tests pass.
Copying them all poses no harm since the unification will be done later
anyway.

Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-27 08:16:18 +01:00
Aleksander Wasaznik
5a8daffc32 Bluetooth: Tester: Use BT_L2CAP_SEG_RECV for L2CAP tests
This API gives better control on L2CAP COC credits and suits better
for Upper Tester implementation.

Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-27 08:16:18 +01:00
Vinayak Kariappa Chettimada
31f37a5c29 tests: bsim: Bluetooth: Enable some high reliability CAP tests
Enable some high reliability CAP tests by increasing ISO Tx
buffer counts in the Controller to sufficiently generate
number of complete when multiple SDUs are transmitted in
single ISO interval with use of pre-transmissions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Vinayak Kariappa Chettimada
5787d7340e tests: bsim: Bluetooth: Align audio test Controller Kconfig
Align audio test Controller Kconfig value same as used with
nRF53bsim.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-27 08:15:32 +01:00
Pieter De Gendt
f29203d575 tests: kernel: device: Add API sections tests
Add tests for the subsystem_api to validate runtime API section checks.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 08:15:22 +01:00
Chris Friedt
f415724831 tests: posix: common: userspace: temporarily disable qemu_arc_em
This build would fail in CI for reasons that are not obvious.

```
west twister -i -p qemu_arc/qemu_arc_em \
  -s tests/posix/common/portability.posix.common.userspace

scripts/build/gen_kobject_placeholders.py did not reserve \
  enough space for kobject rodata.
```

It's the only platform that fails this way.

Exclude it from this test temporarily until #82059 is fixed.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-26 15:45:50 -05:00
TOKITA Hiroshi
b16b161d1f tests: drivers: build_all: Add a build_all test for usb
The test targets the following devices at this time.

- diodes,pi3usb9201
- maxim,max3421e_spi

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-26 15:44:52 -05:00
Dat Nguyen Duy
56cd16efbd dts: nxp: s32ze: add devicetree node for code RAM
Add devicetree node for code RAM, code RAM can be accessed
over AIXM bus or AXIF bus. Code access via AXIF interface
provides the best optimal performance

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-11-26 15:43:45 -05:00