Add test for cbprintf_package_convert function which checks if
it correctly handles array that holds string lengths. When convert
function is used twice, at first to calculate size of the output
package and then to actually convert the package, array of string
lengths can be used to optimize operation by not calculating
string lengths twice. However, array may not be able to hold all
string lengths that are needed for that package. In that case,
string lengths that did not fit into the array will be calculated
twice, in both conversions.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
If we receive poll() error during a request, it must
be forwarded to application.
If instead receive poll() error later, it should not be
forwarded as it might be result of application closing the
socket.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Refactor the CoAP retry handling into the handle_poll() function,
so that we only try to send retries if the socket reports POLLOUT.
Also move the receiving into same loop, so when poll() reports POLLIN
we recv() the message and handle it before proceeding to other sockets.
Also fix tests to handle POLLOUT flag and add support for testing
multiple clients.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Coverage for cmsis rtos APIS should is provided using simulation, we
should not build those on every platform we have. Avoid failures due to
incompatiblities in requirements coming from various boards and also
reduce churn and noise during testing and CI.
Fixes#80215
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The CAP tests used u_group->cig->index but the u_group->cig may
have been deleted when the stream is released, which meant
that u_group->cig == NULL when e.g. unicast_stop_complete_cb
was called and that could cause failing tests as the index
would just be a uninitialized value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change pins that are used for qdec nrf54h20dk to align with shield
(loopbacks) used in internal CI. This change is needed to start
qdec driver power management testing.
Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
sqrtf() is used for floats but the argument and resulting
variable are both doubles. LLVM would complain about
implicit conversion from float to double. So use sqrt()
instead as it is used with doubles.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The stream flash test has been written with SoC internal
storage in mind and its simplified structure does not take
into account possibility of existence of devices with
different erase characteristics, at run time.
The commit fixes the test failing with Nordic bords that
have CONFIG_SPI_NOR=y set by default, which made test
to behave like device with erase capability has been tested.
The commit sets CONFIG_SPI_NOR=n for nrf54l devices.
Fixes#79181
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add log statements for each command, event and response
for debugging purposes.
Tests do not send enough of these to clutter the IUT logs
and it is useful for debugging to more easily determine
what command triggered a function call or when the
responses and events are sent to the AutoPTS client.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commits defines the `#power-domain-cells` properties for fakedomain
nodes in the HiFive Unmatched devicetree overlay file.
Without this change, this tests fails to build for the `hifive_unmatched`
Zephyr target.
Fixes#80503.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
In 82d8f09de1
the bt_conn_foreach prototype was changed, but these unit tests
kept using the old prototype which leads to a build warning.
Let's fix the prototype in the tests.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This resolves some addressed comments in this PR
https://github.com/zephyrproject-rtos/zephyr/pull/77930
It adds as well a section in the documentation about some
recommendations to increase ZMS performance.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Refactor the sample so that multiple advertising setup can
be reused in other sample if required. Bluetooth enable can
be in the sample that reuses the advertising setup.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit adds new tests for verifying the functionality of the board
and SoC extension feature.
It does so by defining:
- A new CPU cluster on an existing SoC
- Two new board variants on top of an existing board
The new board variants are defined on top of the existing `native_sim`
board, so that the following native_sim board targets are available for
the test.
Existing board targets:
- native_sim/native
- native_sim/native/64
Extended board targets:
- native_sim/native/one
- native_sim/native/64/two
The new CPU cluster is defined for the existing `an521` SoC.
Existing CPU Clusters on an521:
- cpu0
- cpu1
New CPU Cluster:
- cputest
For SoC tests the mps2 board is used.
This means that for testing, the following board targets using the an521
SoC are:
- mps2/an521/cpu0
- mps2/an521/cpu1
- mps2/an521/cputest
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The test implementation is based on a copy of the HFC multilink test.
The test verifies that the stack respects the reference counting of SDU
buffers when the L2CAP -EINPROGRESS feature is used.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This is shorthand for random static addresses. It's similar to
`bt_addr_le_from_str`, but is a macro that results in an object literal,
making it more versatile and less verbose.
This macro only gives access to the first 255 random static addresses,
but this ought to be enough addresses for testing.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The commit splits default FCB scenario into one with endmarker
enabled, the original one, and one with disabled.
This allows to test the FCB in cases when CONFIG_FCB_ALLOW_FIXED_ENDMARKER
is set and not set.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit fixes minor copyright issues and corrects the compatible of
gpio-stepper with the vendor name as zephyr
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
What is changed?
- Added a new mps3 board an552 for the soc corstone300.
The qualifier to build/run application with board mps3/an552 is
`mps3/corstone300/an552` for secure and
`mps3/corstone300/an552/ns` for non-secure.
- Added FVP variant to enable FVP testing with corstone300
and it uses the ARM FVP `FVP_Corstone_SSE-300_Ethos-U55`.
The qualifier to build/run application with FVP is
`mps3/corstone300/fvp` for secure and
`mps3/corstone300/fvp/ns` for non-secure.
- Note: the qualifier to build/run application with board mps3/an547
is now changed to
`mps3/corstone300/an547` for secure and
`mps3/corstone300/an547/ns` for non-secure.
How is it changed?
- Moved common code from mps3/an547 to corstone300.
- Renamed soc for an547 to corstone300 and added
a new soc corstone300/an552.
Why do we need this change?
- This enables FVP support and testing for corstone300.
- SOC/qualifier for mps3/an547 was renamed to reduce code redundancy
- A separate FVP variant was added for AN552 because, the TFM board
used for non-secure variant differs for FPGA and FVP.
TFM board `arm/mps3/corstone300/fvp` should be used when testing
AN552 with FVP and `arm/mps3/corstone300/an552` should be used when
testing with AN552 FPGA.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Clock source is changed from RC_SLOW to RC_FAST_D256 in order
to improve clock precision and avoid tests failing due to
lower precision of RC clock (around 10%).
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This ensures that enabling BT_CTLR_DTM does not break the compilation of
the Bluetooth shell.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Removed the LE Audio specific definition and instead
refer to the value defined by iso.h as it is ISO/Core
that defines this size, and not BAP/Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There are issues with 64 bit compilation in hostap so disable
native_sim/native/64 board from the tests. The board will be
enabled again after updating the hostap from upstream and fixing
the issues.
Fixes#80437
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
For tests that support both targeting unit_testing and
other targets, we check in the cmake code the BOARD variable.
Let's allow users to set this to either of unit_testing
or unit_testing/unit_testing so it behaves like for other
tests.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix filtering done in
22c3438f1b
Otherwise we end up with tests defined twice, as a .unit and .zerphyr
variant but both run in normal builds, and none for unit tests.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use full board name in cmake file.
Akin to the fix done in
https://github.com/zephyrproject-rtos/zephyr/pull/80270/
following the changes from
https://github.com/zephyrproject-rtos/zephyr/pull/77250/
Note after the Zephyr cmake code has been run the BOARD
variable is split into BOARD BOARD_QUALIFIERS,
where BOARD does not contain the qualifiers anymore
(see cmake/modules/boards.cmake for more info).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Removed the generation of broadcast id inside the stack. It is now up
to the application to generate this by itself. The CAP sample has
been modified to allow either a static broadcast, or a random one.
All of this is handled in the application.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
The 12-bit signed values for the results of PBR are a bit
cumbersome, so this adds a helper function to make it easier to work
with the HCI formatted steps.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Add unit tests for bt_le_cs_step_data_parse.
Also exit early (without calling the function pointer) if the next
step would seem to read out of bounds.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Adds a test to ensure that the LoRaWAN MCUmgr transport builds with
all options enabled and all options disabled
Signed-off-by: Jamie McCrae <spam@helper3000.net>
The peer remote device "source_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Instead of fixing csi2rx clock frequencies, set them according to the
pixel rate got from the camera sensor.
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The peer remote device "sensor_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
nrf54h20dk_nrf54h20_cpurad by default has less RAM dedicated for
DMA transfers and default 1k buffer cannot be used for
uart_async_long_buf case. Use custom value.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
One of the test case is performing long transfers using 1k buffers.
For some targets there may be not enough RAM to perform such
transfers. Make long buffer length configurable.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>