Commit graph

11470 commits

Author SHA1 Message Date
Anas Nashif d885048637 tests: pm: power_domains: rename testcase, demo is ambigous
Rename testcase and use native_posix for coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Anas Nashif c532595519 tests: pm: driver_init: rename testcase, demo is ambigous
Use a more descriptive testcase name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Anas Nashif eb956d0853 tests: pm: driver_init: use native_posix for testing
Use native_posix, this is a better platform for getting test coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Dat Nguyen Duy 11f5eb5913 tests: drivers: dma: enable dma test for mr_canhubk3
Add devicetree overlay for enabling dma test for mr_canhubk3 board

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Rodrigo Peixoto 43c8df7893 test: zbus: Add tests for MSG_SUBSCRIBERS
Add specification-based and integration tests for `MSG_SUBSCRIBERS`.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Flavio Ceolin 646a06c9fe random: Fix kconfig symbol name
s/CSPRING_ENABLED/CSPRNG_ENABLED/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Florian Grandel a12a6ab5b9 drivers: ieee802154: introduce channel pages
Replaces the previous approach to define bands via hardware capabilities
by the standard conforming concept of channel pages.

In the short term this allows us to correctly calculate the PHY specific
symbol rate and several parameters that directly depend from the symbol
rate and were previously not being correctly calculated for some of the
drivers whose channel pages could not be represented previously:
* We now support sub-nanosecond precision symbol rates for UWB. Rounding
  errors are being minimized by switching from a divide-then-multiply
  approach to a multiply-then-divide approach.
* UWB HRP: symbol rate depends on channel page specific preamble symbol
  rate which again requires the pulse repetition value to be known
* Several MAC timings are being corrected based on the now correctly
  calculated symbol rates, namely aTurnaroundTime, aUnitBackoffPeriod,
  aBaseSuperframeDuration.

In the long term, this change unlocks such highly promising functional
areas as UWB ranging and SUN-PHY channel hopping in the SubG area (plus
of course any other PHY specific feature).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-27 12:44:15 -04:00
Alberto Escolar Piedras f8e34e6684 tests/drivers/flash common: Allow on nrf52_bsim
903a79431a
seems to have attempted to limit in how
many platforms this test runs due to issues in some
platforms. But how it was done (using platform allow apart
from integration platform) it prevents it running on
other platforms in which it works.
Add the nrf52_bsim target to this allow list so the
test can be run on it too.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-27 15:48:17 +02:00
Aleksandr Khromykh 4cf78b1e6d tests: Bluetooth: tester: fix mesh1d1 EHP pts tests
Mesh1d1 uses EHP wth SHA256 algorithm as the main one.
This mandates to use 32 bytes static oob if static oob
has been chosen.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-09-27 15:48:08 +02:00
Vinayak Kariappa Chettimada 3c2b1f952c Bluetooth: Controller: Add BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX Kconfig
Add BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX Kconfig to allow the
omit of EVENT_OVERHEAD_START_US and EVENT_OVERHEAD_END_US in
the time reservation calculations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-27 15:47:45 +02:00
Fredrik Danebjer 078b00b155 Bluetooth: Audio: Add resend mechanic to CSIP notifications
Added retry mechanic to CSIP notifications by adding them into system
workqueue. Bookkeeping is done for notifications for all clients, and
potentially disconncted clients will also receive notifications on
reconnect. This also adds mechanic to restore the local clients list
upon registration of the service, as well as BSIMs to test notify on
reconnect.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2023-09-27 15:47:33 +02:00
Anders Storrø c2677fe2e4 tests: Bluetooth: Mesh: Add PRB proxy bsim test
Adds Bsim test for checking behavior of private Net ID
and private Node ID.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-09-27 15:47:06 +02:00
Anders Storrø 8d253086c3 tests: Bluetooth: Mesh: Fix bug in priv beacon
Fix several pointer related bugs in the private beacon test
framework.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-09-27 15:47:06 +02:00
Daniel Gaston Ochoa c870fb70ce drivers: spi: Test rx bigger than tx
Test that SPI works when the rx buffer is longer than
the tx one.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-27 15:44:50 +02:00
Seppo Takalo b9028bb722 net: lwm2m: Remove unneeded function pointer parameter
lwm2m_udp_receive() is only called with same function
pointer, so there no need to carry that in the parameter.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-09-27 15:44:30 +02:00
Seppo Takalo f227b56792 net: lwm2m: Separate opaque content format into its own
Opaque content format is not part of clear-text, so it
should be separated into its own file.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-09-27 15:44:30 +02:00
Emil Gydesen a5384bbf1a tests: Bluetooth: BAP: Initial Broadcast reconfigure test
Add a simple initial test for the reconfigure unittest.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-27 15:44:02 +02:00
Grzegorz Chwierut ae336f69c3 tests: mcuboot: pytest: Add image swap test with mcumgr
Added application based on SMP Server Sample. Application is built together
with MCUboot using sysbuild and is flashed onto device in one step.
Tests are automated with pytest - new harness of Twister.
The image for upgrade is prepared using west sign command
then is uploaded by mcumgr into device and tested.
Automated scenarios to test upgrade (image upload, test, revert, confirm),
to test downgrade prevention mechanism and to test upgrade with image,
that is signed with an invalid key.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-09-27 15:43:56 +02:00
Aaron Massey 12cbfcf397 fuel_gauge: Repl property struct w/ union
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value property type when fetching
properties. Separating off the property types from the property values
themselves also allow an array of property types to declared as static
const.

