Commit graph

9457 commits

Author SHA1 Message Date
Florian Grandel 79adc524cd net: l2: ieee802154: ensure L2/L3 recv package handover
Issue #53630 proved that we didn't have sufficient test coverage for
L2/L3 package handover on the RX side. This commit creates additional
test coverage to reproduce the problem found in #53630 and avoid future
regressions.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2023-01-13 13:38:03 +00:00
Pascal Brogle 7a117b620d net: lwm2m: fix observation path list ordering test
adjust test to compile with latest main code and changes by
PR #53677

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2023-01-13 14:16:52 +01:00
Pascal Brogle 6ac281887c net: lwm2m: fix observation path list ordering
under certain conditions the current implementation did not maintain
the desired sort order.

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2023-01-13 13:47:27 +01:00
Szymon Czapracki 35bd427927 Bluetooth: audio: Add configurable PACS supported contexts
Add the ability to change supported contexts in PACS.
Enhance the context command in the shell module to make it configurable.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2023-01-13 13:47:19 +01:00
Andries Kruithof 0239a2cf88 tests: Bluetooth: update unittests for Audio codecs
An LE controller shall no longer support
HCI_Read_Local_Supported_Codecs [v1]
The code in subsys/bluetooth/controller was updated for this
behaviour, and this commit updates the unittest

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-01-13 09:43:18 +01:00
Andries Kruithof 5f5f79486b tests: Bluetooth: update unittests for DF
Due to some refactoring the unittests for direction finding
started failing. This commit fixes the failing unittests

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-01-13 09:43:18 +01:00
Anas Nashif ed79b1f25e tests: use namespacing in extra_configs and drop duplicated scenarios
Use namespacing with extra_configs in some tests and remove duplicated
scenarios the were made arch or platform specifc.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-13 09:42:59 +01:00
Kevin Townsend ec3dc8c50a tests: kernel: fatal: Catch EPSR reason code
Adds a check for `K_ERR_ARM_USAGE_ILLEGAL_EPSR` as the reason code
when running this test for `CONFIG_ARMV7_M_ARMV8_M_MAINLINE`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-01-13 12:18:05 +09:00
YuLong Yao 2017ed50bf test: adc: add unit test for gd32a503v_eval
add unit test for gd32a503v_eval

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Lucas Tamborrino a64d3d388f tests: drivers: uart: uart async: Add ESP32C3 support
Add ESP32C3 support for uart async api test

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-01-12 19:09:01 +01:00
Lucas Tamborrino 41b431a01a drivers: uart: esp32c3: Add async support
Add UART async support for ESP32C3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-01-12 19:09:01 +01:00
Lucas Tamborrino e919123fd6 tests: dma: add esp32c3
Add esp32c3 support to DMA tests

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-01-12 19:09:01 +01:00
Tom Burdick b64caed8be tests: Add platform key to rtio_api test
It's enough that the rtio tests run once per each unique (arch, simulation)
platform.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-12 10:30:57 -05:00
Tom Burdick 7fba189640 tests: log_api platform key
Ensures the log_api tests only run once per unique (arch, simulator)
platform.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-12 10:30:57 -05:00
Jordan Yates d8ac658578 tests: update expected exception codes
Update expected exception codes for Cortex-M, Cortex-R and Cortex-A
CPUs.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-01-12 10:01:05 +01:00
TOKITA Hiroshi 2af7d728e2 tests: spi: spi_loopback: add interrupt and DMA tests for GD32 boards
Add interrupt and DMA tests for GD32 boards.
Use overlay-gd32-spi-interrupt.conf when testing interrupt based transfer,
use overlay-gd32-spi-dma.conf when testing DMA transfer,

