Commit graph

16700 commits

Author SHA1 Message Date
Paul Timke Contreras
4fd5ab9446 tests: drivers: build_all: sensors: added paj7620
Added paj7620 to the testcase so that it is in build.

Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
2025-04-22 04:32:54 +02:00
Chris Friedt
89dd0ef1c1 tests: posix: rwlocks: ensure test is not skipped
Commit 7e8ee25479 moved the tests for the
POSIX_RW_LOCKS Option Group from the tests/posix/common testsuite to
its own dedicated testsuite.

However, there was a copy-paste error. Previously, tests would have been
run only once when dynamic threads were enabled, and then skipped when
dynamic threads were disabled, since that follows the posix programming
model better. However, dynamic threads were never actually enabled after
moving to the new testsuite. So all tests were effectively skipped.

Add the necessary options to prj.conf in order to ensure that there are
sufficient dynamic threads available to run the testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-21 20:05:05 +02:00
Phi Bang Nguyen
f363bd6e36 drivers: video: Support controls of 64-bit integer type
Add supports for controls that need 64-bit integer such as pixel rate.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
135528a1be drivers: video: Implement video control framework
Implement the video control framework with the following features:

- Drivers initialize the control with a valid value range at boot which
  guides the application developer and the framework. Hence, the video
  framework could do all common works for drivers e.g., sanity check.

- Controls need to be cached to memory. Video framework handles
  get_ctrl(), drivers don't need to implement this API. It is because
  reading control value directly from registers are not only inefficient
  but also sometimes impossible, e.g. controls that scatter through
  several registers. Only "volatile" control needs to be updated at
  runtime.

- Only the devices (e.g., sensors) owning the controls need to
  implement set_ctrl(). Other devices of the pipeline do not need to
  propagate set_ctrl() and hence, do not need to implement this API

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Nicolas Pitre
e29c0c1783 tests: poll: add pipe coverage
Add pipe test coverage.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-04-21 07:45:35 +02:00
Emil Gydesen
4cffba7c08 tests: Bluetooth: tester: BAP: Fix wrong wrong bcast rsp sizes
Several responses had incorrect sizes, which this commit fixes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-19 11:48:16 +02:00
Andrej Butok
45008f26c5 samples: tests: mimxrt1170_evk: avoid duplication in configuration
- Remove duplicated conf/.overlay configuration for
  mimmxrt1170_evk A and B revisions that have the same content.
- No change if .conf/.overlay have different content.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-18 17:46:59 +02:00
Eric Ackermann
f9331854c8 tests: coredump: Add exception for cva6
The nullpointer address (0x0) is mapped to the debug module in cva6,
making it a valid address.
Thus, in the coredump test, trigger an exception using k_panic()
instead.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-04-18 17:46:30 +02:00
Neil Chen
bd22a4a394 boards: frdm_mcxa153: add uart support
- add uart support
- enable the uart_async_api test example

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-04-18 12:36:49 +02:00
Dmitrii Golovanov
411140d015 tests: kernel: mslab: extend k_mem_slab_alloc() timeout
Extend timeout on k_mem_slab_alloc() for kernel.memory_slabs
memory_slab_1cpu.mslab test suite as a workaround to allow its run
on slow platforms, e.g. simulated intel_ish_5_8_0.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-18 10:40:50 +02:00
Aleksander Wasaznik
a71cadfc68 Bluetooth: testlib: Fix includes (IWYU)
This commit fixes all includes in testlib according to IWYU rules and
sorts all includes in ascending order by name.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2025-04-18 10:40:31 +02:00
Krzysztof Chruściński
ecabcf5db5 pm: Use pointers for current and forced power states
Use power state pointers instead of copies which improves performance.

Align power_mgmt_multicore test which was creating pm states in
runtime.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-17 21:17:18 +02:00
Aleksandr Khromykh
b53b5e198a bluetooth: rename _bt_gatt_ccc and clarify usage
Bluetooth had two public types with similar name _bt_gatt_ccc and
bt_gatt_ccc, but for absolutely different purposes.
That caused misunderstanding of relationship of them and cases
where to use which one.

Commit changes name of _bt_gatt_ccc to more suitable by usage and
improves documentation of it.

Additionally, it changes name of BT_GATT_CCC_INITIALIZER
to correspond the type name.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-04-17 17:24:19 +02:00
Robert Lubos
95ac568ed0 tests: net: socket: af_packet: Extend the test suite with more tests
Add more tests cases to the AF_PACKET sockets test suite, covering the
summary of the packet socket functionalities prepared from various
sources (mostly man pages).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Robert Lubos
6869668cc9 tests: net: socket: af_packet: Fix test_raw_and_dgram_socket_recv test
The test case did not do what it said, it was supposed to receive data
on both RAW and DGRAM packet sockets, but instead it received on RAW
socket twice.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Robert Lubos
9f6ac50566 tests: net: socket: af_packet: Simplify test initialization
Test interface configuration doesn't change throught the test suite
execution, therefore there's no need to reiterate the interfaces to set
the interface pointers in each test case. Do it just once, when test
suite is setup.

