Commit graph

15182 commits

Author SHA1 Message Date
Andries Kruithof
bb3bab7a34 Bluetooth: Audio: implement the distribute broadcast code procedure
Implemenation of the distribute broadcast code CAP procedure, as well
as unittesting

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-25 21:52:53 +01:00
Emil Gydesen
322b177549 samples: Bluetooth: Reduce heap for hci_ipc
Reducing the heap requirement for the hci_ipc sample from
8KiB to 4KiB. It has been tested in various configurations to
work with 2300, but 4KiB was used to provide some leeway for
future updates.

The heap requirement is not documented, and it is unclear why
values lower than 2300 (not exact number) won't boot, and should
be investigated further.

Memory has become a very scarce resource for especially the ISO
builds for the nRF5340, which is why this is getting reduced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 21:52:15 +01:00
Kai Vehmanen
a14ae39e74 driver: ssp: remove use of out-of-tree CONFIG_INTEL_MN
The SSP driver has odd dependency to outside definition of
CONFIG_INTEL_NM. This is in practise tied to SSP hardware
version and always enabled for SSP block version 1.0.

Use the new SSP_IP_VER define to replace the CONFIG_INTEL_MN
preprocssor checks. Also modify the board test case to
remove the obsolete config setting.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-11-25 21:51:56 +01:00
Anas Nashif
5b29fff725 tests: workqueue: avoid filters
Use Kconfig to configure watchdog instead of using expensive filters.

Also disable CONFIG_TEST_HW_STACK_PROTECTION for this test so we do not
have to create special cases.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-25 21:51:36 +01:00
Anas Nashif
a8b788d344 tests: mem_map: reduce runtime filters
Improve CI performance improving filtering and coverage selection.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-25 21:51:36 +01:00
Jerzy Kasenberg
1d4b1ade43 tests: drivers: spi: Fix nrf52840 overlay
spi-max-frequency was missing in overlay

Now it's set to 8 MHz as per datasheet

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-11-25 17:43:48 +01:00
Jerzy Kasenberg
75d3f45d5a tests: drivers: spi: spi_slave: Fix memory corruption
This fixes memory corruption of delayable work when
tests executes unsupported function.

When test (e.g. only_rx_in_chunks) is executed it starts
delayed work for master functionality (with 10 ms delay).
Later when slave function is tried and reports that
function is unsupported, test is terminated (task ends)
but work is still scheduled.

When next test starts it clears work that is already
scheduled:

