diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index c663697..06253c6 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
Application Count Description
-------------------------------------------
-mgmt-tester 291 Kernel management interface testing
+mgmt-tester 293 Kernel management interface testing
l2cap-tester 27 Kernel L2CAP implementation testing
rfcomm-tester 9 Kernel RFCOMM implementation testing
smp-tester 5 Kernel SMP implementation testing
gap-tester 1 Daemon D-Bus API testing
hci-tester 14 Controller hardware testing
-----
- 355
+ 357
Android end-to-end testing
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 98dce4e..d997010 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
uint16_t send_len;
const void * (*send_func)(uint16_t *len);
uint8_t expect_status;
+ bool expect_ignore_param;
const void *expect_param;
uint16_t expect_len;
const void * (*expect_func)(uint16_t *len);
static uint16_t settings_powered_ssp[] = { MGMT_OP_SET_SSP,
MGMT_OP_SET_POWERED, 0 };
+static uint16_t settings_powered_sc[] = { MGMT_OP_SET_SSP,
+ MGMT_OP_SET_SECURE_CONN,
+ MGMT_OP_SET_POWERED, 0 };
+
static const char set_sc_on_param[] = { 0x01 };
static const char set_sc_only_on_param[] = { 0x02 };
static const char set_sc_invalid_param[] = { 0x03 };
.expect_status = MGMT_STATUS_NOT_SUPPORTED,
};
+static const struct generic_data read_local_oob_success_ssp_test = {
+ .setup_settings = settings_powered_ssp,
+ .send_opcode = MGMT_OP_READ_LOCAL_OOB_DATA,
+ .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_success_sc_test = {
+ .setup_settings = settings_powered_sc,
+ .send_opcode = MGMT_OP_READ_LOCAL_OOB_DATA,
+ .expect_status = MGMT_STATUS_SUCCESS,
+ .expect_ignore_param = true,
+ .expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA,
+};
+
static void client_cmd_complete(uint16_t opcode, uint8_t status,
const void *param, uint8_t len,
void *user_data)
return;
}
- if (test->expect_func)
- expect_param = test->expect_func(&expect_len);
+ if (!test->expect_ignore_param) {
+ if (test->expect_func)
+ expect_param = test->expect_func(&expect_len);
- if (length != expect_len) {
- tester_test_failed();
- return;
- }
+ if (length != expect_len) {
+ tester_test_failed();
+ return;
+ }
- if (expect_param && expect_len > 0 &&
- memcmp(param, expect_param, length)) {
- tester_test_failed();
- return;
+ if (expect_param && expect_len > 0 &&
+ memcmp(param, expect_param, length)) {
+ tester_test_failed();
+ return;
+ }
}
test_condition_complete(data);
test_bredr20("Read Local OOB Data - Legacy pairing",
&read_local_oob_legacy_pairing_test,
NULL, test_command_generic);
+ test_bredrle("Read Local OOB Data - Success SSP",
+ &read_local_oob_success_ssp_test,
+ NULL, test_command_generic);
+ test_bredrle("Read Local OOB Data - Success SC",
+ &read_local_oob_success_sc_test,
+ NULL, test_command_generic);
return tester_run();
}