Commit graph

16700 commits

Author SHA1 Message Date
Krzysztof Chruściński
20e28d23c1 tests: boards: nrf: Add MRAM latency test
Add test for MRAM latency.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 15:43:37 -05:00
Emil Gydesen
e73bfb92c7 tests: Bluetooth: ASCS: Fix various issues in ASCS unit tests
The ASCS unit tests had various errors after adding support for
dynamic registration.
Several tests did not properly clean up after failure, causing other
tests to fail when they shouldn't.

Moved the register tests to their own file as they should not
do the register in the "before" function.

The test_ascs_unregister_with_ases_in_config_state test was also
removed, as it had both issues and the state that it wants to test
cannot be reached with the current API - It is not possible to
put an ASE in the configured state without callbacks,
and registered callbacks prevents us from calling
bt_bap_unicast_server_unregister to trigger the case as that can
only be done if callbacks are unregistered. Since unregistering
callbacks also puts all ASEs to the idle state, it is not possible
to call bt_bap_unicast_server_unregister for a non-idle ASE.

The testcase.yaml was also missing some Kconfig options to
properly enable the client tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-26 15:43:13 -05:00
Jukka Rissanen
99abfda5ba tests: net: prometheus: Make sure formatter works as expected
Enhance the formatter test to verify that two metrics can be
formatted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
c7989b5747 net: prometheus: Add more parameters to metric macros
Add collector parameter to metric creation macros so that it
is possible to bind the metric to collector already at built
time.

Also add optional user_data to metric macro calls so that user
can add optional data there. This will be used by network statistics
Prometheus support in subsequent commits.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
d3efcbd316 net: prometheus: Remove need to have separate metric struct
Embed "struct prometheus_metric" to individual metric like
counter, gauge, histogram and summary. This way we avoid having
a separate base pointer in specific metrict struct. We also do
not need to search the specific metric from base metric as
we can simply use CONTAINER_OF() macro to get the base metric.

This embedding means that the counter, gauge, histogram and summary
metric define macros are changed as user does not need to create a
separate "struct prometheus_metric".

Convert the tests and sample to use the new macros.

Remove also the static from metric creation macros so that user
can decide whether it needs collector to be static or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
2a5c702807 tests: net: prometheus: counter: Add counter set tests
Add a test that will test the counter value set functionality.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
840a88a6b5 tests: net: prometheus: counter: Add counter add tests
Add a test that will test the counter value add functionality.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Anas Nashif
057ba5cf45 tests: benchmarks: optimize filters and use platform_key.
Benchmarks are not tests, we run them to verify they still work and do
not bitrot. Running them on each architecture should be sufficient.

This reduces amount of churn in CI and still allows them to be run
individually on platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 21:42:22 +01:00
Dmitrii Golovanov
412209dd6b tests: subsys: ec_host_cmd: Don't duplicate output
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-26 15:41:33 -05:00
Dmitrii Golovanov
19ae672026 tests: drivers: sensor: Don't duplicate output
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-26 15:41:33 -05:00
Tomi Fontanilles
4b9c58806b tests: portability: cmsis_rtos_v2: do not disable 64-bit timeouts
Some code that automatically gets embedded on some platforms relies
on having `CONFIG_TIMEOUT_64BIT` enabled.
Do not force disabling that Kconfig option in the test configuration,
as that will make the test fail to compile on those platforms.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-11-26 14:46:38 +00:00
Dominik Ermel
e04f6d0e84 tests: flash_map: Fix tests configurations
Kconfig that enables integrity check has been moved to
test configurations that test it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-26 14:44:54 +00:00
Pieter De Gendt
85b991af5a tests: bindesc: reading: Remove usage of deprecated global CSTD
Replace global CSTD property with kconfig options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 10:36:33 +00:00
Krzysztof Chruściński
eae3891303 tests: drivers: uart: uart_elementary: Add runtime PM configuration
Add configuration that uses device runtime PM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 10:36:21 +00:00
Marvin Ouma
9211abcde6 tests: posix: common: separate posix xsi system logging to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves syslog into a singular
testsuite at tests/posix/xsi_system_logging app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-26 08:45:43 +01:00
Valerio Setti
95aaa97dc3 mbedtls: add Kconfig to select the number of key slot in PSA Crypto core
Adding new CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT to select the number
of key slots in PSA Crypto core. The default value is 16. Be aware
that key slots consume RAM memory even if unused, so the proper value
should be a compromise between the number of slots required by
the application and the available RAM in the system.

This commit also:
- updates tests/crypto/secp256r1/mbedtls.conf to showcase how to
  use this new symbol to reduce RAM footprint.
- tests/bsim/bluetooth/mesh/overlay_psa.conf to support all the
  keys used in the test.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-26 00:12:56 +01:00
Valerio Setti
2f6ea8ed77 mbedtls: add Kconfig symbol CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS
Adding the Kconfig symbol CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS
to allow Mbed TLS's PSA Crypto core to use static key buffers
to store key's material. This helps reducing heap memory
usage and, potentially, it also discard code implementing
heap memory management if there's no other module in the build
that makes use of it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-26 00:12:56 +01:00
Anas Nashif
b207035851 tests: add integration_platforms and misc optimizations
Add integration_platforms to many tests that use platform_allow to
manage scope of pull_request CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 00:12:07 +01:00
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