static void before(void *not_used)
{
	ARG_UNUSED(not_used);

	memset(&tdata, 0, sizeof(tdata));

this leads to memory corruption and system work queue
tries to remove work but it never does since head/next
pointers are zeroed at that time.

This just adds after function that cancels work
regardless if it was scheduled or not.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-11-25 17:43:48 +01:00
Jamie McCrae
7857599bf8 tests: mgmt: mcumgr: os_mgmt_info: Fix return type
Fixes returning a define from a different enum which throws an
error with clang

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-25 17:43:17 +01:00
Ryan McClelland
f5946a546d manifest: update cmsis-dsp to v1.16.2
Update cmsis-dsp module to v1.16.2

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-25 14:42:07 +01:00
Jordan Yates
4e7feddd87 tests: bsim: support snippets
Support specifying a snippet when compiling bsim applications.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-25 14:41:43 +01:00
TOKITA Hiroshi
b7badee6aa tests: drivers: build_all: audio: Add config for st,mpxxdtyy
Add configuration to add `st,mpxxdtyy` to build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
TOKITA Hiroshi
0bc0dd7767 tests: drivers: build_all: audio: Add i2c-devices to build test
Add build tests for the following devices.

- ti,tas6422dac
- ti,tlv320dac

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
Carles Cufi
b06bf51459 boards: nrf54l15dk: Enable tests and samples for the L05 and L10
This is a follow-up to 21475774fc,
extending the number of tests and samples that use the new L05 and L10.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-25 10:08:07 +01:00
Pieter De Gendt
bf2db7afc0 python: Format and sort imports
ruff check --select I001 --fix applied to all python files that had
this as only issue.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 10:07:13 +01:00
Jakub Michalski
43f917111b posix: add pthread specific data deallocation test
This commit adds test to assert that thread specific data is deallocated
on thread termination.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2024-11-25 08:31:08 +01:00
Chris Friedt
2a1fa8e4c7 tests: posix: getopt: move filter to testcase.yml common area
Similar to #81766, move the filter to the common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-25 01:02:50 +01:00
Chris Friedt
b0352db95c tests: posix: rwlocks: move filter to testcase.yml common area
Similar to #81766, move the filter to the common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-25 01:02:50 +01:00
Khoa Nguyen
8d7ae89c23 tests: drivers: spi: Support test spi_loopback for RA6, RA4, RA2
Add overlay and add config to support test spi_loopback for:
ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, ek_ra6e2,
fpb_ra6e1, fpb_ra6e2, ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra4e2,
ek_ra2a1.

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 01:02:35 +01:00
Yong Cong Sin
b1def7145f arch: deprecate _current
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Ilya Tagunov
9d229e5c18 tests: lib: c_lib: add the proper dependency for asctime_r and ctime_r
As the test uses reentrant time functions like asctime_r or ctime_r,
it should select POSIX_C_LANG_SUPPORT_R. Otherwise there are build
failures observed with the default test configuration if these
functions are not provided by the toolchain.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Dominik Ermel
021ef9e5c3 tests/flash/common: Set test device size for NRF platforms
Set expected size for nrf platforms.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
a6ef37ca8e drivers/flash/spi_nor: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
c03f256fba tests/drivers/flash: Add test case for flash_get_size
Add flash_get_size commit and Kconfig option for test to set the
expected size of device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
852c992da5 tests/drivers/flash_api: Flash API tests
The commit adds test for flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Daniel DeGrasse
c565c2c6f6 drivers: mipi-dbi: use string for mipi-mode property
Use a string for the mipi-mode property over an integer value, as this
significantly improves the readability of the MIPI DBI device binding.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-23 02:01:47 +01:00
Erwan Gouriou
555d97ea3d tests: drivers: flash: common: Remove stm32 specific test
It's same test as "default", but more restrictive target wise.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
201a0b6ba9 test: drivers: flash: common: Copied size can't exceed page.size
flash_copy() is performed on a page.size span but following flash_read()
verification step is performed on EXPECTED_SIZE length (512).

This doesn't work on devices where page.size is lower than EXPECTED_SIZE,
such as STM32L1 where page size is 256.

To fix this, perform verification on the smalest value between page.size
and EXPECTED_SIZE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
73126c1f48 tests: psa: its: Extend Timeout
These tests could be long on slow targets


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Vinayak Kariappa Chettimada
98130afd0a tests: bsim: Bluetooth: Fix simulation length be greater than wait time
Fix some test simulation length be greater than wait time.
These tests completed within 12 seconds, 15 second wait
time is a good value with included margin and a 20 second
simulation time.

These tests failed on this PR CI.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Jukka Rissanen
5531692bcc tests: net: socket: udp: Add IP_LOCAL_PORT_RANGE socket option tests
Make sure that the IP_LOCAL_PORT_RANGE socket option works
as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 17:42:08 +01:00
Chen Xingyu
1dd6d0db67 tests: subsys: mgmt: Fix warning of size_t formatting with %.*s
This addresses the following warning building with `CONFIG_64BIT=y`:

    error: field precision specifier '.*' expects argument of type 'int',
    but argument X has type 'size_t' {aka 'long unsigned int'}

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-11-22 08:25:31 -05:00
Chris Friedt
932e8708b1 tests: posix: single_process: correct typo and filter
What looks to be a copy-paste typo was not caught in
code review.

Change .rwlocks to nothing and move the filter to the
common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-22 08:22:30 -05:00
Johan Hedberg
3063f18942 Bluetooth: Host: Remove unnecessary hci_driver.h includes
None of these files actually use anything from the hci_driver.h header
file.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Alberto Escolar Piedras
4558056f81 tests/bsim: Also runtime test the UART drivers for the nrf54l15
To increase coverage.

Note that we call twister separatedly for this target, due to the 54l15
overlays using UARTE20 which is indexed in simulation as "2", but as
the nrf52833 does not have 3 instances. So "-uart2_loopback" is not
a valid option for a 52833 executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
9c386cab93 tests uart_pm: Enable for nrf54l15bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
eec736355c tests uart_mix_fifo_poll: Enable for nrf54l15bsim
Enable this test in the simulated nrf54l15 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
dd2f4117e3 tests uart_async_api: Enable in nrf54l15bsim//cpuapp
Enable this test in the simulated nrf54l15 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Jukka Rissanen
c2802618df tests: net: socket: tcp: 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 #81608

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 11:33:52 +01:00
Anas Nashif
28796076d8 tests: kernel: common: optimize filters
Optimize filters and remove build_on_all, this option is already used in
the synchronization sample which has more coverage on small platforms.

Since we only build, it does provide basic sanitcheck for the kernel as
well.

This reduces testplan on PRs and push events by almost 1000 entries that
would only be built or filtered at runtime.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-21 19:22:35 -05:00
Mahesh Mahadevan
21d0a3b699 tests: pwm: Add support for SCTimer PWM on FRDM-MCXN947
Add overlay files to enable test of PWM over SCTimer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Krzysztof Chruściński
f235ddb2cf tests: drivers: uart: async_api: Add uart120 instance to nrf54h20dk
Add second instance to be tested on nrf54h20dk. uart120 is a fast UARTE
which works on fixed pin locations. It is not available for cpuppr core.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
d2b69a4ec7 tests: drivers: uart: async_api: Rework for multi instance
Rework the test to be able to run on multiple instances.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
bc007fd53b tests: drivers: uart: async_api: Add missing static keyword
Multiple variable in the test were missing static keyword.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Benedikt Schmidt
53ae195f0d drivers: fpga: replace runtime checks with buildtime asserts in iCE40
Replace NULL checks for the set and clear registers with BUILD_ASSERTs
in the iCE40 device instantiation.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-21 20:11:47 +01:00
Pieter De Gendt
f05deb1aa4 python: Format trivial files where only newlines were missing
Apply formatting on files that only needed adding newlines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-21 20:10:51 +01:00
Dominik Ermel
77ebf82b3e storage: flash_map: Don't generate flash area when no device
Change in default flash map generation, where partitions hanging of
disabled devices will not have flash area generated.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-21 14:48:44 +01:00
Emil Gydesen
b4f3763c31 tests: Bluetooth: Audio: Use same recv_cb for all tests
This commit changes the BSIM tests to use the same recv callback
for all tests. The purpose of this is to reduce code duplication
and make it easier to maintain the tests.

This also changes the recv_cb so that in case of any error we log
the most recently received SDU, which should provide more
information about why a test failed in case of RX error.

PBP had to be updated a bit to support the audio_stream
struct.

Also modifies a check and log in bap_stream that was less than
helpful to determine if it was the stream or the endpoint that
was NULL.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 14:47:49 +01:00
Seppo Takalo
23345d203e tests: coap_client: Add test for non-confirmable request
Add test for sending multiple non-confirmable requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
d64748cc52 tests: coap_client: Refactor tests
Refactor tests to be a bit shorter, so its easier to read
and copy-paste for a new testcase

All idioms like "ret = somecall(); zasser.." are replaced with just
"zassert_ok(some_call());"

Commonly used structures are global and initialized once.

To avoid cross-test side-effects, suite_after-function is added
to cleanup all requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
34a6d5a5dc tests: coap_client: Proper slow-down
Use real-time scheduler with 100x speedup, so timeouts are
accurate enough, but still fast for tests to run.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00