2022-09-01 21:10:14

by Gix, Brian

[permalink] [raw]
Subject: [PATCH BlueZ v2] mgmt-tester: Adds turning on Mesh Experimental feature

Turns on experimental Mesh feature, and expects it in report when
querying which experimental features are supported and have been
enabled.
---
tools/mgmt-tester.c | 40 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 02ddfd844..5747ab84b 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -221,6 +221,32 @@ static void read_info_callback(uint8_t status, uint16_t length,
bthost_notify_ready(bthost, tester_pre_setup_complete);
}

+static const uint8_t set_exp_feat_param_mesh[] = {
+ 0x76, 0x6e, 0xf3, 0xe8, 0x24, 0x5f, 0x05, 0xbf, /* UUID - Mesh */
+ 0x8d, 0x4d, 0x03, 0x7a, 0xd7, 0x63, 0xe4, 0x2c,
+ 0x01, /* Action - enable */
+};
+
+static void mesh_exp_callback(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ if (status != MGMT_STATUS_SUCCESS) {
+ tester_print("Mesh feature could not be enabled");
+ return;
+ }
+
+ tester_print("Mesh feature is enabled");
+}
+
+static void mesh_exp_feature(struct test_data *data, uint16_t index)
+{
+ tester_print("Enabling Mesh feature");
+
+ mgmt_send(data->mgmt, MGMT_OP_SET_EXP_FEATURE, index,
+ sizeof(set_exp_feat_param_mesh), set_exp_feat_param_mesh,
+ mesh_exp_callback, NULL, NULL);
+}
+
static void index_added_callback(uint16_t index, uint16_t length,
const void *param, void *user_data)
{
@@ -233,6 +259,10 @@ static void index_added_callback(uint16_t index, uint16_t length,

mgmt_send(data->mgmt, MGMT_OP_READ_INFO, data->mgmt_index, 0, NULL,
read_info_callback, NULL, NULL);
+
+ tester_warn("Enable management Mesh interface");
+ mesh_exp_feature(data, data->mgmt_index);
+
}

static void index_removed_callback(uint16_t index, uint16_t length,
@@ -388,6 +418,7 @@ static void read_index_list_callback(uint8_t status, uint16_t length,

if (test && test->setup_le_states)
hciemu_set_central_le_states(data->hciemu, test->le_states);
+
}

static void test_pre_setup(const void *test_data)
@@ -7390,7 +7421,8 @@ static void command_generic_callback(uint8_t status, uint16_t length,
expect_param = test->expect_func(&expect_len);

if (length != expect_len) {
- tester_warn("Invalid cmd response parameter size");
+ tester_warn("Invalid cmd response parameter size %d %d",
+ length, expect_len);
tester_test_failed();
return;
}
@@ -9858,7 +9890,7 @@ static const struct generic_data set_dev_flags_fail_3 = {
};

static const uint8_t read_exp_feat_param_success[] = {
- 0x04, 0x00, /* Feature Count */
+ 0x05, 0x00, /* Feature Count */
0xd6, 0x49, 0xb0, 0xd1, 0x28, 0xeb, /* UUID - Simultaneous */
0x27, 0x92, 0x96, 0x46, 0xc0, 0x42, /* Central Peripheral */
0xb5, 0x10, 0x1b, 0x67,
@@ -9875,6 +9907,10 @@ static const uint8_t read_exp_feat_param_success[] = {
0x85, 0x98, 0x6a, 0x49, 0xe0, 0x05,
0x88, 0xf1, 0xba, 0x6f,
0x00, 0x00, 0x00, 0x00, /* Flags */
+ 0x76, 0x6e, 0xf3, 0xe8, 0x24, 0x5f, /* UUID - Mesh support */
+ 0x05, 0xbf, 0x8d, 0x4d, 0x03, 0x7a,
+ 0xd7, 0x63, 0xe4, 0x2c,
+ 0x01, 0x00, 0x00, 0x00, /* Flags */
};

static const struct generic_data read_exp_feat_success = {
--
2.37.2


2022-09-01 22:03:27

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2] mgmt-tester: Adds turning on Mesh Experimental feature

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Thu, 1 Sep 2022 14:07:22 -0700 you wrote:
> Turns on experimental Mesh feature, and expects it in report when
> querying which experimental features are supported and have been
> enabled.
> ---
> tools/mgmt-tester.c | 40 ++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 38 insertions(+), 2 deletions(-)

Here is the summary with links:
- [BlueZ,v2] mgmt-tester: Adds turning on Mesh Experimental feature
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c96629bedbae

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


2022-09-01 22:03:27

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v2] mgmt-tester: Adds turning on Mesh Experimental feature

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=673392

---Test result---

Test Summary:
CheckPatch PASS 1.46 seconds
GitLint PASS 1.20 seconds
Prep - Setup ELL PASS 26.84 seconds
Build - Prep PASS 0.78 seconds
Build - Configure PASS 8.37 seconds
Build - Make PASS 745.75 seconds
Make Check PASS 11.95 seconds
Make Check w/Valgrind PASS 287.36 seconds
Make Distcheck PASS 238.73 seconds
Build w/ext ELL - Configure PASS 8.61 seconds
Build w/ext ELL - Make PASS 83.06 seconds
Incremental Build w/ patches PASS 0.00 seconds
Scan Build PASS 490.05 seconds



---
Regards,
Linux Bluetooth