Commit graph

7561 commits

Author SHA1 Message Date
Aleksandr Khromykh
83169f51af tests: Bluetooth: Mesh: test of IV index behavior
Testing of IV update, IV recovery and deferring of
the IV update procedure in case of ongoing segmented
transaction.

Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
2022-04-19 11:47:57 +02:00
Henrik Brix Andersen
423ae67d5c tests: drivers: can: api: test can_get_max_filters()
Add test for can_get_max_filters() optional API function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-19 11:47:40 +02:00
Emil Obalski
c5dc184b74 tests: ipc: Update exclude platforms
remove qemu_xtensa from exclude platforms as fix for this platform
is provided.

add ast1030_evb to exclude platforms as this soc does not yet have
in tree driver for external cache controller.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Emil Obalski
3a9b082fef tests: Move icmsg_buf tests to subsys/ipc
Move ipc service backend unit test from tests/lib to
tests/subsys directory.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Emil Obalski
cc57f0acb9 tests: Align buffer in icmsg_buf tests.
This change adds alignment to buffer on which icmsg_buf
is created. Some platforms run into fatal exception
when accessing unaligned addresses. Fix that by ensure
4 byte alignment.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Flavio Ceolin
8ddb21e230 tests: pm: Add a power domain test
Add simple test to exercise power domain behavior
with device runtime.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Henrik Brix Andersen
77fa7709e4 tests: drivers: can: api: add test for can_set_bitrate()
Add test for the can_set_bitrate() syscall.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-18 17:23:28 -07:00
Tom Burdick
2f320730a1 dma/cavs_hda: Adds link in/link out compatibles
Adds hda link in and out drivers. The link in and link
out channels of HDA have small differences
with the host channels. Updates the existing
cavs_hda drivers and code to account for these
differences.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-04-18 19:19:40 -04:00
Benjamin Björnsson
e9ab9990d4 boards: arm: arduino_nano_33_ble: Add support for sense version of board
This commit adds support for the Arduino Nano 33 BLE Sense board.

The DTS is separated into a common dtsi and one DTS for each version
of the board. The sensors with existing drivers: hts221, lps22hb and
apds9960 are added to the DTS of the Sense version.

A startup delay is added to the vdd_env node. This is done to give some
time for the sensors VDD/VCC to go high before the sensor drivers are
initialized.

The functionality was verified using the driver sample of each sensor.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-18 12:20:32 -05:00
Piotr Pryga
4a18d615a4 slist: Fix sys_slist_append_list with head and tail NULL break a list
If the sys_slist_t instance is not empty, its head and tail points to
some sys_snode_t instances. If sys_slist_append_list is executed with
tail being NULL the list object is corrupted. Tail of the sys_slist_t
instance is set to NULL. If one executes sys_slist_append on that node,
then nodes pointed by head are lost.

The commit fixes the issue and adds unit tests to verify correct
behavior.

Added change verifies if head and tail of appended list are not NULL.
In other case the list object is invalid and should not be appended
to a valid list instance.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-15 11:50:29 -07:00
Ryan McClelland
f7ddcd2713 arch: arm: aarch32: initialize FPSCR to reset value for ARMv8.1
With GCC 11 now supporting low overhead branching in ARMv8.1, ASM "LE"
(loop-end) instructions would trigger an INVSTATE hard-fault after
FPSCR was set to 0. This was due to the FPSCR getting a new field in
ARMv8.1. LTPSIZE is now set to it's reset value of Tail predication not
applied.

Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
2022-04-15 10:33:48 -07:00
Szymon Czapracki
827890c075 Bluetooth: audio: Add initial Hearing Access Service shell
This adds initial shell support for HAS.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-04-15 10:32:54 -07:00
Jaska Uimonen
03e335ca6a tests: drivers: ssp: add ssp dai tests
Add tests for Intel dai ssp driver. These tests configure
the ssp driver and transfer data over loopback with dma.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-04-14 11:42:08 -04:00
Jaska Uimonen
8d38b64fdc drivers: dai: add dai driver subdir and ssp driver
Add Intel ssp driver using dai interface.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-04-14 11:42:08 -04:00
Krzysztof Chruscinski
f538136941 tests: logging: log_stack: Align stack usage limits
Align stack usage limits for riscv platforms.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-04-14 08:32:31 -04:00
Tristan Honscheid
aa8f740abf ztest API Migration: bluetooth/l2cap
Migrate the unit tests at `bluetooth/l2cap` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-04-14 09:07:23 +02:00
Tristan Honscheid
7e7855d669 ztest API Migration: bluetooth/at
Migrate the unit tests at `bluetooth/at` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-04-14 09:06:57 +02:00
Henrik Brix Andersen
d39063a20d tests: drivers: can: api: verify filters persist through mode change
Verify that added rx filters are preserved through mode changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-14 09:06:11 +02:00
Henrik Brix Andersen
3b1527a8f9 tests: drivers: can: timing: tighten the sample point test criteria
Tighten the sample point test acceptance criteria from +/- 10.0% to +/-
5.0%. This is in line with the CAN sample point criteria used by the
Linux kernel.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-13 13:28:06 -07:00
Henrik Brix Andersen
5961ad2af8 tests: drivers: can: timing: test more bitrates
Extend the test with more CAN in Automation (CiA) 301 standard bitrates.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-13 13:28:06 -07:00
Henrik Brix Andersen
ee63bc4a09 tests: drivers: can: timing: do not overwrite sample point error value
Do not overwrite the sample point error value as it is printed at the
very end of the test.

