Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
There was missing assignment to a global variable that stores
connection handle. The value was always the same, hence it test
were not failing. The value was passed over from setup state
done for other tests. This change makes sure there is always
correct handle stored in global variable.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There was missing information about supported CTE response feature
by peer device. That caused a test_set_conn_cte_req_enable to fail.
The test expected that peer device supprots CTE response.
The missing information is added in a common code responsible for
connection object preparation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Due to change in Kconfig CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN
the Kconfigs in tests were wrong and tests were not building.
The commit sets the max antenna switch pattern length to actual
maximum value.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
There was missing kconfig option that enables refactored LLCPs.
That caused build error in Direction Finding connection_cte_tx_params.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The ll_scan_set::per_sync was renamed to ll_scan_set::periodic.
Direction finding connectionless_cte_rx test didn't build.
The commit fixes the issue.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This platform requires a special setup and has its own workflow. Do not
list it as integration platform as it violates the rule of having to be
built which is not possible due to missing environment.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.
Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
The tests for direction finding connected mode were not building
correclty. There were missing Kconfig options that enable missing
functionality to be tested.
Tests were not failing because there were no expected positive
behavior tests added.
Added changes allow to validate all implemented test cases.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fixes build issues for tests in related with CTE REQ and
hci commands.
Fixes issues in unit tests for CTE REQ/RSP control proedures.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There were changes done to controller code that cause
tests to do not build and fail during execution.
Changes are related with:
- modified code related with extended advertising ADI
field handling
- added generic double buffer data structure that is
used in controller
- moved code that was building only when DF is enabled
- added EVENTS_PHYEND that is not available in nrfbsim
board
The PR addresses those issues.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In connected mode when Receiving Constant Tone Extensions feature
is enabled, controller shall be able to receive CTE in any
data channel packet.
The commit adds required changes to allow receive of CTE for
all data channel packets in peripheral role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There is a common implementation of connection handling code
that may be shared by tests: connection_cte_req and connection_cte-
tx_params.
This commit removes code implemented in common.c and common.h
files. The same code is currently available in ../df/common/
directory.
All calls were updated to use function from common implementation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add unit tests for HCI command HCI_LE_Set_Connection_CTE_-
Transmit_Parameters.
Part of a code that was available in df/connection_cte_req/common.c,
related with artificial handling of connection, is moved to
df/common/bt_conn_common.c.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Recently there was added ADI support to periodic advertising.
There was missing implementation of ADI for periodic advertising
chained PDUs and direction finding. Also unit tests for periodic
advertising chains required update to handle ADI field.
The commit provides missing implementation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Migrating the test suites to the register functionality allows the
main.c source to focus on the state of the system instead of "which"
test to run. In this example, test_main() now calls:
* ut_bt_setup() and updates the state
* common_create_adv_set(), updates the state, and notifies the
registered tests that the state has been updated which would trigger
a run.
* common_delete_adv_set(), updates the state, and again notifies
the registered tests that the state has been updated.
Signed-off-by: Yuval Peress <peress@chromium.org>
Add unit tests that will ensure the CTE disable operation does not
cause breaking of LLL operations by too early release of chained PDUs.
The tests verify if numbers of PDUs in free PDUs fifo and free PDUs
memory pool are correct.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There was a change in parameters list of function ull_adv_sync_pdu_-
alloc. There was a call in commmon.c file in connectionless_cte_chains
unit tests with use of former parameters list. That caused a compilation
error.
The commit fixes the compilation issue.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add unit tests for HCI commands:
- HCI_LE_Set_Connection_CTE_Receive_Parameters,
- HCI_LE_Connection_CTE_Request_Enable.
Tests validate current implementation of commands handling in HCI/ULL.
Handling of the HCI_LE_Connection_CTE_Request_Enable is not complete,
thus tests don't validate positive behavior the functions.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Bluetooth host may request to send more than one CTE in
connectionless mode. That is relized by periodic advertising
chained PDUs.
To check correctness of implementation of such functionality
new unit tests were added.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Before thic commit the bluetooth/df unit tests subdirectory contained
connectionless CTE TX verification. Due to the implementation of
connectionless CTE RX new set of tests will be provided.
The new functionality requires different: configuration and common
setup code. Because of that, current test code was moved to
connectionless_cte_tx subdirectory.
Code shared by all DF tests is moved to common subdirectory.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Remove undefined functions (unsued anymore).
Add missing stub implementation for new DF related radio functions.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add intergration_plaforms entry in testcase.yaml.
Thanks to that nrf52_bsim platform will be used instead
of default platforms that do not include nrf52_bsim.
The test will be not dead as it is now (executed only
when tests code has been changed).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Refactor command state state handling to one function.
When setting state outside of hci_core the cmd macro is not available,
so in order to assign the buf pointer to state the function is needed.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix compilation issue in direction finding tests, undefined references
to radio_df_ant_switching_gpios_cfg and
radio_df_ant_switching_pin_sel_cfg
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move common code that may be used by different test units
from main.c to common.c. Main.c should be clean and responsible
for unit tests executioon only. Common functionalities should be
stored in separate file and provided to test source files by
appropriate header file.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add set of functions that will make possible to configure
radio Direction Finding Extension to transmit CTE for periodic
advertising.
Some of the new Radio API functions are provided as separate
functions changing the same Radio peripheral registers, e.g.
radio_df_mode_set_aoa, radio_df_mode_set_aod. This is done on
purpose and is related with lack of DFE in nrf52_bsim.
To avoid use of conditionally compiled constants to represent
e.g. CTE mode; separate functions were introduced.
Thanks to that DF unit tests are able to compile successfully
without changes in nrf52_bsim platform. Also if DFE is added
to nrf52_bsim there is no need to change the code until it is
desired.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The DF tests are implemented to be executed with nrf52_bsim platform.
The nrf52_bsim platform does not include Direction Finding Extenstion.
Due to that, radio_df.c compilation failed with error about missing
antenna configuration in DTS.
To solve the problem, I've changed nrf.cmake to include radio_df.c
file when CONFIG_BT_CTLR_DF is defined and CONFIG_SOC_SERIES_BSIM_NRFXX
is not definded.
Thanks to that any other platform is not affected. The file will not
build if there is no appropriate configuration or there are missing
features in a hardwared.
Unit tests have provided stub imlpementation or radio functionality.
If nrf52_bsim has implemented Direction Finding Extension, the
DF unit tests code will stil work and will not require additional
changes. Also content of the file is not affected by contional
compilation entries.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add unit tests for Direction Finding set of connectionless TX
CTE parameters. Enable DF in nrf52_bsim board.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>