Commit Graph

7325 Commits

Author SHA1 Message Date
Nirosharn Amarasinghe 3cdaf72d9d bluetooth: controller: Add ISO-AL TX unframed fragmentation
- Implemented ISO-AL TX interface functions for fragmentation of
  unframed PDUs
- Implemented ISO-AL source construct and its creation for an input
  data path

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2022-03-21 19:03:56 +01:00
Dominik Ermel a99118d140 tests/mgmt/mcumgr/smp_reassembly: Unit tests for re-assembly
The commit adds unit tests for SMP packet re-assembly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-21 18:03:18 +01:00
Robert Lubos 7cd3740135 tests: drivers: modem: Increase minimum RAM requirement for test
The actual RAM consumption of the general test case is higher then the
minimum RAM requirement specified by the test, therefore it fails with
RAM overflow for certain platforms (nrf52dk_nrf52832 for example).

Increase the minimum RAM required by the test to reflect the actual
state.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-03-21 15:27:48 +01:00
Gerard Marull-Paretas 31f0610edc tests: drivers: uart: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas 18859fe6ff tests: drivers: i2s: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Vinayak Kariappa Chettimada 9b7fb70539 tests: Bluetooth: bsim: Use non-zero SID to catch regressions
Use non-zero SID value so that regressions in use of
Periodic Advertiser List implementation is catch in
testing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-21 12:49:45 +01:00
Nicolas Pitre ce8dabfe9e riscv: implement arch_switch()
The move to arch_switch() is a prerequisite for SMP support.

Make it optimal without the need for an ECALL roundtrip on every
context switch. Performance numbers from tests/benchmarks/sched:

Before:
unpend  107 ready  102 switch  188 pend  218 tot  615 (avg  615)

After:
unpend  107 ready  102 switch  170 pend  217 tot  596 (avg  595)

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-03-21 07:28:05 -04:00
Szymon Janc e932564f3a tests/bluetooth/tester: Enable security validation for GATT subsciption
This was affecting following qualification test cases:
GAP/SEC/SEM/BV-56-C
GAP/SEC/SEM/BV-57-C
GAP/SEC/SEM/BV-58-C
GAP/SEC/SEM/BV-59-C
GAP/SEC/SEM/BV-60-C
GAP/SEC/SEM/BV-61-C

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-03-21 10:14:53 +01:00
Mariusz Skamra 09b2fe1893 Bluetooth: shell: Add Hearing Access Service
Add Hearing Access Service to Bluetooth shell application.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-21 10:14:15 +01:00
Henrik Brix Andersen 67ba9900f0 drivers: can: add struct device argument to callback functions
Include a pointer to the CAN controller device for the CAN
transmit, receive, and state change callback functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-19 14:31:22 -04:00
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Hake Huang 3b576fc688 tests: dma: fix loopback suspend and resume issue
update dma loop test to resolve call sequence issue,
and avoid randum failure due to
dma finished fast than the dma status check. which cause suspend fails.

fixing #43739

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-18 12:14:05 -04:00
Anas Nashif 97af0c8c33 tests: remove subsys prefix from test identifier
No need for subsys, the subsystem is expected to be the first component
of the identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-03-18 10:50:57 -04:00
Hake Huang 574e166e13 test: portability.posix.common.newlib: exclude lpcxpresso55s06
exclude newlib for posix testing as the MAX_HEAP_SIZE will be
too small if enabled NEWLIBC