Add overlay file for GD32 boards for these tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Pavel Vasilyev 69a0058578 tests: bluetooth: mesh: Add separate assert macro with message support
ASSERT_OK macro is confusing as it accepts additional arguments, but
don't use them. This commit removes the confusion by making ASSERT_OK
macro accept only one argument. An additional macro ASSERT_OK_MSG is
added that mandates a format string that will be printed and optionally
arguments for the format string.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Pavel Vasilyev abce1b9e42 tests: bluetooth: mesh: extend friend queue overflow test
Extend Friend Queue overflow test by overflow with segmented messages:
- when a segmented message is preempted by an unsegmented message;
- when a segmented message is preempted by another segmented message;

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Aleksandr Khromykh 8a58e86d42 tests: Bluetooth: Mesh: create reduced legacy configuration
mesh_shell application has been included recently some set new
abilities that added more functionality for testing.
That caused the application cannot fit in some supported plarforms
like qemu_cortex_m3. The reduced legacy configuration has been
added to fit stack into it. This platform is used in CI.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-01-11 09:39:34 +01:00
Andrei Emeltchenko 5608a80dea tests: logging: Fix wrong buf_check() parameter
After adding checking results from buf_check() fix also parameter.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Andrei Emeltchenko 2ea492e4a9 tests: logging: Add actual buf_check()
Check buf_check() results.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Andrei Emeltchenko b5fd057d90 tests: logging: Use proper type
Function cbpprintf() returns int type and may return negative error
code. Fixes static tool warnings.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Nick Ward e6f6917399 tests: drivers: build_all: pwm: add PCA9685
Add build test for PCA9685 PWM driver.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-01-11 09:38:18 +01:00
Flavio Ceolin e31f4de09e tests: obj_validation: Call setup function
The setup function for object validation test was defined
but no called.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-01-10 19:23:57 -05:00
Tom Burdick c652996c31 tests: Tag console tests with additional tags
semihost test is now tagged semihost, uart console with uart

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick 0a07d80300 tests: Tag uart tests as uart
UARTs are mostly assumed to exist in Zephyr but some hardware wishes
to exclude the tests. Adds a uart tag to the test case to ensure
ignoring is possible.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Yuval Peress aea177079d test: add icm42688 to build_all/sensor test
Add a node for the icm42688 so that it builds as a part of the CI.

Signed-off-by: Yuval Peress <peress@google.com>
2023-01-10 14:45:36 -06:00
Yuval Peress fe390776dc tests: clean up build_all/sensor
The test at tests/drivers/build_all/sensor wasn't passing since a lot
of nodes in both the i2c and spi had conflicting addresses. Fix that by
making the addresses sequential.

Signed-off-by: Yuval Peress <peress@google.com>
2023-01-10 14:45:36 -06:00
Nicolas Pitre bb3795505d tests/net/socket: fix compiler warnings
warning: format '%d' expects argument of type 'int', but argument 3
has type 'size_' {aka 'long unsigned int'} [-Wformat=]

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-01-10 09:58:01 +01:00
Sjors Hettinga 1be1b472cd net: tcp: Extend TCP receive queue timeout
After several fixes of the re-ordering logic in TCP, the receive queue
works as intended and cleans itself up properly. Previously the default
timeout was 100 ms, which pretty much disables it for real applications.

Increase the timeout to 2 seconds to actually enable it for in practice.
This should help pass much more of the Maxwell Pro tests.

This is the first step before removing the timeout completely.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-01-10 09:26:28 +01:00
Krzysztof Chruscinski b2c7c27894 Revert "test: log_output: Exclude qemu_arc_hs5x"
This reverts commit dfbfb3ff67.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-10 09:24:08 +01:00
TOKITA Hiroshi 148d205c12 test: unit: util: add BIT_MASK macros tests
Adding tests for BIT_MASK, BIT_MASK64, IS_BIT_MASK, and IS_BIT_MASK_SHIFTED

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-10 09:23:14 +01:00
Jamie McCrae de313d748a tests: mgmt: mcumgr: Add callback notification grouping test
Adds a test that check that grouped events work.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-09 17:36:04 -08:00
Jamie McCrae d6758557f5 tests: mgmt: mcumgr: os_mgmt_info: Check grouped events
Changes one of the callback register/unregister functions to use
2 events OR'd together instead of 2 events registered separately,
this is to help test that grouped events are working.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-09 17:36:04 -08:00
Chris Friedt 1f20503e46 tests: posix: common: avoid direct pthread_attr_t field access
Avoid directly accessing fields in `pthread_attr_t` and only
access / mutate them with POSIX functions.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00
Chris Friedt 7be31813da posix: sched: use newlib-compatible SCHED_RR FIFO definitions
Zephyr's `SCHED_RR` and `SCHED_FIFO` definitions were slightly
different than Newlib's. Additionally, the test had hard-coded
magic numbers instead of using symbolic values.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00
Chris Friedt ecb82784b7 posix: newlib compatible PTHREAD_CREATE_DETACHED and JOINABLE
Define `PTHREAD_CREATE_DETACHED` and
`PTHREAD_CREATE_JOINABLE` to be compatible with the Newlib
definitions.

