From 65256bd9156968ea03403eeeec2721c6e25de0a2 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 18 Jan 2013 13:15:53 +0200 Subject: [PATCH] tools: Add basic failure test case for mgmt_load_long_term_keys --- tools/mgmt-tester.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index ade39886c..fb9443ff7 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -950,6 +950,7 @@ static const struct generic_data load_link_keys_invalid_params_test_2 = { }; static const char load_ltks_valid_param_1[] = { 0x00, 0x00 }; +static const char load_ltks_invalid_param_1[] = { 0x01, 0x00 }; static const struct generic_data load_ltks_success_test_1 = { .send_opcode = MGMT_OP_LOAD_LONG_TERM_KEYS, @@ -958,6 +959,13 @@ static const struct generic_data load_ltks_success_test_1 = { .expect_status = MGMT_STATUS_SUCCESS, }; +static const struct generic_data load_ltks_invalid_params_test_1 = { + .send_opcode = MGMT_OP_LOAD_LONG_TERM_KEYS, + .send_param = load_ltks_invalid_param_1, + .send_len = sizeof(load_ltks_invalid_param_1), + .expect_status = MGMT_STATUS_INVALID_PARAMS, +}; + static void powered_delay(void *user_data) { tester_setup_complete(); @@ -1478,6 +1486,9 @@ int main(int argc, char *argv[]) test_bredr("Load Long Term Keys - Success 1", &load_ltks_success_test_1, NULL, test_command_generic); + test_bredr("Load Long Term Keys - Invalid Parameters 1", + &load_ltks_invalid_params_test_1, NULL, + test_command_generic); return tester_run(); } -- 2.47.3