This commit removes the legacy LLCP code including the
Kconfig option
It also updates the babblesim tests, and removes the
tests for the legacy controller
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
This drops using the environmental part when referencing ZEPHYR_BASE
as the environment value does not have to be set and, in most cases,
is no longer set at all.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Due to recent refactoring following unittests are failing:
tests/bluetooth/df/*
tests/bluetooth/ctrl_user_ext
This commit fixes these by adding the include files containing the
missing type definitions
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Make Data, ISO, BIS and CIS PDU structure's octet 3 vendor
specific.
This will allow vendors not supporting the octet 3 or
CTEInfo (8 bits) to save 1 octet in their PDU structures.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Due to some refactoring the unittests for direction finding
started failing. This commit fixes the failing unittests
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactor DF implementation to add aux offset in the aux
pointer field of the parent PDU when chain PDU is added
and/or is duplicated when PDU contents are updated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Migrate tests in connectionless_cte_tx to new ZTEST API.
Remove main.c source file because is unncessary when automatic
unit tests registration is available. Also former use of
predicate to select unit tests for execution is removed
because the tests are split into two distinct tests suites
that has its't own setup and teardown phases.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Migrate tests in connectionless_cte_rx to new ZTEST API.
Remove main.c source file because is unncessary when automatic
unit tests registration is available.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Migrate tests in connectionless_cte_chains to new ZTEST API.
Remove main.c source file because is unncessary when automatic
unit tests registration is available.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Migrate tests in connection_cte_tx_params to new ZTEST API.
Remove main.c source file because is unncessary when automatic
unit tests registration is available.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Migrate tests in connected_cte_req to new ZTEST API.
Remove main.c source file because is unncessary when automatic
unit tests registration is available.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
As Zephyr currently requires CMake version 3.20.0, update all
occurrences of cmake_minimum_required.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
The testcase.yaml file in tests/bluetooth/df directory makes
twister trying to build tests that are not available.
All tests in the df subdirectory have private testcase.yaml
files.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Implementation of ll_df_set_cl_cte_tx_params was updated to verify
if the number of requested CTE in a periodic advertising chain is less
or equal to maximum supported value that is provided by CONFIG_BT_CTLR-
_DF_PER_ADV_CTE_NUM_MAX Kconfig option. In the past the value was
verified against maximum value allowed by BT Core Spec Vol 4, Part E,
section 7.8.80. Check against BT Core spec provided value could lead to
memory overwrite.
The unit tests start to fail because default value of the CONFIG_BT_-
CTLR_DF_PER_ADV_CTE_NUM_MAX is 1, hence is shall be changed in unit test
configuration file.
The commit adds missing configuration.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Wrong feature was enabled for a connection object as one the currently
used features. The enabled feature was CTE response. In case if the
feature exchange has not happened, it is verified if CTE request feature
is enabled, not the CTE response feature. The problem is in a common
code that prepares connection object for unit tests.
The commit fixes enabled features preparation for a connection object.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
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>