Commit Graph

7970 Commits

Author SHA1 Message Date
Guo Lixin
4c3b7f3785 tests: kernel: sys_event: move to new ztest API
Move tests/kernel/events/sys_event/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 09:52:49 -04:00
Guo Lixin
31cc0a20af tests: kernel: event_api: move to new ztest API
Move tests/kernel/events/event_api/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 09:52:49 -04:00
Shaoan Li
813ee43c81 tests: arch: arm: move test arm_irq_vector_table to new ztest API
Migrate the testsuite tests/arch/arm/arm_irq_vector_table to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-05 12:18:08 +00:00
NingX Zhao
aa49e988ce tests: ipc: move to new ztest api
Move tests/subsys/ipc to new ztest API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-07-05 12:17:47 +00:00
Xiao Song
3e40c590f8 tests: net: all: move to new ztest API
Move tests/net/all/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-07-05 12:17:32 +00:00
Xiao Song
257717ce83 tests: net: 6lo: move to new ztest API
Move tests/net/6lo/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-07-05 12:17:19 +00:00
Kumar Gala
e1ec648124 tests: adc_emul: Convert test to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-05 12:26:28 +02:00
Kumar Gala
a50f118f0e tests: adc_dma: Convert test to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-05 12:26:28 +02:00
Kumar Gala
7022eb05e4 tests: adc_api: Convert test to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-05 12:26:28 +02:00
Mariusz Skamra
a36d64b8d8 Bluetooth: att: Fix EATT channel security requirements
Core Vol 3, Part G, Section 5.3.2 Channel Requirements states that
"The channel shall be encrypted". It does not mention any additional
security requirements that can be specified bt higher layer profiles.
This enables link encryption requirement for EATT channel.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-07-05 12:19:07 +02:00
Xiao Song
2c8841ac02 tests: net: buf: move to new ztest API
Move tests/net/buf/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-07-05 10:08:09 +02:00
Andrei Emeltchenko
669b02af8c tests: ringbuffer: Make code consistent
Refactor code to make it consistent and easier to read.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-07-04 22:25:03 +00:00
Andrei Emeltchenko
a8cb2b74f3 tests: ringbuffer: Use defined req_len
Fixes "stored and never read" warning.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-07-04 22:25:03 +00:00
Andrei Emeltchenko
ef6f4db7e0 tests: ringbuffer: Remove unneeded variable
Remove dead code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-07-04 22:25:03 +00:00
Christopher Friedt
e08f84ab0b tests: lib: c_libc: tests for strerror, strerror_r
Add tests for strerror() and strerror_r()

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-04 22:53:36 +02:00
Yuval Peress
e9e030f56b ztest: Add zassume* API
Add an assume API which works like JUnit's. Assumptions can be made
at any point before your test returns (setup, before, and during the
test). If an assumption fails, the test will be marked as skipped.

This helps avoid a cascading affect of failed tests when a base
feature breaks. The feature is expected to have tests and the tests
which depend on it should be skipped (not failed) if that feature
is broken.

Issue #42472

Signed-off-by: Yuval Peress <peress@google.com>
2022-07-04 14:16:34 -04:00
Francois Ramu
01909a21f8 tests: drivers: dac loopback testcase for nucleo g071rb
Running the testcase dac loopback on the nucleo_g071rb
target board.
The ADC1 in0 on PA0 (pin A0), the DAC1 out1 on PA4 (pin A2)
must be connected on the HW.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-04 17:32:10 +00:00
Alexandre Duchesne
b4034adec7 hal: gigadevice: Update gd32f4xx to firmware 3.0.0
Fix to support gd32f4xx update to firmware 3.0.0

Signed-off-by: Alexandre Duchesne <alexandre.duchesne@rtone.fr>
2022-07-04 18:07:51 +02:00
Carles Cufi
fb9ca7c392 tests: log: stress: Adapt to logging API changes
This test was merged before having re-run CI, and some logging API
changes had happened since CI was last run.
Adapt to those to fix the build.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-07-04 17:59:34 +02:00
Keith Packard
9e698468ce tests/arm64: Run high_addr tests using picolibc
Picolibc enables TLS, which causes relocation errors with some of these
tests without changing the compiler code model.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-07-04 15:42:53 +00:00
Krzysztof Chruscinski
e4bd0fceef logging: Allow for compilation without log_output
Add option to Kconfig to enable log_output module. It is used
by most of the backends but it is an optional formatter helper
thus it is possible to run logging without it. One example might
be dictionary based logging which does not format log message
to a readable string.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-04 16:43:32 +02:00
Thomas Stranger
33eba217de tests/drivers/clock_control: stm32_common_devices: add adc alt. clk. src
This commit adds a test case that configures an alternative clock source
for an ADC peripheral.

