Commit graph

7408 commits

Author SHA1 Message Date
Francois Ramu
ee07c8eef7 tests: drivers: DAC testcase running on more stm32 nucleo boards
It includes the testcase for existing nucleo target boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
71f20d8b3e tests: drivers: pwm for stm32l073 and stm32f091 nucleo boards
The overlay are defined to run the tests/drivers pwm_api
on the nucleo_l073rz,nucleo_f091rc.
Note than pwm pb10 is for DTS definition purpose

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:25:54 -05:00
Andries Kruithof
0927b89540 Bluetooth: tests: Fixup conf to make sure new LLCP is selected
Selecting the new LLCP is a 'choice' in Kconfig, so setting
CONFIG_BT_Ll_SW_LLCP_LEGACY to 'n' does not select the new LLCP
Instead CONFIG_BT_LL_SW_LLCP needs to be set explicitly to 'y'

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2022-03-10 13:17:50 -05:00
Aleksandr Khromykh
660fa1b5ce tests: Bluetooth: Mesh: add heartbeat publication to bsim test
Extend the existing bsim Heartbeat test
to check the publication callback functionality.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-03-10 13:16:40 -05:00
Herman Berget
0e5d438ee2 Bluetooth: Host: Add test for issue #42306
Checks that only CONFIG_BT_EATT_MAX EATT bearers get connected.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-03-10 13:26:46 +01:00
Andy Ross
672d0962c0 tests/kernel/schedule_api: Add TIMESLICE_PER_THREAD case
Simple coverage exerciser for the per-thread timeslice feature.  Added
as a(nother) new variant of the schedule_api test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-09 13:49:44 -05:00
Henrik Brix Andersen
e9c9caa80d net: remove unmaintained 6LoCAN implementation
Remove the unmaintained, experimental 6LoCAN (IPv6 over CAN bus)
implementation.

Fixes: #42559

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-09 18:07:31 +01:00
Gerard Marull-Paretas
95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Emil Gydesen
8924d5c6be tests: Bluetooth: GATT server test add missing bt_conn_ref
Add missing bt_conn_ref for the gatt server test.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-09 15:04:57 +02:00
Emil Gydesen
47f991b29c tests: Bluetooth: Audio: BSIM uniform use of default_conn
Update the Bluetooth Audio babblesim tests to all use
default_conn, and use it correctly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-09 15:04:57 +02:00
Otavio Salvador
e2edb3e405 scripts: Allow use of bash outside of /bin
Even though bash is commonly available as /bin/bash there are
exceptions (e.g NixOS). This commit allow the use of the scripts in my
environment and is generic.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2022-03-08 11:11:10 +01:00
Krzysztof Chruscinski
47ae656cc1 all: Deprecate UTIL_LISTIFY and replace with LISTIFY
UTIL_LISTIFY is deprecated. Replacing it with LISTIFY.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-08 11:03:30 +01:00
Krzysztof Chruscinski
9b30b959d5 tests: unit: util: Add test for LISTIFY
Add test for LISTIFY macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-08 11:03:30 +01:00
Tom Burdick
c3c6bf9f2a tests/boards/intel_adsp: CPU halt timeout test fix
Smoke test was timing out in a WAIT_FOR macro on my up xtreme tgl board.
Enabling this sleep fixes it.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-07 12:00:23 -05:00
Hake Huang
f5864b50ff test: flash: add rt685 support for flash driver test
enable flash test for rt685

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-07 09:46:26 -06:00
Thomas Ebert Hansen
4b18770145 tests: Bluetooth: Test unsupported LLCP opcodes
Test the rejection (LL_UNKNOWN_RSP) of unsupported remotely initiated
procedures in both the central and peripheral role.

