Commit: 73abf6fb4c6d63dfad0919ae32bb2d568d7aa6c4
Parent: bc3a76f01f461db19381f1922cdaeac222dfd374
Author: Daniel Winkler <danielwinkler@google.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-12-01 20:22:31
Tree: bf3dee06f05c81f378ac60aebacb19bab6d6afc7

tools/mgmt-tester: Add tests for individual ext adv MGMT commands The new extended advertising MGMT commands are paired, requiring both a Set Parameters and Set Data command to configure a new advertisement. This patch adds the following new tests to test these APIs: 1. Verify that if the adapter is unpowered, MGMT_OP_ADD_EXT_ADV_PARAMS will return a rejected status. 2. Verify that MGMT_OP_ADD_EXT_ADV_PARAMS will return an invalid parameters status if the data payload is malformed. 3. Verify that MGMT_OP_ADD_EXT_ADV_PARAMS is successful on BT4 if request is valid by checking MGMT return value. 4. Verify that MGMT_OP_ADD_EXT_ADV_PARAMS is successful on BT5 if request is valid by checking MGMT return value and that HCI traffic contains a correct advertising parameters request. 5. Verify that if a MGMT_OP_ADD_EXT_ADV_DATA request is received for an advertising instance that is unknown, i.e. MGMT_OP_ADD_EXT_ADV_PARAMS was not yet called, an invalid parameters status is returned. Tests 6-8 first call MGMT_OP_ADD_EXT_ADV_PARAMS successfully in setup to then validate the contents of the subsequent MGMT_OP_ADD_EXT_ADV_DATA call. 6. Verify that if MGMT_OP_ADD_EXT_ADV_DATA is passed an invalid tlv structure, an invalid parameters status is returned. 7. Verify that if MGMT_OP_ADD_EXT_ADV_DATA contains a valid structure, the hci traffic contain a correctly formed Adv Data hci request. 8. Verify that if MGMT_OP_ADD_EXT_ADV_DATA contains a valid structure, the hci traffic contain a correctly formed Adv Scan Response hci request. Reviewed-by: Manish Mandlik <mmandlik@chromium.org>

Diffstat

M tools/mgmt-tester.c | 293 ++++++++++++++++++++++++++++++++++++++++

1 files changed, 293 insertions(+), 0 deletions(-)

View Full Diff | Patch