All of lore.kernel.org
 help / color / mirror / Atom feed
* [BlueZ PATCH 1/3] doc/tester-config: Enable Runtime Debugging Feature
@ 2021-10-06 20:12 Tedd Ho-Jeong An
  2021-10-06 20:12 ` [BlueZ PATCH 2/3] tools/mgmt-tester: Updates Experimental Feature test cases Tedd Ho-Jeong An
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tedd Ho-Jeong An @ 2021-10-06 20:12 UTC (permalink / raw)
  To: linux-bluetooth

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

This patch adds CONFIG_BT_FEATURE_DEBUG=y in tester config to enable the
runtime debug option.
---
 doc/tester.config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/tester.config b/doc/tester.config
index 892fd5eb3..011475661 100644
--- a/doc/tester.config
+++ b/doc/tester.config
@@ -32,6 +32,7 @@ CONFIG_BT_LE=y
 CONFIG_BT_HS=y
 CONFIG_BT_MSFTEXT=y
 CONFIG_BT_AOSPEXT=y
+CONFIG_BT_FEATURE_DEBUG=y
 
 CONFIG_BT_HCIVHCI=y
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [BlueZ PATCH 2/3] tools/mgmt-tester: Updates Experimental Feature test cases
  2021-10-06 20:12 [BlueZ PATCH 1/3] doc/tester-config: Enable Runtime Debugging Feature Tedd Ho-Jeong An
@ 2021-10-06 20:12 ` Tedd Ho-Jeong An
  2021-10-06 20:13 ` [BlueZ PATCH 3/3] tools/mgmt-tester: Add test case for suspend while discovering Tedd Ho-Jeong An
  2021-10-06 20:36 ` [BlueZ,1/3] doc/tester-config: Enable Runtime Debugging Feature bluez.test.bot
  2 siblings, 0 replies; 4+ messages in thread
From: Tedd Ho-Jeong An @ 2021-10-06 20:12 UTC (permalink / raw)
  To: linux-bluetooth

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