Break up fuel_gauge_property struct into a fuel_gauge_prop_val union and a
fuel_gauge_prop_t property type as inputs into fuel gauge API functions.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey 329ecd1e12 fuel_gauge: Remove status from fuel gauge properties
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value status code when fetching
multiple properties isn't particularly wanted or needed. It was largely
considered not worth the additional maintenance to have the extra per
property error information.

Remove the status field from the fuel_gauge property value structs.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey bddd88955d fuel_gauge: Add fuel_guage_set_props()
The fuel_gauge_set_prop() function prototype declares a function that sets
multiple fuel gauge properties at once. The naming suggests it ought to
fetch a singular property at a time. Moreso, some clients may just want to
set properties one at a time and may feel uncomfortable using a prototype
for fetching multiple properties when wanting to fetch them one at a time.

Modify fuel_gauge_set_prop() to fetch a single property and add
fuel_gauge_set_props() to support fetching multiple properties. Modify
existing tests/drivers/samples.

This is part of #61818 work.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey e294b16a2f fuel_gauge: Add fuel_guage_get_props()
The fuel_gauge_get_prop() function prototype declares a function that
retrieves multiple fuel gauge properties at once. The naming suggests it
ought to fetch a singular property at a time. Moreso, some clients may just
want to fetch properties one at a time and may feel uncomfortable using a
prototype for fetching multiple properties when wanting to fetch them one
at a time.

Modify fuel_gauge_get_prop() to fetch a single property and add
fuel_gauge_get_props() to support fetching multiple properties. Modify
existing tests/drivers/samples.

This is part of #61818 work.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Sylvio Alves bdda8ac48e soc: esp32s3: add esp32s3_appcpu for AMP support
Adds esp32s3_appcpu SoC and update default esp32s3 SoC
to support AMP feature.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-27 12:07:21 +02:00
Fabian Blatz c7f8033f2b modules: lvgl: simplify sys_heap memory size configs
Changes the Kconfig symbols for the sys_heap based memory management option
and removes the notion of `BLOCKS` with a more concise single
`LV_Z_MEM_POOL_SIZE` option. Also adds `LV_MEM_CUSTOM` to the lv_conf.h,
since in any option the memory management is considered to be custom.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-27 09:54:08 +02:00
Piotr Narajowski d20c95e529 bluetooth: tester: MICP BTP event
Enhance AICS BTP events functionality for invalid behavior tests.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-26 16:54:20 +02:00
Piotr Narajowski 6c4b9c9933 bluetooth: tester: AICS BTP event
Enhance AICS BTP Events Functionality for invalid behavior tests.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-26 16:54:20 +02:00
Seppo Takalo 7b4f22edd1 net: lwm2m: Add functional tests for LwM2M against Leshan
Use the new Pytest integration to run testcases against Leshan.

