Commit graph

16700 commits

Author SHA1 Message Date
Nithin Ramesh Myliattil
6ce38c1aa7 bluetooth: id: fix adv sets with same id use different RPA
The fix is to check if any of the adv set's rpa expired
callback returns false, then all adv sets continues with
the old RPA.

Note: Fix is applicable only to adv sets which shares the
same id.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-03-11 14:24:41 +01:00
Henrik Brix Andersen
75c9f0fb0e tests: drivers: can: shell: skip dtiming test if CAN FD is not enabled
Skip the "test_can_dtiming" test case if CONFIG_CAN_FD_MODE is not enabled,
not the "test_can_timing_missing_value" test case.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-11 14:20:20 +01:00
Aleksandr Khromykh
aa87ed5d8a Bluetooth: Mesh: make models metadata const
Commit adds const qualifier to models metadata.
Specification claims: Composition Metadata Page 0
shall not change during a term of a node on the network.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-03-11 09:26:12 +01:00
Tom Burdick
0650a88bed llext: Rework hello_world test case to be "simple"
The simple test is there to test the API and simple extensions in
unison. Hello world was intended to be the first not the only extension
being tested.

Also refactors the entry thread to allow for usermode potentially by
passing the pointer to the function symbol rather than having it look it
up directly.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-03-09 14:44:23 +00:00
Christopher Friedt
8912ba9004 tests: posix: tests for environ, getenv, setenv, unsetenv
Add tests for environ, getenv(), setenv(), unsetenv(), and
getenv_r().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-08 04:28:47 -05:00
Pieter De Gendt
91f36191be boards: st: stm32h573i_dk: Add netif:eth support
Add build_only for the st,stm32-ethernet driver to the build_all
ethernet tests and add an entry for ethernet support to make sure
ethernet driver is built.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-08 09:37:15 +01:00
Pieter De Gendt
2054b9f982 tests: drivers: build_all: ethernet: Move app overlay to spi
Use the native_sim board to build ethernet drivers for spi devices and
add an entry for the default testcase.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-08 09:37:15 +01:00
Pieter De Gendt
6d99fc6d47 tests: drivers: build_all: ethernet: Do not set NET_TEST
The ethernet drivers can only be built if the NET_TEST option is not
selected.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-08 09:37:15 +01:00
Chaitanya Tata
5af6dfdd0e tests: Add a test for duplicate event handlers
This will help to detect any issues with duplicate handlers, currently,
it causes an infinite loop in the handler that processes the single
linked list.

Also, increase the stack size to pass the synchronous test case.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-08 09:35:04 +01:00
Robert Lubos
328ff9ac45 tests: llext: Set min_ram requirement for readonly_mpu variant
Set the minimal RAM requirement for the test variant, so that it does
not get built for platforms it won't fit anyway.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-07 21:38:46 +00:00
Emilio Benavente
9815296500 dts: arm: Enabling pit for imx devices
Enabled the PIT and Multi channel support
for some of the rtXXXX devices.
- rt1010
- rt1060
- rt1160
- rt1170

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Emilio Benavente
8bb95d33be drivers: counter: Adding Mutli Channel PIT Support
Updating the nxp,pit driver to support mutliple
channels. Updating the dts and board overlays
to account for the changes.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Emilio Benavente
04b240c830 dts: bindings: renamed binding used for pit
Renamed pit binding from nxp,kinetis-pit
to nxp,pit

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Peter Mitsis
a55a078909 tests: Use z_pend_curr() in sched benchmark
Replaces the use of z_pend_curr_irqlock() with z_pend_curr()
as the former is not used anywhere else anymore.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-03-07 11:51:06 -05:00
Gerard Marull-Paretas
80cc7d1ee5 drivers: mbox: update MBOX consumers to the new API
Update all usages of the MBOX API to the latest API changes (to be
squashed for bisectability).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-07 14:32:57 +00:00
Gerard Marull-Paretas
b39d123163 tests: drivers: mbox: mbox_data: use DT
Instead of hardcoding everything in the sample.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-07 14:32:57 +00:00
Anisetti Avinash Krishna
9eadfef4cf tests: drivers: gpio: gpio_basic_api: boards: Enabled test for rpl_s
Enable gpio_basic_api test for intel_rpl_s_crb platform

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2024-03-07 11:09:30 +00:00
Chang An
3605d57ae1 LE Audio: bt_bap_broadcast_sink_cb.syncable should provide the BIGInfo
Modify bt_bap_broadcast_sink_cb.syncable to provide the BIGInfo
instead of just the encryption field.

Signed-off-by: Chang An <chang.an_1@nxp.com>
2024-03-07 11:09:12 +00:00
Emil Gydesen
a472133587 Bluetooth: BAP: Apply missing guards for Kconfig values
Some pieces of code were missing proper guards for Kconfig
values, which could cause compile issues

