From aec8ed66616e2da494eee2128e6fb53ab1cedacd Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 18 Jan 2013 14:32:21 +0200 Subject: [PATCH] tools: Add mgmt_pair_device test with invalid address type --- tools/mgmt-tester.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 2ea90de43..2e0639697 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -1047,6 +1047,10 @@ static const char pair_device_param[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00 }; static const char pair_device_rsp[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00 }; +static const char pair_device_invalid_param_1[] = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff, 0x00 }; +static const char pair_device_invalid_param_rsp_1[] = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff }; static const struct generic_data pair_device_not_powered_test_1 = { .send_opcode = MGMT_OP_PAIR_DEVICE, @@ -1057,6 +1061,15 @@ static const struct generic_data pair_device_not_powered_test_1 = { .expect_len = sizeof(pair_device_rsp), }; +static const struct generic_data pair_device_invalid_param_test_1 = { + .send_opcode = MGMT_OP_PAIR_DEVICE, + .send_param = pair_device_invalid_param_1, + .send_len = sizeof(pair_device_invalid_param_1), + .expect_status = MGMT_STATUS_INVALID_PARAMS, + .expect_param = pair_device_invalid_param_rsp_1, + .expect_len = sizeof(pair_device_invalid_param_rsp_1), +}; + static void powered_delay(void *user_data) { tester_setup_complete(); @@ -1596,6 +1609,9 @@ int main(int argc, char *argv[]) test_bredr("Pair Device - Not Powered 1", &pair_device_not_powered_test_1, NULL, test_command_generic); + test_bredr("Pair Device - Invalid Parameters 1", + &pair_device_invalid_param_test_1, NULL, + test_command_generic); return tester_run(); } -- 2.47.3