All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inga Stotland <inga.stotland@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.dentz@gmail.com, tedd.an@linux.intel.com,
	Inga Stotland <inga.stotland@intel.com>
Subject: [PATCH BlueZ 2/2] tools/mgmt-tester: Add setup condition to resolve list
Date: Wed,  2 Jun 2021 17:04:16 -0700	[thread overview]
Message-ID: <20210603000416.171392-2-inga.stotland@intel.com> (raw)
In-Reply-To: <20210603000416.171392-1-inga.stotland@intel.com>

This adds expected setup HCI command condition to
"Start Discovery - Disable Resolve List" case.

Check that on setup HCI command Set LE Resolve Enable is complete
with "enable" parameter set to 1.
---
 tools/mgmt-tester.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 657b7aaa0..d659d7eb0 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -2076,6 +2076,9 @@ static const struct generic_data start_discovery_ll_privacy_disable_resolv = {
 	.expect_status = MGMT_STATUS_SUCCESS,
 	.expect_param = start_discovery_le_param,
 	.expect_len = sizeof(start_discovery_le_param),
+	.setup_expect_hci_command = BT_HCI_CMD_LE_SET_RESOLV_ENABLE,
+	.setup_expect_hci_param = set_resolv_on_param,
+	.setup_expect_hci_len = sizeof(set_resolv_on_param),
 	.expect_hci_command = BT_HCI_CMD_LE_SET_RESOLV_ENABLE,
 	.expect_hci_param = set_resolv_off_param,
 	.expect_hci_len = sizeof(set_resolv_off_param),
@@ -9442,6 +9445,7 @@ static void setup_add_device_callback(uint8_t status, uint16_t length,
 static void setup_ll_privacy_device(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
+	const struct generic_data *test = data->test_data;
 	unsigned char param[] = { 0x01 };
 	const uint8_t *ext_feat_param;
 	size_t ext_feat_len;
@@ -9453,6 +9457,12 @@ static void setup_ll_privacy_device(const void *test_data)
 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
 
+	tester_print("Setup expected HCI command 0x%04x",
+					 test->setup_expect_hci_command);
+	hciemu_add_master_post_command_hook(data->hciemu,
+					command_setup_hci_callback, data);
+	test_add_setup_condition(data);
+
 	tester_print("Enabling LL Privacy feature");
 
 	ext_feat_param = set_exp_feat_param_ll_privacy;
-- 
2.26.3


  reply	other threads:[~2021-06-03  0:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  0:04 [PATCH BlueZ 1/2] tools/mgmt-tester: Adjust test setup complete check Inga Stotland
2021-06-03  0:04 ` Inga Stotland [this message]
2021-06-03  0:50 ` [BlueZ,1/2] " bluez.test.bot
2021-06-03 19:38 ` [PATCH BlueZ 1/2] " Tedd Ho-Jeong An
2021-06-03 20:18   ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210603000416.171392-2-inga.stotland@intel.com \
    --to=inga.stotland@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=tedd.an@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.