tools: Fix mesh-tester to expect end of ADV
authorBrian Gix <brian.gix@intel.com>
Tue, 27 Sep 2022 22:52:27 +0000 (15:52 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
Tester was failing by not clearing the HCI queue of expected events

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/mesh-tester.c

index 6781bd5..d7b3b6f 100644 (file)
@@ -1345,6 +1345,10 @@ static const uint8_t send_mesh_cancel_2[] = {
        0x02
 };
 
+static const uint8_t mesh_cancel_rsp_param_mesh[] = {
+       0x00
+};
+
 static const struct generic_data mesh_send_mesh_cancel_1 = {
        .send_opcode = MGMT_OP_MESH_SEND_CANCEL,
        .send_param = send_mesh_cancel_1,
@@ -1353,6 +1357,10 @@ static const struct generic_data mesh_send_mesh_cancel_1 = {
        .expect_alt_ev = MGMT_EV_MESH_PACKET_CMPLT,
        .expect_alt_ev_param = send_mesh_cancel_1,
        .expect_alt_ev_len = sizeof(send_mesh_cancel_1),
+
+       .expect_hci_command = BT_HCI_CMD_LE_SET_ADV_ENABLE,
+       .expect_hci_param = mesh_cancel_rsp_param_mesh,
+       .expect_hci_len = sizeof(mesh_cancel_rsp_param_mesh),
 };
 
 static const struct generic_data mesh_send_mesh_cancel_2 = {
@@ -1363,6 +1371,10 @@ static const struct generic_data mesh_send_mesh_cancel_2 = {
        .expect_alt_ev = MGMT_EV_MESH_PACKET_CMPLT,
        .expect_alt_ev_param = send_mesh_cancel_2,
        .expect_alt_ev_len = sizeof(send_mesh_cancel_2),
+
+       .expect_hci_command = BT_HCI_CMD_LE_SET_ADV_ENABLE,
+       .expect_hci_param = mesh_cancel_rsp_param_mesh,
+       .expect_hci_len = sizeof(mesh_cancel_rsp_param_mesh),
 };
 
 static void setup_multi_mesh_send(const void *test_data)