This is a temporary workaround for #51211 until Newlib
headers are pulled in.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00
Chris Friedt 8659e2f69e libc: minimal: include: move fcntl.h to posix
The `fcntl.h` header has never been a part of ISO C so move it to
`include/zephyr/posix`.

To ensure a smooth migration, a header was left in
`lib/libc/minimal/include` that prints a deprecation warning.

Users should either include `<zephyr/posix/fcntl.h>` or switch to
`CONFIG_POSIX_API=y`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00
Chris Friedt d1e7ccec24 tests: posix: common: remove duplicate call to pthread_attr_init
There was a second call to `pthread_attr_init()` that reallly had
no sense being there. Also, it seems that there was a call to
`pthread_attr_destroy()` out of perhaps paranoia.

The duplicate call and `pthread_attr_destroy()` can be removed.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-01-10 09:02:21 +09:00
Krzysztof Chruscinski 2164511bb6 tests: drivers: uart: uart_mix_fifo_poll: Add dependency
Add gpio dependency to the test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Krzysztof Chruscinski 8931cc22df tests: drivers: uart: uart_mix_fifo_poll: Add nrf5340_cpuapp
Add configuration for nrf5340_cpuapp.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Krzysztof Chruscinski 6a7db6def9 tests: drivers: uart: Align nrf52840dk configuration
Align configuration for nrf52840dk to use the same loopback pins
for uart_async_api and uart_mix_fifo_poll tests.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Krzysztof Chruscinski f33765dec5 tests: drivers: uart: uart_async_api: Add nrf5340_cpuapp
Add configuration for nrf5340_cpuapp.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Keith Packard 8c462bff02 subsys/rtio: Add libc partition for usermode API test
When a libc partition exists, all user mode threads will need access to
libc variables. Add the libc partition in this test case to allow that.

This was detected by running the test on ARM32 with thread local storage
enabled as that uses z_arm_tls_ptr which is included in the libc partition.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-09 19:19:57 +01:00
Emil Gydesen a9071b361f Bluetooth: Audio: Add missing codec debug Kconfig
Add misisng codec debug Kconfig for the codec.c file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-09 15:27:28 +00:00
Henrik Brix Andersen 11aa8454f0 Revert "random: Change testing random generator"
This reverts commit d6881de3b3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-09 19:29:50 +09:00
Declan Snyder d6881de3b3 random: Change testing random generator
The old random timer test was not random-looking
enough on some platforms.

Replace with new test which is psuedo-xoshiro.

The generator is still deterministic
and does not depend on entropy at all,
but should look more random for testing.

Change name of generator tree-wide also.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-09 10:16:55 +01:00
Guillaume Gautier 45b0804550 tests: drivers: counter: counter_basic_api: src: Fix STM32 RTC device
Commit fd65800 introduced a regression for the counter_basic_api test for
STM32 by using a Silabs Gecko Kconfig to enable the STM32 RTC.
This commit uses the proper STM32 Kconfig for the RTC instead.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-09 10:14:06 +01:00
Daniel DeGrasse a3f2d2bbde tests: drivers: adc: add support for RT595 to ADC API test
Enable support for RT595 in ADC API testcase

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-08 19:48:54 +01:00
Erik Brockhoff 2f61771948 Bluetooth: controller: consider host ctrl feature bits in feat exchange
Host controlled feature bits were not considered in feature exchange
procedure. This is fixed.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2023-01-08 19:48:38 +01:00