Test with:
twister -T tests/net/lib/lwm2m/functional -p native_posix -vv

This requires Leshan running in localhost using following setup:
tcp/8080 Leshan web interface and REST API
tcp/8081 Leshan bootstrap server REST API
udp/5683 Leshan non-secure CoAP
udp/5684 Leshan DTLS CoAP
udp/5783 non-secure Bootstrap CoAP
udp/5684 DTLS Bootstrap CoAP

Leshan and Boostrap server must be reachable from native_posix
run using IP address 192.0.2.2 as in most of the examples.

Tests are written from test spec;
OMA Enabler Test Specification (Interoperability) for
Lightweight M2M

Following tests are implemented in this commit:
* LightweightM2M-1.1-int-0 – Client Initiated Bootstrap
* LightweightM2M-1.1-int-1 – Client Initiated Bootstrap Full (PSK)
* LightweightM2M-1.1-int-101 – Initial Registration
* LightweightM2M-1.1-int-102 – Registration Update
* LightweightM2M-1.1-int-104 – Registration Update Trigge
* LightweightM2M-1.1-int-105 - Discarded Register Update
* LightweightM2M-1.1-int-107 – Extending the lifetime of a registration
* LightweightM2M-1.1-int-108 – Turn on Queue Mode
* LightweightM2M-1.1-int-109 – Behavior in Queue Mode
* LightweightM2M-1.1-int-201 – Querying basic information in Plain Text
* LightweightM2M-1.1-int-203 – Querying basic information in TLV format
* LightweightM2M-1.1-int-204 – Querying basic information in JSON format
* LightweightM2M-1.1-int-205 – Setting basic information in Plain Text
* LightweightM2M-1.1-int-211 – Querying basic information in CBOR format
* LightweightM2M-1.1-int-212 – Setting basic information in CBOR format
* LightweightM2M-1.1-int-215 – Setting basic information in TLV format
* LightweightM2M-1.1-int-220 – Setting basic information in JSON format
* LightweightM2M-1.1-int-221 – Attempt to perform operations on Security
* LightweightM2M-1.1-int-401 – UDP Channel Security – PSK Mode

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-09-26 16:53:16 +02:00
Jatty Andriean 3eea17c5de tests: drivers: clock_control: Add PLL fracn test
Added a test case that generates a 160 MHz system clock
using a 16777216 Hz HSE clock and also using a 16 MHz HSI

Signed-off-by: Jatty Andriean <jandriea@outlook.com>
2023-09-26 15:06:56 +02:00
Dawid Niedzwiecki 49f9aa7d12 counter: stm32 rtc: handle sub second registers
Add support for using the sub second registers. It allows reading and
setting alarm with the sub second tick resolution.

The RTC module is configured to get as high frequency as possible, which
equals the source clock (RTCCLK) divided by 2. To get such frequency,
the asynchronous prescaler is set to 1.

According to RM, setting the asynchronous prescaler to a high value
minimize consumption, so the change increase the power consumption.

