From a3291a3b319eb1a6d8cf975edfb8bd6c52214a89 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 24 Feb 2014 12:14:23 +0200 Subject: [PATCH] tools/mgmt-tester: Add Load IRKs test for non-static address --- tools/mgmt-tester.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index e97e6ac17..9a2506105 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -2657,13 +2657,25 @@ static const char load_irks_nval_addr_type[] = { 0x01, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; -static const struct generic_data load_irks_nval_param_test = { +static const struct generic_data load_irks_nval_param1_test = { .send_opcode = MGMT_OP_LOAD_IRKS, .send_param = load_irks_nval_addr_type, .send_len = sizeof(load_irks_nval_addr_type), .expect_status = MGMT_STATUS_INVALID_PARAMS, }; +static const char load_irks_nval_rand_addr[] = { 0x01, 0x00, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x02, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; + +static const struct generic_data load_irks_nval_param2_test = { + .send_opcode = MGMT_OP_LOAD_IRKS, + .send_param = load_irks_nval_rand_addr, + .send_len = sizeof(load_irks_nval_rand_addr), + .expect_status = MGMT_STATUS_INVALID_PARAMS, +}; + static const struct generic_data load_irks_not_supported_test = { .send_opcode = MGMT_OP_LOAD_IRKS, .send_param = load_irks_empty_list, @@ -3967,8 +3979,11 @@ int main(int argc, char *argv[]) test_bredrle("Load IRKs - Success 2", &load_irks_success2_test, NULL, test_command_generic); - test_bredrle("Load IRKs - Invalid Parameters", - &load_irks_nval_param_test, + test_bredrle("Load IRKs - Invalid Parameters 1", + &load_irks_nval_param1_test, + NULL, test_command_generic); + test_bredrle("Load IRKs - Invalid Parameters 2", + &load_irks_nval_param2_test, NULL, test_command_generic); test_bredr("Load IRKs - Not Supported", &load_irks_not_supported_test, -- 2.47.3