Unsupported opcodes are handled by Kconfig manipulation and removal of
source files.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-03-07 16:15:54 +01:00
Thomas Ebert Hansen
250075d3dd tests: Bluetooth: Test invalid LLCP opcodes
Test the rejection (LL_UNKNOWN_RSP) of invalid remotely initiated
procedures in both the central and peripheral role.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-03-07 16:15:54 +01:00
Erwan Gouriou
935e6752f0 tests/lib/devicetree: api: Add tests for new DT_{INST_}CLOCKS macros
Add matching tests for newly added DT_{INST_}CLOCKS macros.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-07 10:58:47 +01:00
Erwan Gouriou
0f038d75d5 tests/lib/devicetree: api: Add tests for DT_{INST_}PROP_HAS_NAME
Add tests for DT_PROP_HAS_NAME and DT_INST_PROP_HAS_NAME
macros

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-07 10:58:47 +01:00
Asbjørn Sæbø
eecd94409c Bluetooth: OTS - Client APIs to have instance as first parameter
Move the instance as the first parameter of the client function calls
and callbacks, for consistency with the server implementation.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
70eefae1d2 Bluetooth: OTS - Merge server and client header files
- Move content of client header file to common header file.
- Rename content from "otc" to "ots_client".
- Remove empty client header file.
- Update users.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
da89dcfbcd Bluetooth: OTC - Move metadata bitfields to common files
Move the metadata request bitfields to the common header files.
This is part of merging the ots_client and ots header files.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
76cf124060 Bluetooth: OTS - rename client files
Rename OTS client files from "otc" to "ots_client".

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
352dd3763e Bluetooth: OTS - join Kconfig for OTS server and client
Merge Kconfig file for OTS server and client.
Rename the client config from _OTC to _OTS_CLIENT

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
69b731d824 Bluetooth: OTC: Rename two functions
Rename functions to follow common pattern (module, action, noun).

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Asbjørn Sæbø
0d6e18a052 Bluetooth: OTC: Move OTC files to OTS folder
Move the OTC files to the OTS folders for further refactoring.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-03-07 10:47:43 +01:00
Krzysztof Chruscinski
53ef1eb137 tests: drivers: uart: uart_async_api: Move rx abort to timeout
Intention of the test is to abort rx few bytes after start of
transmission (before it is completed). Previously, thread was busy
waiting after start of TX and aborted RX from that context. However,
it may happen that CPU is busy handling UART transfer and
k_busy_wait prolongs beyond full transfer which results in test
failure.

Move rx_abort to k_timer timeout which is run in interrupt
context.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-07 10:46:48 +01:00
Francois Ramu
d91bdc0f51 tests: drivers: dma test running on the nucleo_wl55 board
enable the dma and dmamux to the nucleo_wl55jc
so that dma testcases can run on that target

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-04 09:11:38 -06:00
Gerard Marull-Paretas
7746abdc39 soc: arm: microchip_mec: mec1501: remove SOC_POWER_MANAGEMENT
Remove a redundant symbol that was used as a proxy to enable CONFIG_PM.
If an application needs to enable PM, it should just enable PM subsystem
Kconfig options. Furthermore, there's no clue "SOC_POWER_MANAGEMENT" is
a Microchip specific option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-04 09:05:45 -06:00
Daniel DeGrasse
954dcbd754 boards: twr_ke18f: Add pinctrl groups for twr_ke18f
Add pinctrl groups for twr_ke18f

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-03 13:00:20 -06:00
Marcin Niestroj
4480831fc6 tests: socket: tcp: add shutdown(..., SHUT_RD) tests
Those tests cover behavior of shutdown(fd, SHUT_RD) and recv(fd, ...).

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2022-03-02 10:05:09 -08:00
Fu Haolei
7c690b943f twister: yaml: run flash test on it8xxx2_evb board
Add it8xxx2_evb board to flash test platform_allow, so twister
won't skip it.

Signed-off-by: Fu Haolei <haolei.fu@intel.com>
2022-03-02 08:53:30 -05:00
Carlo Caione
e3d2306334 tests: bluetooth: controller: s/STACKSIZE/STACK_SIZE/
Otherwise CI complains.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-03-02 13:20:52 +01:00
Nirosharn Amarasinghe
0f8d9b430b tests: bluetooth: controller: Add ISO AL unit test
Ztest based unit test of ISO adaptation layer.
Testing of unframed case, single SDU, recombined from
one and two PDUs.

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-03-02 11:22:33 +01:00
Flavio Ceolin
72bc514f4a tests: crypto: Add test for hashing on crypto driver
Test crypto driver hash capability.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 16:32:43 -05:00
Andy Ross
fd929f5190 tests/boards/intel_adsp: Add ipm_cavs_host test
Add a fairly simple test of the IPM-over-IPC driver.  This hits all
the code, but works by implementing the host side of the protocol
partially in the C test code.  The message is sent with an initial
payload, and then IPC commands from the firmware copy the data over
into the "inbox" region to simulate data being sent via the host.
Then we make sure it lands correctly as if the host driver had done it
directly.

