From dcfedc3dc31913716cce2f8db5a8d8782c7f2b1e Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 26 Jan 2013 17:46:19 +0200 Subject: [PATCH] tools: Add another mgmt_set_link_security success test case --- tools/mgmt-tester.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 5d488616f..534dd3dfc 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -745,6 +745,19 @@ static const struct generic_data set_link_sec_on_success_test_2 = { .expect_hci_len = sizeof(set_link_sec_auth_enable_param), }; +static const struct generic_data set_link_sec_on_success_test_3 = { + .send_opcode = MGMT_OP_SET_POWERED, + .send_param = set_powered_on_param, + .send_len = sizeof(set_powered_on_param), + .expect_status = MGMT_STATUS_SUCCESS, + .expect_param = set_link_sec_settings_param_2, + .expect_len = sizeof(set_link_sec_settings_param_2), + .expect_settings_set = MGMT_SETTING_LINK_SECURITY, + .expect_hci_command = BT_HCI_CMD_WRITE_AUTH_ENABLE, + .expect_hci_param = set_link_sec_auth_enable_param, + .expect_hci_len = sizeof(set_link_sec_auth_enable_param), +}; + static const struct generic_data set_link_sec_on_invalid_param_test_1 = { .send_opcode = MGMT_OP_SET_LINK_SECURITY, .expect_status = MGMT_STATUS_INVALID_PARAMS, @@ -2196,6 +2209,9 @@ int main(int argc, char *argv[]) test_bredr("Set link security on - Success 2", &set_link_sec_on_success_test_2, setup_powered, test_command_generic); + test_bredr("Set link security on - Success 3", + &set_link_sec_on_success_test_3, + setup_link_sec, test_command_generic); test_bredr("Set link security on - Invalid parameters 1", &set_link_sec_on_invalid_param_test_1, NULL, test_command_generic); -- 2.47.3