In case no alt clock is available, only the gating clock is enabled
and disabled.
Unlike the i2c and lptim test, the actual gating clock frequency is
not checked, because for the adc there seems to be no uniform way
to retrieve the frequency via the hal.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
a6f4d604b6 tests/drivers/clock_control: stm32 add adc-pll_p overlays(g0,g4,wl)
For the STM32G0, STM32G4, and STM32WL enable the adc node in one
configuration, and select the PLL_P output as its clock source.
PLL_P divider is chosen to be 20 to make sure it's a unique frequency.
- g0, and g4 have pll as sysclk
- wl has hse as sysclock

The test configurations and the overlay-files are renamed accordingly.
All overlays that don't specify an alternative clock source still
make sure that the adc node is "okay" to be able to perform basic test.
The basic test only turns on and off the gate clock without checking the
frequency.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
1feaea34aa tests/drivers/clock_control: stm32_common_devices: lptim check disabled
The test checks if the peripheral gating clock was correctly disabled
after the test, but accidentally the I2C_CLK was checked instead of the
LPTIM_CLK.

This commit fixes this by using __HAL_RCC_LPTIM1_IS_CLK_ENABLED instead.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
fd49f4df1b tests: drivers: clock_control: stm32_wl fix external clock dts
The nucleo_wl55jc according to the datasheet does have a
NT2016SF-32M-END5875A 32MHz TCXO as HSE, therefore needs
enable the "hse-tcxo;" property to work, this was not the case
for the clock_configuration/stm32_common_devices test cases.

Additionally, remove the comment about about ST-Link clock,
because the source is the tcxo and not the ST-Link.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Hake Huang
3051ba19f0 tests: counter: disable driver debug message
to avoid log log in test report, disable driver debug message

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-07-04 16:21:02 +02:00
Keith Packard
fb1d092955 tests: ec_host_cmd: Make sure expected_dut_to_host fits in buffer
If struct tx_structure is too large than the buffer that
expected_dut_to_host references, leading the compiler to generate a warning
about the possibility of buffer overflow.

Leave out the 'struct ec_response_too_big' so that 'struct tx_structure'
fits within the 256 byte buffer.

This was caught when using GCC 11.3.0 building the test for native_posix.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-07-04 16:11:51 +02:00
TOKITA Hiroshi
8e330cfcd6 tests: exclude arduion_mkrzero from uart_async and spi_loopback tests
uart_async test and spi_loopback test require UART and SPI
with an ASYNC option.
The SAM0 UART/SPI driver requires configuring DMA support.
Arduino MKRZero is not DMA configured like other SAM0 boards.
We exclude it from the tests.