This requries a new command in the cavstool script that will copy a
word from the "outbox" region to the "inbox" region (both are just
different SRAM windows, conceptually no different than the way the
script is already managing log output), but no significant surgery.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
3da9c9213e tests/intel_adsp: Add clock calibration test
Now that we have easy access to code on the host, it's trivial to
check the clock against host timestamps with high precision.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
45242d9214 tests/intel_adsp: MP core power fixups for older cAVS platforms
On cAVS before 2.5, core power was controlled by the host.  Add a
command to the cavstool.py script to allow us to do that under test
command so we can exercise multiprocessor startup/shutdown outside of
SOF.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
438219c466 tests/intel_adsp: Force cpu_halt case to run on CPU 0
This test obviously only works correctly if it's run from core 0 (the
only CPU that doesn't shut down).  It was true essentially by
accident, but add some cpu_mask trickery to force things.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
ae499454a1 tests/intel_adsp: Move IPC commands into shared header
It's useful for tests other than the IPC case to be able to
communicate with the script on the host, so generalize the interface
and move it to tests.h.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
4d4687dfe1 tests/boards/intel_adsp/smoke: Add cpu halt/restart case
Add code to exercise soc_adsp_halt_cpu() and validate the cores can be
restarted with the kernel z_smp_start_cpu() API.

Note that this interface is for 1.8+ devices only.  On cAVS 1.5, the
core power is actually controlled by the host.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
0fb42d84c7 tests/boards/intel_adsp/smoke: Add board hardware features smoke test
These are descended from a private collection of test rigs I've been
semi-curating.  Getting cache, clock and memory space setup consistent
is mildly complicated on these devices and we've had bugs in all these
areas.

+ Check cache/uncache memory space setup, and make sure that the
  incoherent cache is operating as expected.

+ Make sure all cores agree with clocking setup.

+ Quickly benchmark a two-instruction loop to detect messups with
  instruction caching.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Andy Ross
318aecb86f tests/boards: Add intel_adsp board integration/smoke test
As Zephyr begins to absorb drivers for these platforms that had
previously been managed by the SOF app, there's a need for a rapid
board-specific smoke test to use during development.

This starts with the smp_boot_delay test (itself a unit test for a
SOF-derived feature) and adds a host IPC case (that needs to match
code in cavstool.py on the other side of the PCI bus!).

It will grow more features over time as needed.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-03-01 09:59:15 -05:00
Vinayak Kariappa Chettimada
da61751342 tests: Bluetooth: bsim: Test ISO data send
Added implementation to test ISO data send in Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-01 14:54:35 +01:00
Gerard Marull-Paretas
cd21d17b51 tests: subsys: fs: nvs: use nvs_mount
Replace deprecated nvs_init() with nvs_mount().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-01 12:46:34 +01:00
Alexandru Carbuneanu
e4df2434c3 tests: bsim: first L2CAP ecred bsim test
First L2CAP ecred bsim test.

Signed-off-by: Alexandru Carbuneanu <alexandru.carbuneanu@nordicsemi.no>
Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2022-02-28 11:09:42 +01:00
Emil Gydesen
628b54a959 Bluetooth: Audio: Remove ISO disconnected and connected cbs
The callbacks were implemented to notify the application
about the state of the ISO. However, since then, callbacks
such as `started` and `stopped` have been implemented,
and as such the `connected` and `disconnected` callbacks
no longer server any purpose.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-02-28 11:04:37 +01:00
Nicolas Pitre
eee5b8e563 ring_buffer: make finish methods final
Make it possible to "finish" with fewer bytes than what was "claimed".

This was possible before on the get side, but the put side was
cummulative wrt finish. The revamp made it cummulative on both sides.
Turns out that existing users rely on the opposite behavior which is
more logical and useful. So make both sides that way.

Adjust documentation, test case and users accordingly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-02-28 10:52:41 +01:00
Anas Nashif
145bcd7ab9 tests: log_stack: define for riscv smp
Define stacks for riscv smp configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-26 10:08:46 -05:00
Ederson de Souza
6babbd32e1 boards/riscv: Add qemu_riscv32_smp and qemu_riscv64_smp
Based on qemu_riscv32 and qemu_riscv64, add minimal SMP support
using the "virt" machine.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-25 19:13:50 -05:00