The massive amount of #if in bap.c clearly indicates that the
file should be split, as it contains many things that are specific
for various roles.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-07 10:58:32 +00:00
Ying Zhang
b32c819b09 Bluetooth: tester: Add support for BTP_GAP_SET_POWERED command
Fill BTP_GAP_SET_POWERED command to support power on/off BT controller

Fixes: #67346

Signed-off-by: Ying Zhang <ying.zhang_2@nxp.com>
2024-03-07 10:57:17 +00:00
Giancarlo Stasi
95851583b8 Bluetooth: Controller: Vendor Specific: support for Scan Request Reports
Add support for vendor specific Set Scan Request Reports command and
Scan Request Received Event, available for legacy advertising.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2024-03-07 10:57:09 +00:00
Lyle Zhu
40cf23daff Bluetooth: Rename BT_BREDR to BT_CLASSIC
Rename BT_BREDR to BT_CLASSIC
Rename CONFIG_BT_BREDR to CONFIG_BT_CLASSIC

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-03-07 11:26:45 +02:00
Lyle Zhu
3a927a2833 Bluetooth: Host: Move BR/EDR files to host/classic
Add subfolder "subsys/bluetooth/host/classic".
Move BR/EDR source files to the subfolder.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-03-07 11:26:45 +02:00
Anas Nashif
5e591c38f1 kernel: do not export z_thread_priority_set
This function is only being used by a test, so instead of reimplementing
a syscall in the test, provide a Kconfig option to provide the
functionality that only works with tests and remove some of the
duplication and extra code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif
8791012ed1 kernel: move essential flag related routines out
The functions to manipulate the essential flag indeed operate on
threads, but they are misplaced in the thread implementation file. Put
them alongside other routines setting other thread flags and cleanup
headers a bit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Stephanos Ioannidis
cb81b295e0 tests: kernel: thread_runtime_stats: Relax precision test for QEMU
This commit relaxes the idle event statistics test precision requirement
for emulated QEMU targets because the cycle counts may be inaccurate when
the host CPU is overloaded (e.g. when running tests with twister) and a
high failure rate is observed for this test in the CI.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Anas Nashif
c6a01e7342 tests: xtensa: fix test identifier
start with arch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 15:30:08 -05:00
Ederson de Souza
4440d6a189 kernel/userspace: Fix dynamic thread stack allocation at userspace
It wasn't saving adjusted stack size at either the private stack or the
k_object, thus failing subsequent checks.

Test added to check for this case and prevent regressions.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-03-06 14:17:53 +01:00
Fabio Baltieri
8b9464089c input: add a pmw3610 driver
Add a driver for the Pixart PMW3610 mouse sensor device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-06 13:34:16 +01:00
Jukka Rissanen
1d96454dc7 tests: net: dns: Fix the tests to check the exponential backoff
Make sure that we do needed number of exponential backoff queries
if configured so.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-06 13:33:50 +01:00
Martin Kiepfer
2a83c58023 drivers: gpio: axp192: Add support to control EXTEN pin
AXP192 features an EXTEN pin that is on output only.

This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
Andrew Featherstone
1c50ba489f drivers: rtc: rpi_pico: Add alarm support to RPi Pico RTC driver
This adds support for the alarm functionality of the RPi Pico RTC.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-03-06 10:08:48 +00:00
Andrew Featherstone
4c880f4b0a drivers: rtc: Create utility function for time validation
RTC drivers should validate the `struct rtc_time`'s contents against the
provided `mask`. Promote this common code to a new rtc_utils file and
modify existing drivers to use this functionality. Extend the test
coverage to include verifying this behaviour.

This is groundwork ahead of adding support for the RP2040's (as used in
the Raspberry Pi Pico) RTC and alarm.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-03-06 10:08:48 +00:00
Robert Lubos
88728f32f6 tests: net: sockets: tls: Extend sendmsg tests
Add tests that verify that sendmsg() for DTLS works fine if provided
with multiple buffers.

Modify existing sendmsg() tests, so that we still tests the old
behavior if the feature is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-06 09:13:38 +01:00
Lukasz Madej
90c32e99d6 drivers: charger: charger_max20335: introduce int utilization
Utilization of chip interrupt line is mandatory to assure proper
charger state control. Handle interrupt to prepare the driver for
implementation of such functionality.
Modify charger status update so the current state is fetched in the
interrupt handler.

Use level based interrupts combined with interrupt disabling for a
period of time after interrupt handling to reduce number of interrupts
triggered by the charger. There may be a case where the charger
produces burst of interrupts for a several seconds and if the code
attempts to handle every single interrupt separatery then the system
might be significantly overloaded.

