Commit Graph

10294 Commits

Author SHA1 Message Date
Francois Ramu 739ffd8a46 tests: drivers: counter running on stm32 timer-counter instances
Defines the overlay to Use the stm32 counter-timer in addition
to the rtc (if enabled)
to pass the tests/drivers/counter/counter_basic_api/
Enable all the possible timer nodes on each board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-24 13:32:29 +02:00
Pavel Vasilyev c4fa085ec4 Bluetooth: Mesh: Add async API for Large Comp Data Client
Add asynchronous API for Large Composition Data Client.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-04-24 13:31:27 +02:00
Aleksander Wasaznik f90a70d003 Bluetooth: Host: Test GATT read buffer size
This test ensures the data from a charachteristic read callback is not
truncated anywhere. This test illuminates an existing failure, so it's
failing in this commit. The fix is in the same PR.

The test comes with an experimental "library" with easy-to-use
wrappers/utilities for Bluetooth API. The library starts its life in the
directory of the test, but it will be moved outwards when more tests
start using it. It is designed to not interfere with other users of the
Bluetooth API. The library does work just as well on real hardware,
outside of BabbleSim, so it can be used for target tests and
proof-of-concept applications.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-04-24 13:31:18 +02:00
Dominik Ermel 1e1f3ba73c mgmt/mcumgr: Add tests for zcbor_map_decode_bulk_reset
Testing of zcbor_map_decode_bulk_reset.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-24 13:28:49 +02:00
Jamie McCrae a445ee538c tests: Add mcuboot_recovery_retention test
Adds a test that exercises the boot mode (retention subsystem)
feature to check that an application can successfully boot into
mcuboot's serial recovery mode.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Dominik Ermel 06b0e504e6 mgmt/mcumgr: Add test for zcbor_map_decode_bulk_key_found
Test case for zcbor_map_decode_bulk_key_found.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-21 16:28:34 +02:00
Aleksandr Khromykh 3f4468a970 tests: Bluetooth: Mesh: make msg_mesh tolerant to tx time volatility
msg_mesh bsim test is run in almost all configurations.
The test uses manual polling with hardcoded delays. This PR removes
manual polling to fully relay to mesh friendship implementation
in the aspect of time management. Also, it adds different xmit settings
for the third (not in the friendship) device to avoid collisions.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-04-21 16:27:05 +02:00
Filip Kokosinski 153f084cd7 tests/drivers/adc/adc_api/boards: add `efr32bg22_brd4184a` overlay
This commit adds support for the `drivers.adc` test by adding an overlay
for the `efr32bg22_brd4184a` board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-21 16:24:39 +02:00
Alberto Escolar Piedras ad3c3909ae tests/bsim: Add a script to generate coverage reports
For users convenience, as it is a typical usecase to
want to see the actual coverage of a set of tests.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-21 16:23:35 +02:00
Patryk Kuniecki 3707014f20 tests: lib: cmis_dsp matrix_unary_f64 requires more than 64KB of RAM
Increase the min ram configuration when running
libraries.cmsis_dsp.matrix.unary_f64 testcase
This should have been included in #51883 but was skipped for some reason.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2023-04-21 09:09:54 -05:00
Matthias Hauser 73ed8ccb5f drivers: sensor: Added driver for the Würth Elektronik WSEN-PDUS sensor
Added driver for the Würth Elektronik WSEN-PDUS sensor

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-04-21 07:16:15 -05:00
Mariusz Skamra d47120fad4 tests: Bluetooth: ascs: Remove unused variables
This removes unused variables from test functions.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-04-21 13:01:42 +02:00
Mariusz Skamra 280aff80bb tests: Bluetooth: ascs: Add ASE Control Point invalid len tests
This adds tests that validate the implementation handles invalid length
Control Point operations.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-04-21 13:01:42 +02:00
Mariusz Skamra 413f5c5d32 tests: Bluetooth: ascs: Factor out ASE control parameters validation tests
Move the tests to separate source file.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-04-21 13:01:42 +02:00
Brandon Del Bel 6bbadb6012 test: drivers: spi: spi_loopback: fix adafruit_itsybitsy_m4_express
tests/drivers/spi/spi_loopback/drivers.spi.loopback on
adafruit_itsybitsy_m4_express fails to build. Fix it by adding
CONFIG_SPI_ASYNC=n.

Signed-off-by: Brandon Del Bel <delbel@umn.edu>
2023-04-21 09:40:53 +02:00
Brandon Del Bel 587f2ec585 test: drivers: spi: spi_loopback: fix test on atsame54_xpro
tests/drivers/spi/spi_loopback/drivers.spi.loopback on atsame54_xpro
fails to build. Fix it by adding a CS pin and DMA channels to the board
overlay. Passes on hardware with spi_loopback fixture after change.