fixing: #43873

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-17 20:47:47 -04:00
Flavio Ceolin 97116a5a84 tests: Increase timeout for some tests
There are tests failing sometimes due timeouts in simulators, slightly
increase the default timeout for these cases.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-17 17:31:00 -04:00
Alperen Sener 7dd34ce458 tests: Bluetooth: Mesh: Test secure network beacon intervals
Add tests checking that secure network beacon interval cannot be
less than 10s and not more than 600s for a provisioned node.

Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no>
2022-03-17 11:36:41 +01:00
Sylvio Alves ddf88c6b99 tests: kernel: context: add esp32c3 irq value
Allow esp32c3 soc to proper execute this kernel test.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-03-17 11:33:36 +01:00
Robert Lubos cea2c8de3d tests: net: socket: Add getpeername() tests
Add tests for new getpeername() function.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-03-16 16:23:16 +01:00
Gerard Marull-Paretas 1add69b5c3 tests: pm: policy_api: test latency change callback
Test that we get notified correctly when latency requirements change.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Gerard Marull-Paretas 9f355c73bc tests: pm: policy_api: test latency API
Add a new tests that checks the behavior of the policy when latency
requirements are imposed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Gerard Marull-Paretas 8714154338 tests: pm: policy_api: check status lock behavior
Test that policy manager behavior is correct when allowing/forbidding
certain states.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Gerard Marull-Paretas 22fe2142f0 pm: policy: use DEFAULT/CUSTOM naming
The residency policy, is in reality, influences by other parameters for
example constraints. It has been renamed to "DEFAULT" policy to make it
more general. The "APP" policy has been renamed to "CUSTOM" to better
represent its purpose.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Mikkel Jakobsen f3f9966b8b tests: drivers: build_all: sensor: add icm42605 to own trigger build
to ensure trigger related source code is also build in CI

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-03-16 08:58:06 -05:00
Tomasz Bursztyka 521c9d13fb pm: constify all device instances
Run cocci script to constify device instances.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2022-03-16 12:33:12 +01:00
Tomasz Bursztyka c94b341a54 tests: constify all device instances
Run cocci script to constify device instances.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2022-03-16 12:33:12 +01:00
Stephanos Ioannidis d75f00a513 tests: cmsis_dsp: matrix: Disable FP16 tests for POSIX arch
This commit disables the half-precision floating-point (FP16) tests for
the POSIX arch, because the `__fp16` type is not supported on the x86
host, which is the most common host type for the POSIX arch.

Note that the FP16 tests can technically run on the POSIX arch if the
host type is AArch64; but, since we do not have a proper configuration
scheme to resolve the host type for the POSIX arch at this time, we
simply disable these tests completely for the POSIX arch.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-03-16 07:32:19 -04:00
Stephanos Ioannidis 5040255cf9 tests: cmsis_dsp: transform: Disable FP16 tests for POSIX arch
This commit disables the half-precision floating-point (FP16) tests for
the POSIX arch, because the `__fp16` type is not supported on the x86
host, which is the most common host type for the POSIX arch.

Note that the FP16 tests can technically run on the POSIX arch if the
host type is AArch64; but, since we do not have a proper configuration
scheme to resolve the host type for the POSIX arch at this time, we
simply disable these tests completely for the POSIX arch.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-03-16 07:32:19 -04:00
Mariusz Skamra 145948efa0 Bluetooth: audio: Remove BT_CODEC_META_CONTEXT_* defines
There are no more context defines specific to metadata, the ones
coming from Assigned Numbers shall be used.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-16 10:25:31 +01:00
Henrik Brix Andersen 5e8399f84b devicetree: add devicetree/can.h
This contains accessor macros for getting the maximum bitrate supported
by a CAN controller/transceiver combination.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Krzysztof Chruscinski 2306a97527 tests: Remove limitation from ztress and ring_buffer tests
Test were executed on single CPU only and with qemu_cortex_a9
excluded. Removing those limitations after fixes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-15 13:19:28 -04:00
Krzysztof Chruscinski 19ea3a6416 tests: ztest: ztress: Relax timing requirements in the test
Seen failures on some platforms. No harm to relax the
check for test timeout.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-15 13:19:28 -04:00
Gerard Marull-Paretas 648d71674f tests: drivers: build_all: gpio: enable pca95xx
The pca95xx driver was not compiled, add it to the list.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-15 09:39:45 -07:00
Yong Cong Sin 4bcd33bb35 tests: net: all: Add shell MQTT backend
Test the compilation of shell MQTT backend.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-03-15 10:01:12 +01:00
Nicolas Pitre 4f417940ca tests: dynamic_thread: no need to exclude x86 anymore
The heap allocator does honor alignment needs now.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-03-14 19:18:34 -04:00
Nicolas Pitre 6d4e3dd611 tests: dynamic_thread: fix test_thread_index_management
This test was working by accident onarm64 and riscv64. Those
architectures have large register files, even more so considering
their 64-bit nature.

This test works by calling k_object_alloc(K_OBJ_THREAD) until thread
index exhaustion. However here it exhausted heap memory before running
out of thread indexes. There was a test to make sure that wasn't the
case by attempting a k_malloc(256). But here that succeeded just
because 256 is far smaller than a struct k_thread on the above
architectures.

Fix this by:

- attempting an additional allocation with the actual object size
  instead of an arbitrary 256 bites
- increasing the heap size as 8192 was clearly insufficient for the
  above platforms.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-03-14 19:18:34 -04:00