Co-authored-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-05 18:23:12 +00:00
Peter Mitsis
590e4f3a82 tests: latency_measure: Add k_stack object support
Updates the latency_measure test to add support for benchmarking
k_stack_push() and k_stack_pop().

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-03-05 16:50:47 +00:00
Laurentiu Mihalcea
8fec5f361c tests: devicetree: check L2 interrupt encoding
Add some assert statements meant to check if L2 interrupts
are encoded right when dealing with nodes that consume interrupts
from multiple aggregators. For this to work, also add another
interrupt controller node which extends a different L1 interrupt
from `test_intc`.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-05 16:50:18 +00:00
Fin Maaß
1b76f828c9 tests: net: dhcpv4: add comments to sample packets
To make the content of the sample packets more more
understandable, comments describing it are added.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-05 10:22:21 -05:00
Matthias Breithaupt
2f84e7be83 tests: net: dhcpv4: tests for encapsulated vendor specific option callbacks
Add tests for the encapsulated vendor specific option callback API.
These test cases are focused on correct parsing of encapsulated
vendor specific options.
The sample DHCP messages have been extended accordingly.

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Co-authored-by: Fin Maaß <f.mass@vogl-electronic.com>
2024-03-05 10:22:21 -05:00
TOKITA Hiroshi
ca520f8493 drivers: display: Add LED-Strip matrix display driver
Adds a driver for a display of LED strips arranged in a grid.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2024-03-05 09:44:24 -05:00
Tom Burdick
c3a0ea02a7 i2c: Add a new API test using (f/s/nv)ram
RAM allows for very fast reads and writes and lets us explore most of
the I2C controller APIs including RTIO. Theoretically supports any form
of i2c connected RAM but requires some tweaking to work with specific
parts potentially. Tested with Fujitsu's MB85 FeRAM part using an
arduino breakout.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-03-05 09:43:38 -05:00
Andy Sinclair
16fdc4bc9f tests: drivers: regulator: added regulator-boot-off tests
Added tests for new regulator-boot-off property.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-05 09:43:17 -05:00
Sibert Declercq
8fc88a0ce7 tests: net: coap: add test for age wrap around
- Added a test to the CoAP testsuite for age wrap around
- Added test for `coap_age_is_newer`

Signed-off-by: Sibert Declercq <sibert.declercq@basalte.be>
2024-03-05 14:34:42 +01:00
Peter Mitsis
a07e7c65da tests: Add test to verify HiFi save/restore
Adds a test to verify the saving and restoration of the HiFi
AudioEngine registers. Twice as many threads as there are CPUs
are created and each thread sets its HiFi registers with a
unique set of values. If after a context switch, the HiFi AE
registers contain any unexpected data, we then know that the
registers were either not saved or restored properly.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-03-05 10:57:33 +01:00
Glenn Andrews
0569809c80 Lib: SMF: Add initial transition and smf_set_handled()
Brings SMF framework closer into alignment with accepted Hierarchical State
Machine operation by:
1. Allowing 'programming by difference' by having some child states handle
   events and prevent propagation up to the parent run actions while others
   propagate events up to a common handler in a parent state.
2. Optionally allow initial transitions within a parent state to determine
   the most nested child state to transition to.
3. Adding a test case for `CONFIG_SMF_INITIAL_TRANSITION` and
   `smf_set_handled()`
4. Updating documentation for the new API (and fixing some references)

There was discussion in https://github.com/zephyrproject-rtos/zephyr/issues/55344
about not making the initial transition a Kconfig option, but I'm not sure
of any way else of doing it without permanently adding a pointer to each
`smf_state` entry, which is a problem for resource-constrained devices.

This does not fix https://github.com/zephyrproject-rtos/zephyr/issues/66341
but documentation has been updated to warn users of the issue.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-04 22:16:40 +01:00
Aytürk Düzen
ec2e8aaddf tests: bluetooth: tester: add nrf54l15 configs
Added:
nrf545pdk_nrf5415_cpuapp.overlay: Choose uart20 hwfc 115200
nrf54l15pdk_nrf54l15_cpuapp.conf

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-03-04 22:13:37 +01:00
Fabio Baltieri
7d676c2331 input: pat912x: add a bunch of settings
Add devicetree based settings for resolution, axis inversion and sleep
mode enable. Keep the resolution setting in its own function so it can
be called by the application again in runtime if needed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-04 22:10:58 +01:00
Emil Gydesen
55bd06b03e tests: bsim: Bluetooth: Add bcast validation of bt_bap_ep_get_info
The broadcast sink and broadcast source will now use and verify
the info returned by bt_bap_ep_get_info.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-04 14:05:07 +01:00
Krzysztof Chruściński
4d6bce34f7 tests: logging: log_api: Validate CONFIG_LOG_MSG_APPEND_RO_STRING_LOC
Extended test to validate that RO string locations are appended to
the cbprintf package for a log message if Kconfig option is enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-04 14:01:55 +01:00
Alberto Escolar Piedras
9aec7af1c5 Bluetooth: Controller: Build hci_vendor.c also for simulation
The FICR is also modelled in simulation, but changing this
conditional compile was forgotten, so it was only being
built for real HW.
A test had provided its own version of this function so it would
avoid a runtime warning due to the lack of static address. But
this needs to be removed as it conflicts with the function
provided now always by the nordic controller SW.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-04 12:14:15 +00:00