Signed-off-by: Brandon Del Bel <delbel@umn.edu>
2023-04-21 09:40:53 +02:00
Aaron Massey 75b2f5abed emul: Fuel gauge tests direct access to emul_sbs
The fuel gauge tests should *not* have to enable CONFIG_SENSOR in order to
get access to the sbs gauge emulator.

Allow fuel_gauge sbs_gauge direct access to emul_sbs_gauge.c

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-04-21 09:39:00 +02:00
Carlo Caione 826d35b188 tests: cache: Add missing cases
Some test cases are missing. Add those back.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Anas Nashif fc249bdda0 tests: rtc: fix test identifier
Tests need to be prefixed with test_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-21 01:43:17 +09:00
Magdalena Kasenberg 0b5f976073 bluetooth: tester: Restore removed nrf5340_hci_rpmsg.conf
This overlay is still needed for non-leaudio tests.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-04-20 16:11:15 +02:00
Magdalena Kasenberg bf2825168e bluetooth: tester: Update btp for codec and qos config
Update BTP_ASCS_CONFIGURE_CODEC to send codec specific configuration
in LTV format.

Update parameters of BTP_ASCS_CONFIGURE_QOS to match the BT spec
defined lengths.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-04-20 16:11:15 +02:00
Bjarki Arge Andreasen 20bbb538c9 tests/drivers/rtc/rtc_api_helpers: Test for more archs
The test suite was limited to the native_posix board,
now it is built and run for any board supported by CI.

The native_posix yaml files for both 32 and 64 bit
boards have been expanded to support rtc, allowing CI
to build and test the rtc_api test suite against the
native_posix and native_posix_64 boards.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-20 11:43:35 +02:00
Mariusz Skamra 6c1363e34d tests: Bluetooth: ascs: Add server initiated ASE state transition tests
This adds tests for server initiated ASE Operations for Sink and Source
ASE.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-04-20 10:52:42 +02:00
Alberto Escolar Piedras f0a6205831 tests/bsim: Clarify the compile scripts descriptions
And add an again an extra file for the top level.
(It was removed when the CI workflows for network and BT
were split, but the common script is still usefull).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-20 10:51:58 +02:00
Alberto Escolar Piedras 3661f91762 tests/bsim README: Expand with more information
Including the conventions the tests follow.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-20 10:51:58 +02:00
Benjamin Björnsson 3386463f95 tests: drivers: adc: adc_emul: Move to use default adc node
Use adc node already present in native_posix dts.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Benjamin Björnsson 2ee24bf619 tests: drivers: adc: adc_api: Remove redefinition of adc node
Remove redefinition of adc0 node in native_posix overlay
since it's now present in the board dts.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Benjamin Björnsson 132df467c0 tests: drivers: build_all: sensor: Rename adc node
Rename adc node to not collide with the default adc
node now present in the native posix dts.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Benjamin Björnsson 5fb5de7e43 tests: remove unnecessary includes of adc dt-bindings
Remove includes of adc dt-bindings header since these are
now already included in the root .dtsi file that adds an
adc node.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Sreeram Tatapudi 185aa1c2c5 drivers: i2c: Add Infineon CAT1 i2c driver
- Add initial version of Infineon CAT1 i2c driver.
 - Add initial version of binding file for Infineon
   CAT1 I2C driver

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-04-20 10:44:18 +02:00
Pieter De Gendt 292bb97f0d net: lib: dns: mdns_responder: Simplify setup_dns_addr
The setup_dns_addr function packet argument can be reduced to
a socket address family.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-19 11:55:40 -04:00
Roman Dobrodii 2f0ce5a3e8 tests/subsys/pm/power_mgmt_soc: fix various bugs
- Reduce "extra" added latency when trying to enter light
  sleep from 500ms to 50us, since light sleep states
  (e.g. "WFI idle") usually have microsecond-range residency
  times.
