Skip to contentSkip to conversation

tools: Fix mesh-tester to expect end of ADV

PATCH Applied Brian Gix 4 participants 5 messages Sep 27, 2022 – Sep 28, 2022 Bluetooth drivers

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH 1/1 tools: Fix mesh-tester to expect end of ADV

Tester was failing by not clearing the HCI queue of expected events

---
 tools/mesh-tester.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/mesh-tester.c +12 -0
index 6781bd565..d7b3b6f9b 100644
@@ -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)
Signature · 1 line
2.37.3
Tested-by on v1 1/1
#1 lore raw

Hi Brian,

I tested on my local machine and not able to reproduce the issue after applying this patch.

Quoted 40 lines · Brian Gix

Tester was failing by not clearing the HCI queue of expected events
---
 tools/mesh-tester.c | 12 ++++++++++++

 1 file changed, 12 insertions(+)
tools/mesh-tester.c +0 -0
index 6781bd565..d7b3b6f9b 100644
@@ -1345,6 +1345,10 @@ static const uint8_t send_mesh_cancel_2[] = {

        0x02
 };

tools/mesh-tester.c +4 -0
+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,

tools/mesh-tester.c +4 -0
@@ -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 = {

tools/mesh-tester.c +4 -0
@@ -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),
  };
Quoted 2 lines


 static void setup_multi_mesh_send(const void *test_data)

Regards,
Tedd Ho-Jeong An

#2 lore raw
In reply to Brian Gix

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=681242

---Test result---

Test Summary:

CheckPatch                    PASS      1.16 seconds
GitLint                       PASS      0.75 seconds
Prep - Setup ELL              PASS      27.19 seconds
Build - Prep                  PASS      0.73 seconds
Build - Configure             PASS      8.47 seconds
Build - Make                  PASS      951.52 seconds
Make Check                    PASS      12.09 seconds
Make Check w/Valgrind         PASS      292.27 seconds
Make Distcheck                PASS      239.91 seconds
Build w/ext ELL - Configure   PASS      8.58 seconds
Build w/ext ELL - Make        PASS      84.60 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    PASS      503.88 seconds

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Brian Gix
This patch was applied to bluetooth/bluez.git (master) by Brian Gix <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Brian Gix <[email protected]>:

Quoted 4 lines · On Tue, 27 Sep 2022 15:55:14 -0700 you wrote:

Tester was failing by not clearing the HCI queue of expected events

---
 tools/mesh-tester.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Here is the summary with links:
- [BlueZ] tools: Fix mesh-tester to expect end of ADV

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=3b47cf5db9a6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
author
#4 lore raw
In reply to Brian Gix

Hi Tedd,

This patch was upstreamed to the BlueZ tree. Could you add mesh-tester to CI?

Quoted 44 lines · Brian Gix

Tester was failing by not clearing the HCI queue of expected events
---
 tools/mesh-tester.c | 12 ++++++++++++

 1 file changed, 12 insertions(+)
tools/mesh-tester.c +0 -0
index 6781bd565..d7b3b6f9b 100644
@@ -1345,6 +1345,10 @@ static const uint8_t send_mesh_cancel_2[] = {

        0x02
 };

tools/mesh-tester.c +4 -0
+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,

tools/mesh-tester.c +4 -0
@@ -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 = {

tools/mesh-tester.c +4 -0
@@ -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)