ea36f9b and f4c5bdf already exclude other SAM0 boards from these tests.
Arduino MKRZero also followed these PR policies.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-07-04 16:00:56 +02:00
Emil Gydesen
2071c66249 Bluetooth: Audio: Disable HAS when unicast_server is disabled
The HAS depends on the unicast server, and should be
disabled in the `no_unicast_server` as well as depend
on the CONFIG_BT_AUDIO_UNICAST_SERVER config.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-04 15:59:09 +02:00
Emil Gydesen
bb6c0866d8 Bluetooth: Audio: Add PACS for broadcast sink
Add support for using PACS and/or capabilities for
the broadcast sink role. PACS and capabilities were
originally only supported for the unicast server
role, so the PACS callbacks were moved their own
struct, as if a device supports both the unicast
server role and the broadcast sink role, it will
only have a single PACS instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-04 15:59:09 +02:00
Tristan Honscheid
79fcb6ab43 ztest API Migration: bluetooth/ll_settings
Migrate the unit tests at `bluetooth/ll_settings` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:58:02 +02:00
Tristan Honscheid
074a46adb3 ztest API Migration: bluetooth/init
Migrate the unit tests at `bluetooth/init` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:57:50 +02:00
Tristan Honscheid
84f39cf4a6 ztest API Migration: bluetooth/hci_prop_evt
Migrate the unit tests at `bluetooth/hci_prop_evt` to use the
new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:57:34 +02:00
Tristan Honscheid
4ea68e4604 ztest API Migration: bluetooth/hci_codecs_info
Migrate the unit tests at `bluetooth/hci_codecs_info` to use
the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:57:20 +02:00
Tristan Honscheid
d76da3ee94 ztest API Migration: bluetooth/ctrl_user_ext
Migrate the unit tests at `bluetooth/ctrl_user_ext` to
use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:56:24 +02:00
Tristan Honscheid
144d11e539 ztest API Migration: bluetooth/ctrl_sw_privacy_unit
Migrate the unit tests at `bluetooth/ctrl_sw_privacy_unit` to
use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:56:08 +02:00
Tristan Honscheid
8b76ea680f ztest API Migration: bluetooth/bluetooth
Migrate the unit tests at `bluetooth/bluetooth` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:54:11 +02:00
Tristan Honscheid
24845d56ce ztest API Migration: bluetooth/ctrl_sw_privacy
Migrate the unit tests at `bluetooth/ctrl_sw_privacy` to use
the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-04 15:53:37 +02:00
Krzysztof Chruscinski
1125e39797 tests: logging: Add stress test
Add stress test for logging to validate that logging is coherent:
All message are processed by the logger or dropped and no message
is lost.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-04 15:50:53 +02:00
Krzysztof Chruscinski
e4bfec8100 logging: Use spin lock
Updated log_core to use spin lock instead of irq_lock.
Refactored z_log_msg_post_finalize function.

Update thresholds in the log_stack test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-04 15:50:53 +02:00
Sahaj Sarup
9320dc7921 board: arm: Add support for Black Pill V1.2 F401CC
Changes:

 - Copied over board files for blackpill_f401ce
 - Changed appropriate soc dtsi from stm32f401Xe.dtsi to stm32f401Xc.dtsi
 - Replaced any instance of F401CE to F401CC
 - Added blackpill_401cc to adc test

In essense the blackpill_f401ce and blackpill_f401cc are the exact
same boards,
the f401cc variant of the stm32 mcu has lesser sram and flash than
the f401ce.

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2022-07-04 15:46:03 +02:00
Daniel DeGrasse
21b8d1c8e0 tests: drivers: disk: Add disk performance test
Add disk performance test, to report performance of disk devices. This
test reports performance for single sector R/W, sequential read/writes,
and an IOPS score based on random 512 byte reads and writes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-07-04 15:45:47 +02:00
Daniel DeGrasse
809f8a9380 tests: drivers: disk: rename disk driver test to disk_access
Rename disk driver test to disk_access, as multiple disk tests exist.
Disk access test is intended to verify disk functionality.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-07-04 15:45:47 +02:00
TLIG Dhaou
933bd0e55a tests: drivers: clock_control: stm32_clock_configuartion add testcases
Add testcases when hsi used with the hsi div as system clock source.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-07-04 15:20:06 +02:00
Øyvind Rønningstad
c1a9866c86 west.yml: Update zcbor to v. 0.5.1
lwm2m: Regenerate lwm2m_senml code from the CDDL description.
Reapply manual changes.
Create a sh script to perform the regeneration.

tests: zcbor_bulk: Adapt to zcbor 0.5.1
zcbor_new_decode_state() now has no return value.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-07-04 15:13:42 +02:00
Guo Lixin
213eaeee79 tests: kernel: spinlock: move to new ztest API
Move test to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-04 06:54:31 -04:00
Jordan Yates
5407b54d2b tests: storage: flash_map: test disabled flash device
Add a test for `fixed-partition` nodes that exist on a disabled flash
device.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-04 10:28:41 +02:00
Reto Schneider
7a6c5710ff cmake: Update cmake_minimum_required to 3.20.0
As Zephyr currently requires CMake version 3.20.0, update all
occurrences of cmake_minimum_required.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-04 10:18:45 +02:00
Jordan Yates
b8a2d2724a tests: storage: flash_map: close flash area
Close the flash_area at the end of individual tests to demonstrate
correct usage of the API.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Jordan Yates
4543f82c12 storage: flash_map: remove device_get_binding
Remove all usage of `device_get_binding` in the subsys by directly
storing the `const struct device*` in the `struct flash_area`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00