- Keep "extra" latency when entering deep sleep the same at
  1100ms (as we're trying to enter the deepest sleep state
  available, it doesn't hurt).
- Replace k_uptime_delta() with manual subtraction since
  k_uptime_delta() updates starting timestamp which leads to
  incorrect timing measurement when k_uptime_delta() is
  called for the second time.
- Measuring PM sleep entry latency using pm_notifier entry
  callback, do it only for the first PM entry event after
  calling k_usleep(), as during the sleep PM entry & exit
  may happen multiple times and that is normal.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-19 17:12:42 +02:00
Anas Nashif 326eb860b8 tests: gpio: be consistent with id across all drivers
change id from peripheral.gpio to drivers.gpio.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-19 08:57:57 -04:00
Anas Nashif 511348801d tests: spi_loopback: fix some identifiers in testcase.yaml
driver -> drivers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-19 08:57:57 -04:00
Emil Gydesen f08990588b tests: Bluetooth: BSIM: Add missing BAP prefix for BAP tests
Some of the BAP test were missing the BAP prefix.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-19 04:52:46 -04:00
Emil Gydesen 7fcd2fba93 tests: Bluetooth: BAP Uni cli bsim test fix check for g_streams
There was a check that checked if a stream was NULL, but the
value compared to NULL was an address of (&) which can never be
NULL. Check is removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-19 04:52:12 -04:00
Gerard Marull-Paretas 1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Gerard Marull-Paretas 4d06166623 device: allow NULL init function
Some devices do not need to perform any initialization, so allow the
init function to be NULL. In this case, the initialization code will
just mark the device as initialized, i.e. ready.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Tim Lin bcb173becd tests: drivers: Unit test for it82xx2_evb board
The below is the unit test result for the driver and kernel of
it82xx2_evb board.

GPIO/gpio_basic_api: PASS
I2C/i2c_api: PASS
Flash: PASS
UART/uart_basic_api: PASS
PWM/pwm_api: PASS
WDT/wdt_basic_api: PASS
KSCAN/kscan_api: PASS
kernel/sched/schedule_api: PASS
kernel/sched/preempt: PASS
kernel/timer/timer_api: PASS
kernel/sleep: PASS
ADC/adc_api: PASS.
ADC note: conversion time~=61.6us
          sample time delay~=60us
          wait voltage stable time~=202.8us
Set sampling time to 500us will pass for ADC test.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Vinayak Kariappa Chettimada 4b90d01398 Bluetooth: Controller: Fix cis_offset_min used in CIS Create Response
Use the minimum supported cis_offset_min considering that
ACL radio event does not overlap with CIG event. Use the
calculated maximum of local and remote cis_offset_min in the
Response PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-19 03:47:19 -04:00
Hiroki Tada 943158326c drivers: sensor: Support Hamamatsu Photonics S11059 Color Sensor
DataSheet:
https://datasheetspdf.com/pdf/1323325/Hamamatsu/S11059-02DT/1

Testing Environment:
esp32

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-04-18 17:07:48 -05:00
Nicolas Pitre a1d21ca69b tests: timer_behavior: don't fail the test with timer wrap-arounds
If the timer driver only implements sys_clock_cycle_get_32() (meaning
CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER=n) and the hardware clock is high
enough then the reported cycle count may wrap an uint32_t during the
test. This makes validating the total test duration pointless as it
cannot be measured. Just print a warning instead of failing the test
in that case.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-04-18 16:46:13 -04:00
Nicolas Pitre e982bf71c5 tests: timer_behavior: jitter test using timer start delay and period
Exercize both the timer start delay as wellas the timer period and
gather stats for each.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-04-18 16:46:13 -04:00
Kumar Gala b589092470 tests: rtio: fix compile warning with arm-clang
When building the rtio_api tests with arm-clang we get the following
compiler warning:

rtio_api/src/test_rtio_api.c:436:58: warning: format specifies type
'unsigned long' but the argument has type 'uintptr_t'
(aka 'unsigned int') [-Wformat]

        TC_PRINT("userdata is %p, value %lu\n", cqe->userdata, idx);
                                        ~~~                    ^~~
                                        %u

Use PRIuPTR to fix the issue.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-18 10:52:39 -04:00
Krzysztof Kopyściński ed3f8761a7 Tests: Bluetooth: Mesh: Add persistent storage test for SAR TX/RX
This tests if SAR RX/TX configuaration is saved in and loaded from
persistent storage correctly.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-04-18 15:22:32 +02:00
Martí Bolívar 26d3157ed4 apps: misc void main -> int main fixes
Fix some additional cases in in-tree applications (samples and tests).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-04-18 05:45:36 -07:00
Georges Oates_Larsen 129291f1e4 tests: net: Add tests for conn_mgr_conn
Adds integration tests for conn_mgr connectivity API

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-04-18 09:31:53 +02:00
Andriy Gelman 97535b5969 tests: drivers: build_all: sensor: Add adt7310 sensor
Adds adt7310 sensor to test.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-04-17 10:06:04 -05:00
Aleksandr Khromykh e7f1856143 Bluetooth: Mesh: add experimental support mbedtls psa
Commit adds experimental support mbedtls psa as crypto
backend for ble mesh. It were run only on bsim tests.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-04-17 16:31:20 +02:00
Aleksandr Khromykh 77c72aa67b Bluetooth: Mesh: get rid of host dependency for dh key for mesh
Commit gets rid of host dependency to generate DH key.
Mesh uses its own function for it that has synchronous
behavior and correct endianism. It simplifies the provisioning
state machine since it doesn't require waiting for the host HCI
handler.
Also, it removes hidden cross-dependency between BLE Mesh and
SMP in the aspect of competition for the same DH key
(https://github.com/zephyrproject-rtos/zephyr/issues/23292)

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-04-17 16:31:20 +02:00