Use a config to enable the sub second support.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-09-26 15:05:35 +02:00
Alberto Escolar Piedras 03b601f0a9 tests BT privacy: Simplify a bit scripts
Reduce the unnecessary hidding and indirection,
as it makes the scripts more difficult to follow
for no benefit.
If somebody wants to debug these tests, they'll want
to see the sim_id, and won't benefit from going around
opening files needlessly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-26 08:38:36 +02:00
Franciszek Zdobylak fc4ae7ae84 tests: drivers: Unify labels of sensors
Unify labels of all sensors used in tests/drivers/build_all/sensor test.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-09-26 08:36:52 +02:00
Franciszek Zdobylak 862cd57a2a tests: drivers: Move the DHT22 sensor to gpio.dtsi
Move the DHT22 GPIO sensor to the gpio.dtsi overlay file.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-09-26 08:36:52 +02:00
Michal Morsisko 8e32b5ee0a drivers: sensor: Add suport for TMAG5170 3D Hall sensor
Introduce support for Texas Instruments TMAG5170
high-precision linear 3D Hall-effect SPI sensor.
This driver allows to configure measurements on
magnetic and temperature channels. It is also
possible to read rotation of the magnet.

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2023-09-26 08:36:09 +02:00
Anas Nashif 8eedef6f94 tests: dma/chan_blen_transfer: fix hardware dependency and syntax
Removed 'drivers' from supported field and fix syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Anas Nashif 59a15818e3 tests: uart_emul: remove hardware dependency
Remove depends_on in test, this is not needed and not part of any board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Benjamin Cabé 4d10c960da drivers: sensor: Add initial support for hm330x dust sensor
Adds initial support for hm330x dust sensor series. Allows to read PM1,
PM2.5 and PM10 concentrations in atmospheric environment. A further
update to the driver may add support for also reading "standard" CF1
concentrations by exposing of a custom sensor attribute or a Kconfig
option. Tested with Grove - Laser PM2.5 Sensor (HM3301) attached to a
Wio Terminal.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 19:53:49 +02:00
Alberto Escolar Piedras 0ff2ba8c8e tests: BT privacy: Fix printf format
Fix the print format string so the "%" is printed
instead of a bogus value.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-25 19:48:15 +02:00
Vinayak Kariappa Chettimada 8c9ac505db Bluetooth: Controller: nRF53: Fix sw switch single timer id regression
Fix regression in sw switch single timer id use for nRF53x
series SoC.

Regression introduced in commit cfcbe5d68e ("Bluetooth:
Controller: Remove redudant header file includes").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-25 19:47:10 +02:00
Teoh Shi Lin d98229c352 drivers: gpio: Add ALTERA PIO
Add driver for altera avalon pio.

Signed-off-by: Teoh Shi Lin <shi.lin.teoh@intel.com>
2023-09-25 16:41:17 +02:00
Nick Ward ead0c4f865 drivers: adc: use adc_read_dt api
Where struct adc_dt_spec is in use use adc_read_dt().

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 09:52:16 +02:00
Emil Gydesen 63badb0fa7 tests: Bluetooth: Audio: bt_audio_codec_cap_get unit tests
Add unit tests for the bt_audio_codec_cap_get* functions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-25 09:48:47 +02:00
Tristan Honscheid 0bf220161b test: Update generic sensor test to use new vertical decoder API
Update the code in the generic test to work with the updated sensor
decoder API that retrieves data vertically by channel.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-09-25 09:47:26 +02:00
Yuval Peress acc5501118 zdsp: Add Q value print formatting helpers for
Introduce PRI style formatting for DSP values. These require the use
of another separate macro to set up the argument (PRIq_arg).

Signed-off-by: Yuval Peress <peress@google.com>
2023-09-25 09:47:26 +02:00
Nick Ward a55d7eefef tests: drivers: build all: sensor: add voltage
Add voltage sensor driver to tests.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 09:47:03 +02:00
Ryan McClelland b092094815 modules: cmsis-nn: add cmsis-nn module
This adds the cmsis-nn module since it moved to its own realm.
This also adds a kconfig for the long short-term memory.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Ryan McClelland 104ea2ccca modules: cmsis-dsp: add cmsis-dsp module
Use CMSIS-DSP from its new realm. This also changes change how you
initialize FFT tables as well to use arm_cfft_init_64_f32 if you
know the FFT size in advance rather than the generic initialization
arm_cfft_init_f32.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Aleksandr Senin cec9bc29ba tests: drivers: build_all: mdio: add bit bang testsuite
- Add mdio to a build_all testsuite
- Add mdio bit bang to a build_all testsuite

Signed-off-by: Aleksandr Senin <al@meshium.net>
2023-09-24 08:28:10 -04:00
Fabio Baltieri 341590545a tests: kernel: xip: exclude qemu_riscv32_xip
This board seems to have issue with data alignemnt after 843f66f and is
failing in CI. Exclude it while the problem is investigated.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-22 17:39:38 +01:00
YuLong Yao 21fcf61c87 tests: drivers: debug: add esp32s3_luatos_core
add overlay for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao 1a2a8fd49b tests: drivers: uart: add esp32s3_luatos_core
add overlay and conf for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00