Fixes: 578454b78d

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-13 13:28:06 -07:00
Hu Zhenyu
cdcfc2926f tests: drivers: adc_api: Add configuration for mec172xevb_assy6906
Enable the tests/drivers/adc/adc_api/ test for mec172xevb_assy6906
on both west and twister

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-04-12 08:55:59 -07:00
Christopher Friedt
ddf3c57a39 tests: posix: test support for pthread_attr_setstacksize
Tests for `pthread_attr_setstacksize(3)` and
`pthread_attr_getstacksize(3)`.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-04-12 22:02:04 +09:00
Erik Brockhoff
f056eb516d Bluetooth: controller: Implementing LL param checks for refactored CPR
Now refactored Connection Parameter Request procedure supports
parameter checking, and implements reject_ext_ind on invalid parameters

Updates to TODO description for remaining work

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-12 09:57:43 +02:00
Henrik Brix Andersen
4fada77953 tests: cpp: cxx: include top-level driver headers
Include (almost) all top-level driver header files to ensure error-free
C++ compilation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-12 09:55:27 +02:00
Dominik Ermel
da6a5590e8 tests/mgmt/mcumgr/smp_reassembly: Remove dependency on TINYCBOR
Removed dependency from prj.conf.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-11 12:09:28 +02:00
Lingao Meng
37e561f42e Bluetooth: Host: Add choice select whether BT RX
Change CONFIG_BT_RECV_IS_RX_THREAD into a
choice:CONFIG_BT_RECV_CONTEXT with the following options
(names can be discussed further of course):

    CONFIG_BT_RECV_BLOCKING
    CONFIG_BT_RECV_WORKQ_BT
    CONFIG_BT_RECV_WORKQ_SYS

This way users would be able to choose what to run most of
the BLE stack on, they wouldn't be forced to a single model.

We would default to CONFIG_BT_RECV_BLOCKING so that we wouldn't
need to change the system workqueue stack size by default, instead
asking users to do so if they select the CONFIG_BT_RECV_WORKQ_SYS option

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2022-04-11 10:58:09 +02:00
Mohan Kumar Kumar
2558d277e2 tests: net: tcp: Add new tests for get/set SO_SNDBUF
Test SO_SNDBUF option using getsockopt and setsockopt.

Signed-off-by: Mohan Kumar Kumar <mohankm@fb.com>
2022-04-11 10:23:31 +02:00
Mariusz Skamra
e9b40ebc69 Bluetooth: has: Satisfy profile security requirement
This enables Secure Connections pairing (actually disables legacy)
to satisfy security requirements of the Hearing Access Profile.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-04-11 10:23:13 +02:00
Henrik Brix Andersen
3e290c636e tests: drivers: can: api: check frames in test_send_receive_msgq()
Test that the received frames in test_send_receive_msgq() matches the
frames sent.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-11 10:16:49 +02:00
Mikkel Jakobsen
58c07a53cc tests: drivers: build_all: sensor: add icm42670
to ensure driver is built both with and without trigger enabled during
CI

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-04-08 15:49:08 -07:00
Yuval Peress
53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Anas Nashif
7323038129 tests: tinycrypt: fix test output
This onse single test with multiple dataset was pretending to be
multiple tests with output that is missing and causing confusion when
results get evaluated for example by twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:36:34 +02:00
Anas Nashif
31b9d32b2e tests: cpp: fix integration platforms
Do not use common integration_platforms, instead do that per scenario
and use the right platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Anas Nashif
6d15643705 tests: fix filtering on integration platforms
Fixed filtering on integration platforms.

