All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.dentz@gmail.com, brian.gix@intel.com,
	luiz.von.dentz@intel.com, hj.tedd.an@gmail.com
Subject: [PATCH BlueZ] tools/mgmt-tester: Add Read OOB Ext Data test cases
Date: Wed, 18 Aug 2021 11:31:08 -0700	[thread overview]
Message-ID: <20210818183108.1636030-1-brian.gix@intel.com> (raw)

Read Local OOB Ext Data - Invalid index
Read Local OOB Ext Data - Legacy pairing
Read Local OOB Ext Data - Success SSP
Read Local OOB Ext Data - Success SC
---
 tools/mgmt-tester.c | 50 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 504dc1497..3dcf4f319 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -5238,6 +5238,44 @@ static const struct generic_data read_local_oob_success_sc_test = {
 	.expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA,
 };
 
+static const uint8_t oob_type_bredr[] = { 0x01 };
+static const struct generic_data read_local_oob_ext_invalid_index_test = {
+	.send_index_none = true,
+	.send_opcode = MGMT_OP_READ_LOCAL_OOB_EXT_DATA,
+	.send_param = oob_type_bredr,
+	.send_len = sizeof(oob_type_bredr),
+	.expect_status = MGMT_STATUS_INVALID_INDEX,
+};
+
+static const struct generic_data read_local_oob_ext_legacy_pairing_test = {
+	.setup_settings = settings_powered,
+	.send_opcode = MGMT_OP_READ_LOCAL_OOB_EXT_DATA,
+	.send_param = oob_type_bredr,
+	.send_len = sizeof(oob_type_bredr),
+	.expect_ignore_param = true,
+	.expect_status = MGMT_STATUS_NOT_SUPPORTED,
+};
+
+static const struct generic_data read_local_oob_ext_success_ssp_test = {
+	.setup_settings = settings_powered_ssp,
+	.send_opcode = MGMT_OP_READ_LOCAL_OOB_EXT_DATA,
+	.send_param = oob_type_bredr,
+	.send_len = sizeof(oob_type_bredr),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_ignore_param = true,
+	.expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_DATA,
+};
+
+static const struct generic_data read_local_oob_ext_success_sc_test = {
+	.setup_settings = settings_powered_sc,
+	.send_opcode = MGMT_OP_READ_LOCAL_OOB_EXT_DATA,
+	.send_param = oob_type_bredr,
+	.send_len = sizeof(oob_type_bredr),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_ignore_param = true,
+	.expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA,
+};
+
 static const uint8_t le_states_conn_slave_adv_connectable[] = {
 			0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00, 0x00};
 static const uint8_t le_states_conn_slave_adv_non_connectable[] = {
@@ -12026,6 +12064,18 @@ int main(int argc, char *argv[])
 	test_bredrle("Read Local OOB Data - Success SC",
 				&read_local_oob_success_sc_test,
 				NULL, test_command_generic);
+	test_bredrle("Read Local OOB Ext Data - Invalid index",
+				&read_local_oob_ext_invalid_index_test,
+				NULL, test_command_generic);
+	test_bredr20("Read Local OOB Ext Data - Legacy pairing",
+				&read_local_oob_ext_legacy_pairing_test,
+				NULL, test_command_generic);
+	test_bredrle("Read Local OOB Ext Data - Success SSP",
+				&read_local_oob_ext_success_ssp_test,
+				NULL, test_command_generic);
+	test_bredrle("Read Local OOB Ext Data - Success SC",
+				&read_local_oob_ext_success_sc_test,
+				NULL, test_command_generic);
 
 	test_bredrle("Device Found - Advertising data - Zero padded",
 				&device_found_gtag,
-- 
2.31.1


             reply	other threads:[~2021-08-18 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 18:31 Brian Gix [this message]
2021-08-18 19:03 ` [BlueZ] tools/mgmt-tester: Add Read OOB Ext Data test cases bluez.test.bot

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=20210818183108.1636030-1-brian.gix@intel.com \
    --to=brian.gix@intel.com \
    --cc=hj.tedd.an@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=luiz.von.dentz@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.