Also remove the __test_packet_sockets() function which seemed no longer
useful with all those simplifications.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Robert Lubos
0a98a83387 tests: net: socket: af_packet: Switch to blocking sockets with timeout
Packet socket tests used non-blocking sockets so in results the test
code was overly complicated with delays and loops scattered all across
the test code, making it difficult to read.
As packet sockets do support blocking operation with timeout,
reconfigure the sockets to use that and simplify the test code by
getting rid of unnecessary loops and delays.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Robert Lubos
ff801c62b1 tests: net: socket: af_packet: Increase IPv4 context instance count
Test suite prints a warning on boot about not enough IPv4 context
instances compared to the number of interfaces, therefore adjust the
config value to get rid of it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Robert Lubos
76605f813a tests: net: socket: af_packet: Make sure sockets are closed on failure
Make sure all sockets used in test are closed even in case of test
failure. Otherwise, a single test failure could derail other tests,
making the results obfuscated.

Remove redundant code related to socket creation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
Chaitanya Tata
7f7965e6db tests: net: wifi: Add a test for Enterprise with run-time certs
This is needed to ensure run-time certs feature builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-17 17:22:58 +02:00
Ryan McClelland
2c66a2adc0 drivers: i3c: add i3c controller and target kconfigs
I3C can contain a lot of features that may be unused. Add Kconfigs for
enabling controller and/or target code. Choosing just one can reduce
the code size footprint.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-17 09:05:36 +02:00
Eve Redero
cb8b1cdc74 dts: atmel: add adc node to due
Add ADC0 node and associated pincontrols
in sam3x and Arduino Due device trees.

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2025-04-17 00:56:30 +02:00
Keith Packard
db49cd3899 tests/kernel: Validate constructor execution order
Check the order of constructors, making sure those with a specified
priority are called in numeric order after which those without priority are
called.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-04-16 20:36:27 +02:00
Valerio Setti
843776035d tests: drivers: build_all: add support for "x-powers,axp2101-charger"
Extend the *.dtsi file to include also an "x-powers,axp2101-charger"
instance.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-04-16 17:07:20 +02:00
Marek Slowinski
ba8742c1b8 tests: robot: renode: Use precise pause for UART keywords
Remove the source of non-determinism during emulation
by keeping terminal events reproducible between runs.
By using the mechanism of precise pause in Renode emulator
every interaction with terminal happens at the same virtual time
from the perspective of an emulated system, hence makes it independent
of the host. Otherwise the result of a test is susceptible to
the load on the host and robot process keywords' timing.

Renode emulator supports precise pausing when specified sequence of
characters is received on a terminal. Besides that,
char delay parameter is specified to set time interval between
consecutive characters entered in the terminal.
'Start Emulation' keyword is redundant, because 'Wait For'
keywords automatically continue emulation up to the nearest pause
event (e.g. matched pattern on the terminal).

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
2025-04-16 17:07:05 +02:00
Dipak Shetty
c9645c9d9c tests: drivers: stepper: remove downstream-specific boards not run in CI
Removed boards that are not exercised in the CI pipeline, as they are
highly downstream-specific and not relevant to upstream validation.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-04-16 14:53:19 +02:00
Huaqi Fang
86293ebe11 tests: kernel: gen_isr_table: Fix irq tests for rv64 targets
The element in _irq_vector_table is 64bit for 64bit cpu,
and 32bit for 32bit cpu

Signed-off-by: Huaqi Fang <578567190@qq.com>
2025-04-16 08:10:47 +02:00
Tien Nguyen
5cf65452c3 tests: drivers: gpio: Add support for RZ/G2LC-SMARC
Add support for RZ/G2LC-SMARC

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-04-16 08:10:38 +02:00
Derek Snell
331e0cef3f drivers: i2s_mcux_sai: control MCLK direction with DT property
For the SAI peripheral, the MCLK signal input/output direction is
independent from the TX or RX bit clocks directions (TCR2[BCD] and
RCR2[BCD]). Introduces mclk-output property.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-04-16 08:09:41 +02:00
Jukka Rissanen
8d0c16ef9c tests: net: npf: Add VLAN tests
Add tests for VLAN matching.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-16 08:07:34 +02:00
Chris Friedt
788369493d tests: posix: timer: do not skip tests
I just happened to try to run this testsuite manually today and
noticed that it was being skipped due to a copy-paste error.

This test was migrated from tests/posix/common, where tests
were skipped for non-dynamic threads, since it would mostly
duplicate tests that had already been run.

However, while migrating, the condition to skip tests was
mistakenly left in when it should not have been.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-16 08:04:36 +02:00
Chris Friedt
f5cf14cbb1 tests: posix: timers: provide at least 1 dynamic thread
timer_create() will error if there are no dynamic threads to
run the SIGEV_THREAD handler, causing the test to fail (where
it was previously expected to pass).

