Commit graph

7315 commits

Author SHA1 Message Date
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
Emil Gydesen d5ffea0e8d sys: util: Add IN_RANGE macro
Add the IN_RANGE macro which returns true if a value is
within a supplied range of values (inclusive).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-11 07:20:16 -06:00
Pavel Vasilyev 30cd0d4338 tests: Bluetooth: Mesh: Throw error code from tx_end to caller
Return error code from tx_end callback to bt_mesh_test_send caller. This
will help to understand where test failed.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-03-11 11:00:30 +01:00
Pavel Vasilyev 8a3f3dc49b tests: Bluetooth: Mesh: Don't fail inside bt_mesh_test_recv
Don't fail inside bt_mesh_test_recv, but return error code instead.
Caller shall check error code and fail.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-03-11 11:00:30 +01:00
Pavel Vasilyev 672f116c6a tests: Bluetooth: Mesh: Don't start provisioning until provisioner ready
Don't start provisioning devices until provisioner is ready.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-03-11 11:00:30 +01:00
Bernardo Perez Priego 9964414655 include/devicetree.h: Add DT_STRING_TOKEN_OR macro
This macro expands to DT_STRING_TOKEN if property exists, otherwise
falls back to default value.
Helpful when a non-required enum binding doesn't mention a default
value, but a default value makes sense to be set in the code.

Including DT_INST_STRING_TOKEN_OR and test code.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-03-10 19:42:59 -08:00
Pavel Vasilyev 8ef6b7681f tests: bluetooth: mesh_shell: Increase main thread stack size
Increase main thread stack size so that the sample can be run on
nrf52832 and nrf52840 DKs.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-03-10 14:31:03 -05:00
Emil Gydesen 0d719ba893 Bluetooth: Audio: Add endpoint type to capabilities config cb
The capabilities callback did not provide information about
the type of the endpoint being configured, making it
impossible for the application to determine if it is a
sink or source endpoint.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:07:17 -05:00
Emil Gydesen b880637231 Bluetooth: Audio: Remove bidirectional audio streams
Audio streams as defined by the BAP spec does not
support bidirectional audio streams. This commit
updates the API and implementation to match that.

The use a bidirectional CIS with 2 audio stream will
be added in a future commit.

This removes the _IN_ and _OUT_ and _INOUT_ QOS
values, as well as the direction of the codec QOS
struct.

To keep direction for internal use, the direction
has been added to the endpoint struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:07:17 -05:00
Emil Gydesen a1395c17a3 Bluetooth: Audio: Add BASS BSIM tests
Add the BASS babbleism tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:06:44 -05:00
Emil Gydesen 956518a33b Bluetooth: Audio: Add BASS client shell
Add the BASS client shell module.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:06:44 -05:00