Commit graph

16229 commits

Author SHA1 Message Date
Lyle Zhu
ba44d90a6a Bluetooth: tester: Set setting BREDR and SSP if classic is enabled
Set the supported settings `BTP_GAP_SETTINGS_BREDR` and
`BTP_GAP_SETTINGS_SSP` if the Bluetooth classic is enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
S Swetha
cbc5fdbb4b tests: kernel: spinlock: Increase lock contention
This commit resolves lock contention
issues by increasing the probablity of
contention during the test execution.

Increased wait delay when lock is taken
and Reduced wait delay when the lock is
released.

Achieved 99% lock contention probablity,
verified through runtime metrices.

Signed-off-by: S Swetha <s.swetha@intel.com>
2025-04-24 01:27:00 +02:00
Derek Snell
699ebb3623 doc: tests: drivers: i2c_target_api: correct comments for frdm_mcxn947
Corrects GPIO signal names shorted together for this test.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-04-23 17:54:43 +02:00
Greg Leach
2aff40b1b1 tests: Add BL54L15/L15u DVK support
Adds support for the BL54L15 and BL54L15u DVK boards.

Signed-off-by: Greg Leach <greg.leach@ezurio.com>
2025-04-23 15:02:20 +02:00
Khoa Nguyen
5d0f4e3677 tests: drivers: flash: common: Fixing the overlap case
For the flash with the block size equal to or smaller than 64 bytes,
using a specific "32" bytes for adding for destination_offset and "32"
bytes for subtracting the size that need to copy is not correct.

As a solution, I will add one-fourth of a block size for the
destination_offset and modify the size that need to copy to
[block size + one-fourth of a block size].

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-04-23 10:04:02 +02:00
Luis Ubieda
150cd56643 tests: build_all: sensor: Add ICM45686 as an I2C device
To validate build-time functionality.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Christoph Winklhofer
3b29b9fa3b tests: logging: restore userspace testing
Restore userspace testing that was removed with commit 'aa2b72d32a
(tests: logging: remove userspace testing, 2024-04-10)' and reported in
the issue #49213.

For the tests running with threads in user space (with ZTEST_USER),
the memory partitions are configured in the test-suite setup.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Marvin Ouma
83aafaf1ae tests: posix: xsi_realtime: move more tests into xsi_realtime
move tests with _POSIX_PRIORITY_SCHEDULING Option to
xsi_realtime testsuite

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2025-04-23 02:15:17 +02:00
Gudipudi Ramana Kumar
aafcd4f851 bluetooth: audio: Update bad code in BASS to be v1.0.1 compliant
Bad Broadcast Code in BASS/Scan Delegator if BIG_Encryption
field value = 0x03 (Bad_Code), Bad_Code shall be set to the
value 0xFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF according to BASS v1.0.1

Signed-off-by: Gudipudi Ramana Kumar <gudipudiramanakumar@gmail.com>
2025-04-22 16:53:49 +02:00
Anas Nashif
c2c3f7570f tests: lib: fix doxygen groups
Group test using doxygen and general fixes to structure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
e5f841c183 tests: kernel/arch: various doxygen fixes
Group test using doxygen and other doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
29b1131f66 doc: Create dox file for tests
Create top level doxygen groups to be used by tests and move to
dedidcated dox file for tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
feaf9893cc tests: fatal: group fatal tests
Group test using doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
a816bfdfec test: kenrel: group sleep tests
Group test using doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
39b1312392 tests: kernel: mbox: fix doxygen grouping
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
70b2b952db tests: events: fix doxygen groups
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
bb8b76094f tests: semaphore: fix doxygen groups
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
4ca7c14eab tests: kernel: fix doxygen comments/groups for condition variables
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
7b3ed2fbb4 tests: kernel/common: cleanup doxygen
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
7d36a18b7b tests: kernel: fix kheap doxygen groups
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Anas Nashif
d837b644dd tests: kernel: threads: improve doxygen comments, layout
Fix grouping and general doxygen fixups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-22 14:03:29 +02:00
Chris Friedt
9535a69af8 tests: posix: semaphores: ensure test is not skipped
Commit f7633a55aa moved the tests for the
POSIX_SEMAPHORES 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-22 14:03:10 +02:00
Chris Friedt
a08240ba0d tests: posix: semaphores: coalesce string constants
Just a formatting change, in a separate commit.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-22 14:03:10 +02:00
Chris Friedt
c2609155b3 tests: posix: semaphores: reduce execution time by 5s
There is no reason to use a 5s wait time in tests. This can add up quite
significantly across multiple platforms that execute in real-time under
qemu (or even just on real hardware).

Speedup observed with qemu_cortex_a53/qemu_cortex_a53/smp

Before:
```
START - test_named_semaphore
 PASS - test_named_semaphore in 5.688 seconds
```

After:
```
START - test_named_semaphore
 PASS - test_named_semaphore in 0.783 seconds
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-22 14:03:10 +02:00
Dylan Hsieh
f3bc550117 driver: adc: add adc driver for rts5912
Add adc driver for Realtek rts5912.

Signed-off-by: Dylan Hsieh <dylan.hsieh@realtek.com>
2025-04-22 14:02:37 +02:00
Tahsin Mutlugun
e219da1ff6 tests: i2c_ram: rtio: Ensure completion queue events get released
Release completion queue events left over from the previous test and
make sure a completion queue event gets released after it is consumed.
Otherwise newer cqes may be unable to be submitted due to completion
queue being full.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-04-22 12:10:12 +02:00
Anders Nielsen
b98bd7c145 drivers: stepper: adi_tmc: Add tmc51xx support
Add tmc51xx support based on tmc50xx implementation.

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-22 12:09:18 +02:00
Lyle Zhu
c5429d3204 tests: Bluetooth: Classic: Add dedicated test case for no_blobs
Add dedicated test case `bluetooth.classic.sdp.server.no_blobs` and
`bluetooth.classic.sdp.client.no_blobs` with the extra argument
`CONFIG_BUILD_ONLY_NO_BLOBS=y` and `build_only: true` to make sure the
tests sdp_s and sdp_c can be passed by Zephyr CI.

Fixes #88060.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-22 09:58:47 +02:00
Jordan Yates
8c7e9a5f6c tests: sensor: generic: test new conversions
Add tests for `sensor_value_to_deci` and `sensor_value_to_centi`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-22 04:33:14 +02:00
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