Ensure that there is at least 1 dynamic thread available to
the POSIX API.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-16 08:04:36 +02:00
Krzysztof Chruściński
5f55fed4bb kernel: timeout: z_add_timeout to return expiration tick
Add return value to z_add_timeout. It returns system tick when timeout
will expire.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-15 19:09:33 +02:00
IBEN EL HADJ MESSAOUD Marwa
a2cb85295b tests: drivers: adc: adc_api: update adc_api test
Add nucleo_wba65ri overlay file

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-15 15:33:15 +02:00
Georgios Vasilakis
5c06558be2 samples: tests: Exclude nRF54L10 NS for unsupported tests/samples
The ADC and watchdog samples are not currently supported for the
non secure target of the nRF54L10 DK.

Add exclusions for these until they are supported.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-14 20:05:17 +02:00
Luis Ubieda
7f6588877a tests: i2c_ram: Add testcase for i2c_rtio write with transactions
As it is a common pattern for drivers performing writes (e.g: write
reg-addr + write reg-data) without having to memcpy both into a buffer.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-14 20:04:47 +02:00
Peter Wang
393c8d1378 boards: frdm_mcxa166, frdm_mcxa276: add uart support
1. add uart support
2. enable the uart_async_api test example

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-04-14 20:03:54 +02:00
Piotr Krzyzanowski
b983b0441b tests: drivers: spi: Add NULL spi_buf_set tests
Add test cases where spi_transceive gets NULL spi_buf_set
once for tx and once for rx.

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-04-14 20:03:28 +02:00
Jordan Yates
ab34a9df48 zbus: remove k_malloc dependency for ZBUS_RUNTIME_OBSERVERS
Remove the dependency on the system heap existing when enabling
`ZBUS_RUNTIME_OBSERVERS`. Instead the previously allocated memory is
required to be provided to `zbus_chan_add_obs` (which can still be
allocated through malloc).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-14 20:03:09 +02:00
Fin Maaß
1c788ba74d tests: storage: flash_map: add test for flash_area_copy()
add test for flash_area_copy().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-14 16:07:35 +02:00
Théo Battrel
77bdc8a435 Bluetooth: Add usage of util_eq and util_memeq
Update `bt_irk_eq` to use `util_memeq` instead of `memcmp` and the
"disconnect" BabbleSim test to use `util_eq` instead of a first
assertion on the size followed by a `memcmp`.

This is done as an example usage of the two new functions.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-04-14 16:06:38 +02:00
Théo Battrel
716e6bfd20 Tests: Util: Add unit tests for util_eq/util_memeq
Add two unit tests for the newly added functions `util_eq` and
`util_memeq`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-04-14 16:06:38 +02:00
Jordan Yates
97f2814b5e tests: drivers: mark rebooting tests with expect_reboot: true
Notify twister of tests that are expected to reboot in normal operation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-14 13:05:46 +02:00
JP Hutchins
fe6366b804 lib: crc: add CRC-32K/4.2
This adds the best HD=4 CRC32 polynomial. The discovery
is the result of research by Philip Koopman of Carnegie
Mellon University, and is well documented at
https://users.ece.cmu.edu/~koopman/crc/.

The user is given the option of trading 1024B of RAM to
improve the execution speed. The unit tests are parameterized
with this KConfig option.

Signed-off-by: JP Hutchins <jp@intercreate.io>
2025-04-14 09:49:02 +02:00
Simone Orru
36ec017a38 uuid: Add sample for UUID utilities
Add a sample that showcases the usqge of the
UUID utilities.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2025-04-14 09:47:26 +02:00
Simone Orru
25c94a3019 uuid: Add tests for UUID utilities
Add some tests for the UUID utilities.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2025-04-14 09:47:26 +02:00
Daniel Leung
781011b911 tests: kernel/pending: fix incorrect test names
These tests should be named "kernel.pending" instead of
"kernel.objects".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-04-12 00:02:59 +02:00
Andrej Butok
c4b92123d3 tests: littlefs: add .conf and .overlay for nxp boards
Adds littlefs test .conf and .overlay files for 18 nxp boards.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-11 22:07:03 +02:00
Chris Friedt
2ec7af3474 test: posix: c_lib_ext: reduce memory requirements for testsuite
Previously, these tests were part of tests/posix/common.
In an effort to tie feature tests to specific POSIX features
(Option Groups), these tests were moved to a separate suite in a
previous commit.

However, the memory requirements for the legacy
tests/posix/common testsuite were significantly higher while the
memory requirements for tests in tests/posix/c_lib_ext are
significantly lower.

Remove the minimum flash and ram requirements to run the test so
that it passes tests on the integration platform qemu_cortex_m0.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-11 22:06:55 +02:00
Olivier Lesage
7b61bd6518 bluetooth: gatt: Add BT_GATT_CCC_WITH_WRITE_CB()
Add simple helper macro so users can define a CCCD with a write cb
without having to combine BT_GATT_CCC_MANAGED() and
BT_GATT_CCC_INITIALIZER() themselves.

Unlike the changed callback the write callback has a return value
that can be used to reject the write request.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-04-11 16:17:42 +02:00