Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When thread local storage is enabled, log_core_additional generates stack
overflows in the main thread on several architectures. Increase the stack
size to 4096 bytes for this thread.
Signed-off-by: Keith Packard <keithp@keithp.com>
The limiting factor is the output bitmask that says which elements have
been filled in by the parser. This patch changes the bitmask type from int
to int64_t.
Signed-off-by: Björn Stenberg <bjorn@haxx.se>
Tune quantum parameter for selected kernel tests
targetting the HiFive Unleashed platform.
Those tests require higher fidelity of the virtual
time flow which is achievable on multi-core platforms
in Renode by reducing the quantum.
Signed-off-by: Jan Malek <jmalek@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.
Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.
The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Use the CAN controller driver capabilities to determine if the CAN-FD
timing tests should be skipped or not. There is no need for special
handling of CONFIG_CAN_FD_MODE.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add a test case that schedules a set of consecutive timeouts,
each one on the next cycle of the system timer but each time
after a slightly larger delay.
This test case reveals a problem in the current nrf_rtc_timer
implementation that sometimes a compare value can be missed
what leads to timeouts delayed by 512 seconds.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
With lazy FPU context switching, k_float_disable() is merely triggering
a synchronous FPU context save and k_float_enable() is a no-op.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Fix filter accept list and privacy feature Kconfig default
based on whether host has them enabled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
As we are now compiling in parallel all apps, build errors
are not anymore next to the compile line, so let's tell
developers for app we are printing the build output
to ease debugging.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases. Some newer tests are missing:
filter: TOOLCHAIN_HAS_NEWLIB == 1
so add that to testcases that needed.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
To be able to timely start the first CIS/CIG, if the requested instant
is the next connection event, call ull_peripheral_iso_start directly
from rp_cc_state_wait_rx_cis_ind instead of waiting for next time
through the state machine.
To enable ULL/LLL to prevent adding latency when LLCP is waiting for
instant, local- and remote procedures with instant now expose a function
for checking this state.
Fixed event_counter function to prevent one-off in RX path. Unified to
use single function ull_conn_event_counter.
Fixed LLCP unit tests and added new mock function.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Add test where privacy is enabled and where
the two devices are bonded and have exchanged IRK
before doing the periodic advertising sync.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Expand the periodic advertising tests with connections,
to verify that two devices can simultaneously be connected
and keep a periodic advertising sync.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a test suite exclusively for testing
periodic advertising sync.
The first test added is a simple test that does a periodic
advertising sync, and passes afterwards.
The test suite will be expanded with testing PA syncs
with PAST (both from remote and local transfer) as well
as privacy handling.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add the overlays usage for bsim mesh configurations instead of
multiple configurations that duplicate each other a lot.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Validate the powered state and transitions for an arbitrary device
hanging off a power domain.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Ensures that the documented behavior of the API is met by implementations
through testing. By calling stop on a stopped channel the expectation is no
error occurs and is checked.
Calling start after a channel has been started is difficult to test for
as there is transfer timing involved. A once shot transfer may have
completed and the channel transition to an inactive state by itself by
the time the second start call is performed. This isn't supported by at
least gpdma today and isn't documented behaviorally so should not be
tested.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Currently, the s32z270dc2_r52 board only supports running on RAM,
so samples or tests watchdogs that perform SoC reset will not produce
results. Set the build only for these samples and tests until the
reset SoC function is supported.
Signed-off-by: Quang Bui Trong <quang.buitrong@nxp.com>
Add a trivial suite that simply ensures headers exist and that
they supply standard symbols and constants.
These tests are intended to be ordered exactly as the respective
feature appears in the respective specification at
https://pubs.opengroup.org/onlinepubs/9699919799
Over time, as POSIX support improves, we can enable additional
checks.
If `CONFIG_POSIX_API=n`, then we simply ensure that the header
can be included, that constants and structures exist, including
the existence of required fields in each structure.
We check that a constant exist, by comparing its value against
an arbitrary number. If the constant does not exist, it would
of course be a compile error.
```
zassert_not_equal(-1, POLLIN);
```
We check that a structure contains required fields by
comparing the field offset with an arbitrary number. If
the field does not exist, of course, there would be a
compile error.
```
zassert_not_equal(-1, offsetof(struct pollfd, fd));
```
For non-scalar constants, we simply attempt to assign
a value to the specific type:
```
struct in6_addr any6 = IN6ADDR_ANY_INIT;
```
If `CONFIG_POSIX_API=y`, then we additionally check that required
functions are non-NULL (limited to what is currently supported in
Zephyr).
```
zassert_not_null(pthread_create);
```
Note: functional verification tests should be done outside of this
test suite.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.
Use the STM32_DMA_PERIPH_TX or STM32_DMA_PERIPH_RX value.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Filtering used image_1_nonsecure as DTS node label, while correct
one is slot1_ns_partition.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit introduces Volume Control Profile and
Immediate Alert Service into btp.
VCP includes:
Audio Input Control Service
Volume Control Service
Volume Offset Control Service
Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Update the unittests for feature exchange to use the new ZTEST API
Here we only update the feature exchange procedure. The remaining
unittests will be done in a next PR
Mocks, helper routines and the Unit Under Test are splitted out as
a library instead of adding them to the file list
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Use the maximum data PDU size time reservation space
considering the Data length could be updated from default
27 bytes to maximum support size.
If maximum time reservation is disabled then time space
reservation corresponding to the default data length at the
time of the start/enable of Central role is used.
Note, currently this value is only used to space multiple central
connections and not for actual ticker time reservations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix connection parameter request procedure to be cacheable
if a remote control procedure is in progress.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When the toolchain has picolibc support, run
samples/subsys/cpp/cpp_synchronization and tests/subsys/cpp/libcxx tests
using it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix the controller implementation to perform connection
event length reservation based on the completed Data Length
Update and/or PHY Update Procedure.
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Enable RT1060 target API test for RT1060. The LPI2C does not support
dual controller/target operation, so LPI2C3 is used as the controller
while LPI2C1 implements the target device.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add option to disable CRC for fcb entries. This improves the write
throughput significantly at the cost of not detecting corrupted data
in flash. This is beneficial for aplications that needs the extra
write throughput, where error detection is done elsewhere.
Allow the FCB entries in flash to have a valid CRC when CRC is
disabled in the FCB. This allows existing solutions to disable
CRC checking, while keeping the CRC areas intact. Note that this
is a one-way option.
Fixes#53707
Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Allow the streams to be paired when creating unicast group. This will
allow to reuse the same ISO for the paired streams.
Fixes: #51796
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
After the dbe3874079 - (tests: kernel/smp: wait for threads to exits
between tests) I've started seeing sporadic kernel.multiprocessing.smp
test failures on our platforms.
------------------------------->8---------------------------------
[*snip*]
===================================================================
START - test_fatal_on_smp
E: r0: 0x3 r1: 0x0 r2: 0x0 r3: 0x0
E: r4: 0x80000194 r5: 0x0 r6: 0x0 r7: 0x0
E: r8: 0x800079c4 r9: 0x82802 r10: 0x80008d8c r11: 0x8000dad8
E: r0: 0x3 r1: 0x2712 r2: 0x114 r3: 0x0
E: r4: 0xf4240000 r5: 0x0 r6: 0xf424 r7: 0xbe40
E: r8: 0x2540 r9: 0x0 r10: 0x80008d8c r11: 0x8000db8c
E: r12: 0x8000ddf0 r13: 0x0 pc: 0x80000aec
E: blink: 0x80000ae6 status32: 0x80082002
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Current thread: 0x8000db8c (test_fatal_on_smp)
E: r12: 0x8000ddf0 r13: 0x0 pc: 0x8000019a
PASS - test_fatal_on_smp in 0.014 seconds
===================================================================
START - test_get_cpu
E: blink: 0x80001490 status32: 0x80082002
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 1
E: Current thread: 0x8000dad8 (unknown)
------------------------------->8---------------------------------
The rootcause if that we doesn't proper cleanup resources after
test_fatal_on_smp test case. So child thread we start test_fatal_on_smp
may continue running for some time after the test_fatal_on_smp
test case is finished.
As in the next test case (test_get_cpu) we use same thead structures
again to create new child thread we may actually rewrite some data of
thread which is still running (or vise versa).
As we trigger the crash in test_fatal_on_smp we can't simply join
child thread in the end of test case (as we never get here). We can't
simply use join child thread before we initiate crash in test_fatal_on_smp
either as we don't want to introduce reschedule point here which may break
the test logic.
So, to fix that, we'll just do k_busy_wait in test_fatal_on_smp
thread after we start child thread to wait for thread trigger
exception and being terminated.
To verify that we also assert that child thread is dead by the
time when we stop busy waiting.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Add test cases for generator expressions and library relocation to
the code_relocation test, in order to verify functionality for these
new API features.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update usage of zephyr_code_relocate to follow new API. The old method
of relocating a file was the following directive:
zephyr_code_relocate(file location)
The new API for zephyr_code_relocate uses the following directive:
zephyr_code_relocate(FILES file LOCATION location)
update in tree usage to follow this model. Also, update the NXP HAL SHA,
as NXP's HAL uses this macro as well.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Unit test project for bt_le_oob_get_sc_data().
This part of subsys/bluetooth/host/id.c unit testing.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
Unit test project for bt_le_oob_set_sc_data().
This part of subsys/bluetooth/host/id.c unit testing.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
Unit test project for bt_le_oob_set_legacy_tk().
This part of subsys/bluetooth/host/id.c unit testing.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
Unit test project for bt_le_ext_adv_oob_get_local().
This part of subsys/bluetooth/host/id.c unit testing.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>