This patch updates/adds test cases for Read and Set Experimental Feature
commands.
---
 tools/mgmt-tester.c | 92 +++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 89 insertions(+), 3 deletions(-)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 1a2aba7fd..84d81c8ca 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -390,8 +390,8 @@ static void debug_exp_feature(struct test_data *data)
 	tester_print("Enabling Debug feature");
 
 	mgmt_send(data->mgmt, MGMT_OP_SET_EXP_FEATURE, MGMT_INDEX_NONE,
-		sizeof(set_exp_feat_param_debug), set_exp_feat_param_debug,
-		debug_exp_callback, NULL, NULL);
+		  sizeof(set_exp_feat_param_debug), set_exp_feat_param_debug,
+		  debug_exp_callback, NULL, NULL);
 }
 
 static void read_index_list_callback(uint8_t status, uint16_t length,
@@ -9702,6 +9702,23 @@ static const struct generic_data read_exp_feat_success = {
 	.expect_len = sizeof(read_exp_feat_param_success),
 };
 
+
+static const uint8_t read_exp_feat_param_success_index_none[] = {
+	0x01, 0x00,				/* Feature Count */
+	0x1c, 0xda, 0x47, 0x1c, 0x48, 0x6c,	/* UUID - Debug */
+	0x01, 0xab, 0x9f, 0x46, 0xec, 0xb9,
+	0x30, 0x25, 0x99, 0xd4,
+	0x00, 0x00, 0x00, 0x00,			/* Flags */
+};
+
+static const struct generic_data read_exp_feat_success_index_none = {
+	.send_index_none = true,
+	.send_opcode = MGMT_OP_READ_EXP_FEATURES_INFO,
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_param = read_exp_feat_param_success_index_none,
+	.expect_len = sizeof(read_exp_feat_param_success_index_none),
+};
+
 static uint16_t settings_powered_le_privacy[] = { MGMT_OP_SET_LE,
 						MGMT_OP_SET_PRIVACY,
 						MGMT_OP_SET_POWERED, 0 };
@@ -9720,6 +9737,20 @@ static const uint8_t set_exp_feat_rsp_param_ll_privacy[] = {
 	0x03, 0x00, 0x00, 0x00,			/* Action - enable */
 };
 
+static const uint8_t set_exp_feat_param_offload_codec[] = {
+	0xaf, 0x29, 0xc6, 0x66, 0xac, 0x5f,	/* UUID - Codec Offload */
+	0x1a, 0x88, 0xb9, 0x4f, 0x7f, 0xee,
+	0xce, 0x5a, 0x69, 0xa6,
+	0x01,					/* Action - enable */
+};
+
+static const uint8_t set_exp_feat_rsp_param_offload_codec[] = {
+	0xaf, 0x29, 0xc6, 0x66, 0xac, 0x5f,	/* UUID - Codec Offload */
+	0x1a, 0x88, 0xb9, 0x4f, 0x7f, 0xee,
+	0xce, 0x5a, 0x69, 0xa6,
+	0x01, 0x00, 0x00, 0x00,			/* Action - enable */
+};
+
 static const struct generic_data set_exp_feat_enable_ll_privacy = {
 	.send_opcode = MGMT_OP_SET_EXP_FEATURE,
 	.send_param = set_exp_feat_param_ll_privacy,
@@ -9727,6 +9758,44 @@ static const struct generic_data set_exp_feat_enable_ll_privacy = {
 	.expect_status = MGMT_STATUS_SUCCESS,
 	.expect_param = set_exp_feat_rsp_param_ll_privacy,
 	.expect_len = sizeof(set_exp_feat_rsp_param_ll_privacy),
+	.expect_alt_ev = MGMT_EV_EXP_FEATURE_CHANGE,
+	.expect_alt_ev_len = sizeof(struct mgmt_ev_exp_feature_changed),
+};
+
+static void read_exp_feature_callback(uint8_t status, uint16_t length,
+					const void *param, void *user_data)
+{
+	if (status != MGMT_STATUS_SUCCESS) {
+		tester_setup_failed();
+		return;
+	}
+
+	tester_print("Received Read Experimental Features Info");
+
+	tester_setup_complete();
+}
+
+static void setup_set_exp_feature_alt(const void *test_data)
+{
+	struct test_data *data = tester_get_data();
+
+	/* Send the Read Experiemental Features Information command to receive
+	 * the Experiemental Feature Changed event
+	 */
+	mgmt_send(data->mgmt_alt, MGMT_OP_READ_EXP_FEATURES_INFO,
+			data->mgmt_index, 0, NULL,
+			read_exp_feature_callback, NULL, NULL);
+}
+
+static const struct generic_data set_exp_feat_offload_codec = {
+	.send_opcode = MGMT_OP_SET_EXP_FEATURE,
+	.send_param = set_exp_feat_param_offload_codec,
+	.send_len = sizeof(set_exp_feat_param_offload_codec),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_param = set_exp_feat_rsp_param_offload_codec,
+	.expect_len = sizeof(set_exp_feat_rsp_param_offload_codec),
+	.expect_alt_ev = MGMT_EV_EXP_FEATURE_CHANGE,
+	.expect_alt_ev_len = sizeof(struct mgmt_ev_exp_feature_changed),
 };
 
 static const uint8_t set_exp_feat_param_disable[17] = { 0x00 };
@@ -12434,12 +12503,29 @@ int main(int argc, char *argv[])
 	test_bredrle50("Read Exp Feature - Success",
 				&read_exp_feat_success,
 				NULL, test_command_generic);
+
+	/* MGMT_OP_READ_EXP_FEATURE
+	 * Read Experimental features - success (Index None)
+	 */
+	test_bredrle50("Read Exp Feature - Success (Index None)",
+				&read_exp_feat_success_index_none,
+				NULL, test_command_generic);
+
 	/* MGMT_OP_SET_EXP_FEATURE
 	 * Enable LL Privacy
 	 */
 	test_bredrle50("Set Exp Feature - Enable LL Privacy",
 				&set_exp_feat_enable_ll_privacy,
-				NULL, test_command_generic);
+				setup_set_exp_feature_alt,
+				test_command_generic);
+
+	/* MGMT_OP_SET_EXP_FEATURE
+	 * Offload Codec
+	 */
+	test_bredrle50("Set Exp Feature - Offload Codec",
+				&set_exp_feat_offload_codec,
+				setup_set_exp_feature_alt,
+				test_command_generic);
 
 	/* MGMT_OP_SET_EXP_FEATURE
 	 * Disable all features by sending zero UUID
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [BlueZ PATCH 3/3] tools/mgmt-tester: Add test case for suspend while discovering
  2021-10-06 20:12 [BlueZ PATCH 1/3] doc/tester-config: Enable Runtime Debugging Feature Tedd Ho-Jeong An
  2021-10-06 20:12 ` [BlueZ PATCH 2/3] tools/mgmt-tester: Updates Experimental Feature test cases Tedd Ho-Jeong An
@ 2021-10-06 20:13 ` Tedd Ho-Jeong An
  2021-10-06 20:36 ` [BlueZ,1/3] doc/tester-config: Enable Runtime Debugging Feature bluez.test.bot
  2 siblings, 0 replies; 4+ messages in thread
From: Tedd Ho-Jeong An @ 2021-10-06 20:13 UTC (permalink / raw)
  To: linux-bluetooth

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

This patch adds a test case for suspend while discovering state.
---
 tools/mgmt-tester.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 84d81c8ca..8fd82487d 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -10722,6 +10722,27 @@ static void test_suspend_resume_success_7(const void *test_data)
 	test_command_generic(test_data);
 }
 
+static const struct generic_data suspend_resume_success_8 = {
+	.setup_settings = settings_powered_le,
+	.send_opcode = MGMT_OP_START_DISCOVERY,
+	.send_param = start_discovery_le_param,
+	.send_len = sizeof(start_discovery_le_param),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_param = start_discovery_le_param,
+	.expect_len = sizeof(start_discovery_le_param),
+	.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_SCAN_ENABLE,
+	.expect_hci_param = start_discovery_valid_ext_scan_enable,
+	.expect_hci_len = sizeof(start_discovery_valid_ext_scan_enable),
+	.expect_alt_ev = MGMT_EV_CONTROLLER_SUSPEND,
+	.expect_alt_ev_param = suspend_state_param_disconnect,
+	.expect_alt_ev_len = sizeof(suspend_state_param_disconnect),
+};
+
+static void test_suspend_resume_success_8(const void *test_data)
+{
+	test_command_generic(test_data);
+	tester_wait(1, trigger_force_suspend, NULL);
+}
 
 int main(int argc, char *argv[])
 {
@@ -12497,6 +12518,15 @@ int main(int argc, char *argv[])
 				&suspend_resume_success_7,
 				NULL, test_suspend_resume_success_7);
 
+	/* Suspend/Resume
+	 * Setup : Power on
+	 * Run: Start discover and enable suspend
+	 * Expect: Receive the Suspend Event
+	 */
+	test_bredrle50_full("Suspend/Resume - Success 8 (Discovering)",
+				&suspend_resume_success_8,
+				NULL, test_suspend_resume_success_8, 4);
+
 	/* MGMT_OP_READ_EXP_FEATURE
 	 * Read Experimental features - success
 	 */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [BlueZ,1/3] doc/tester-config: Enable Runtime Debugging Feature
  2021-10-06 20:12 [BlueZ PATCH 1/3] doc/tester-config: Enable Runtime Debugging Feature Tedd Ho-Jeong An
  2021-10-06 20:12 ` [BlueZ PATCH 2/3] tools/mgmt-tester: Updates Experimental Feature test cases Tedd Ho-Jeong An
  2021-10-06 20:13 ` [BlueZ PATCH 3/3] tools/mgmt-tester: Add test case for suspend while discovering Tedd Ho-Jeong An
@ 2021-10-06 20:36 ` bluez.test.bot
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2021-10-06 20:36 UTC (permalink / raw)
  To: linux-bluetooth, hj.tedd.an

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    PASS      4.20 seconds
GitLint                       PASS      2.80 seconds
Prep - Setup ELL              PASS      43.71 seconds
Build - Prep                  PASS      0.49 seconds
Build - Configure             PASS      7.98 seconds
Build - Make                  PASS      184.67 seconds
Make Check                    PASS      9.53 seconds
Make Distcheck                PASS      224.44 seconds
Build w/ext ELL - Configure   PASS      8.74 seconds
Build w/ext ELL - Make        PASS      184.53 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-06 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 20:12 [BlueZ PATCH 1/3] doc/tester-config: Enable Runtime Debugging Feature Tedd Ho-Jeong An
2021-10-06 20:12 ` [BlueZ PATCH 2/3] tools/mgmt-tester: Updates Experimental Feature test cases Tedd Ho-Jeong An
2021-10-06 20:13 ` [BlueZ PATCH 3/3] tools/mgmt-tester: Add test case for suspend while discovering Tedd Ho-Jeong An
2021-10-06 20:36 ` [BlueZ,1/3] doc/tester-config: Enable Runtime Debugging Feature bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.