Krzysztof Chruscinski 3dc12753ff tests: logging: log_api: Extend with frontend feature
Extend test to check also frontend feature.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 14:08:49 -04:00
Krzysztof Chruscinski 92fb1af09a tests: logging: log_api: Fix test cases setup
Execute log_setup even when test is skipped. This is especially
vital when test infrastructure is using logging (e.g. LOG_PRINT
is enabled).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 14:08:49 -04:00
Krzysztof Chruscinski 89a3b4eee0 tests: logging: log_stack: Align stack usage numbers
Align stack usage for riscv64 smp case.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 10:53:40 -04:00
Thomas Ebert Hansen 7f4471c84e Bluetooth: controller: Rename local proc ctx config
Rename
BT_CTLR_LLCP_PROC_CTX_BUF_NUM
to
BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
to match naming scheme of
BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-03-14 11:38:09 +01:00
Thomas Ebert Hansen 33cb9e3433 Bluetooth: controller: Add remote proc ctx pool
Add a separate procedure context pool for remote initiated procedures.
Make it configurable in size by BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM.
Fix all unit tests referring to the amount of free context buffers.

Fixes #41823

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-03-14 11:38:09 +01:00
Henrik Brix Andersen 26e95fac28 tests: drivers: can: timing: convert to the new ztest framework
Convert the CAN timing test to the new ztest framework. Restructure the
tests a bit to improve code readability and add doxygen documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-14 11:29:30 +01:00
Krzysztof Chruscinski d00f9e8774 tests: lib: cbprintf_package: Add test for CBPRINTF_MUST_RUNTIME_PACKAGE
Add test for CBPRINTF_MUST_RUNTIME_PACKAGE macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 11:16:14 +01:00
Krzysztof Chruscinski ca9002535d tests: unit: cbprintf: Align test to changes in cbprintf
Aligned tests to handle the fact that static packaging return
error when detects read-write string and storing read-write
positions is not enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 11:16:14 +01:00
Krzysztof Chruscinski d45d2619ce tests: lib: cbprintf_packaged: Extend test to check new modes
Extended test to check new flags added to cbprintf packaging API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 11:16:14 +01:00
Krzysztof Chruscinski c917e6c2ce lib: os: cbprintf: Extend API to support new packaging modes
Added new flags to packaging API:
- CBPRINTF_PACKAGE_ADD_RO_STR_IDXS - when set, read-only string
  locations are appended to the package
- CBPRINTF_PACKAGE_ADD_RW_STR_IDXS - when set, read-write string
  locations are appended to the package (instead of appending actual
  strings)
- CBPRINTF_PACKAGE_FIRST_RO_STR_CNT(n) - indicate that n first strings
  are known to be read only. Ignored in runtime packaging.

Add function for copying packages with optional appending strings.

Changed CBPRINTF_MUST_RUNTIME_PACKAGE to use same flags as packaging.

Aligned logging and test to those changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-03-14 11:16:14 +01:00
Gerard Marull-Paretas 1766ac5cfa tests: drivers: entropy: api: use DEVICE_DT_GET
Obtain a reference to the chosen entropy device at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-11 15:27:05 -08:00
Gerard Marull-Paretas 9a02676d9e tests: drivers: clock_control: nrf_onoff_and_bt: use DEVICE_DT_GET
Use DEVICE_DT_GET to obtain a reference to the chosen entropy device.
The device is now global, and readiness is checked at the test setup
fixture.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-11 15:27:05 -08:00
Emil Gydesen 18466530ab Bluetooth: PACS: Refactor PAC location read/write
Refactor the PAC location read and write. Instead
of storing the location in the service, the
location is now stored in the application, and
is retrieved by the service via callbacks.

Similarly, if a client writes the location, this
request is being sent to the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-11 11:36:19 -08:00
Marcin Szkudlinski 2a0ee8c920 lib/os: Add metadata to heap in multi_heap
When operating on different kinds of heaps sometimes there's a need to
perform special operations on heap, poweroff memory bank when releasing
memory etc. Therefore some additional data may be required.
Metadata is a point to keep such data.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-03-11 13:56:05 -05:00
Tom Burdick 3ab10f2d52 sys_util: wait_for, spin on an expression
Hardware has asynchronous actions where the expectation is to spin on
registers and expressions against those registers for completion of the
action. This provides a common macro to spin, with a delay and timeout,
on such expressions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-11 09:46:47 -05:00