diff mbox series

[BlueZ] tools: Fix mesh-tester to expect end of ADV

Message ID 20220927225514.278400-1-brian.gix@intel.com
State New
Headers show
Series [BlueZ] tools: Fix mesh-tester to expect end of ADV | expand

Commit Message

Brian Gix Sept. 27, 2022, 10:55 p.m. UTC
Tester was failing by not clearing the HCI queue of expected events
---
 tools/mesh-tester.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

An, Tedd Sept. 27, 2022, 11:37 p.m. UTC | #1
Hi Brian,

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

Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com>


On Tue, 2022-09-27 at 15:55 -0700, Brian Gix wrote:
> Tester was failing by not clearing the HCI queue of expected events
> ---
>  tools/mesh-tester.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tools/mesh-tester.c b/tools/mesh-tester.c
> index 6781bd565..d7b3b6f9b 100644
> --- a/tools/mesh-tester.c
> +++ b/tools/mesh-tester.c
> @@ -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)

Regards,
Tedd Ho-Jeong An
bluez.test.bot@gmail.com Sept. 28, 2022, 12:14 a.m. UTC | #2
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
patchwork-bot+bluetooth@kernel.org Sept. 28, 2022, 1:50 p.m. UTC | #3
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Brian Gix <brian.gix@intel.com>:

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!
Brian Gix Sept. 28, 2022, 5:26 p.m. UTC | #4
Hi Tedd,

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

On Tue, 2022-09-27 at 15:55 -0700, Brian Gix wrote:
> Tester was failing by not clearing the HCI queue of expected events
> ---
>  tools/mesh-tester.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tools/mesh-tester.c b/tools/mesh-tester.c
> index 6781bd565..d7b3b6f9b 100644
> --- a/tools/mesh-tester.c
> +++ b/tools/mesh-tester.c
> @@ -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)
diff mbox series

Patch

diff --git a/tools/mesh-tester.c b/tools/mesh-tester.c
index 6781bd565..d7b3b6f9b 100644
--- a/tools/mesh-tester.c
+++ b/tools/mesh-tester.c
@@ -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)