Fixes #39738

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Anas Nashif
59dbc746ed tests: sprintf: fix integration_platforms
native_posix_64 is excluded, so it should not be an integration
platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Anas Nashif
be5fa636d3 tests: bluetooth: nrf52_bsim requires a special setup
This platform requires a special setup and has its own workflow. Do not
list it as integration platform as it violates the rule of having to be
built which is not possible due to missing environment.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Szymon Janc
218225b17a tests/bluetooth/tester: Disable EATT autoconnect
Don't autoconnect EATT as this was confusing PTS and resulted in
multiple tests failures. When needed PTS will connect EATT bearer.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-04-07 19:06:41 +02:00
Henrik Brix Andersen
203d6f16cf tests: drivers: can: add test of the can_set_state_change_callback() API
Add simple test of the can_set_state_change_callback() API. It is not
possible to trigger a change of state, but at least test the API call
with and without a callback function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-07 09:39:01 +02:00
Herman Berget
811980dc20 Bluetooth: Host: Add test for change-unaware client
Checks that the server returns "Database Out Of Sync" error on two bearers
when the client is change-unaware and returns success after the database
hash has been read.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-04-07 09:38:26 +02:00
Mariusz Skamra
29f043707f Bluetooth: tests: Add Hearing Access Service bsim tests
This extends the bsim tests with the HAS client/server and server
standalone test cases.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-04-07 09:37:53 +02:00
Lingao Meng
20ff55e234 Bluetooth: host: Optimize L2CAP resource usage
Making sure struct bt_l2cap_chan has absolutely no members related
to dynamic channels.

That way we ensure that there is no overhead for a build where only
fixed channels are used.

It's not enough that the dynamic channel-related members are put behind
ifdefs - they should be completely moved out from the struct definition.

Furthermore, the public l2cap.h header file already has a struct
that's meant to be used for dynamic channels: struct bt_l2cap_le_chan!

However, currently dynamic channel support is a mess - it's a mix
between these two structs. The bt_l2cap_le_chan struct should really
be an extension of the bt_l2cap_chan struct, i.e. the former should
contain as a member the latter.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2022-04-07 09:37:12 +02:00
Daniel DeGrasse
1b39e2ff13 tests: drivers: gpio: Remove pinmux setting on lpc for gpio_basic_api
LPC gpio driver now supports pinmux setting in gpio_pin_configure, so
remove the pinmux workaround for this platform in gpio_basic_api test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Daniel DeGrasse
4bc72144e8 tests: uart_async: Define UART loopback peripherals for LPUART
define uart peripheral that can be connected as a loopback using
external jumper for all boards this test can be run against.
Additionally, all RT boards require DMA memory to be noncacheable. Move
SRAM to DTCM for all RT10xx series boards, and to noncacheable OCRAM for
RT11xx series.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 10:03:40 -05:00
Asbjørn Sæbø
285db0dfc7 Bluetooth: Audio: Align BabbleSim simulation lengths with other tests
Use same simulation length for TBS, bass, broadcas and unicast as for
the other tests.  Simulation length must be larger than time-out
value, to give the test a chance to time out.

The time-out value have previosly been aligned for the other tests.
TBS was not done at that time, as it was still being upstreamed.
(Unsure about why bass, unicast and broadcast were not done at the
same time - they may have been in PRs).

See commits f7cd6afb79 and
73f5ffcf4e

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-04-06 11:24:12 +02:00
Henrik Brix Andersen
b5dfa3d777 test: drivers: can: canfd: clean up and document the CAN-FD test cases
Clean up (naming, formatting) the CAN-FD test cases and add proper
doxygen documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-06 11:23:12 +02:00
Henrik Brix Andersen
846142c576 tests: drivers: build_all: sensor: remove mcp2515
Remove the MCP2515 CAN controller from the build_all sensor drivers
test.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-06 11:23:06 +02:00
Henrik Brix Andersen
b71393963a tests: drivers: can: api: add build-only test for MCP2515
Add a build-only test for the Microchip MCP2515 SPI CAN controller
driver since no in-tree boards have this chip.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-06 11:23:06 +02:00
Henrik Brix Andersen
47236fbaa5 tests: drivers: can: stm32: clean up and document the CAN STM32 tests
Clean up (naming, formatting) the CAN STM32-specific test cases and add
proper doxygen documentation. No functional changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-06 11:22:57 +02:00
Krzysztof Chruscinski
0b8b1ae997 tests: logging: log_api: Extend to test LOG_OVERRIDE_LEVEL
Extended test to validate CONFIG_LOG_OVERRIDE_LEVEL
option.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-04-06 10:59:57 +02:00