From 8e9880bfa9afe6cd31afc2e6e0b0bcae30483ba4 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 18 Jan 2013 15:15:34 +0200 Subject: [PATCH] tools: Add basic invalid params test case for mgmt_unblock_device --- tools/mgmt-tester.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index f6976ab1e..273401c0a 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -1138,6 +1138,20 @@ static const struct generic_data block_device_invalid_param_test_1 = { .expect_len = sizeof(block_device_invalid_param_rsp_1), }; +static const char unblock_device_invalid_param_1[] = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff }; +static const char unblock_device_invalid_param_rsp_1[] = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff }; + +static const struct generic_data unblock_device_invalid_param_test_1 = { + .send_opcode = MGMT_OP_UNBLOCK_DEVICE, + .send_param = unblock_device_invalid_param_1, + .send_len = sizeof(unblock_device_invalid_param_1), + .expect_status = MGMT_STATUS_INVALID_PARAMS, + .expect_param = unblock_device_invalid_param_rsp_1, + .expect_len = sizeof(unblock_device_invalid_param_rsp_1), +}; + static void powered_delay(void *user_data) { tester_setup_complete(); @@ -1699,5 +1713,9 @@ int main(int argc, char *argv[]) &block_device_invalid_param_test_1, NULL, test_command_generic); + test_bredr("Unblock Device - Invalid Parameters 1", + &block_device_invalid_param_test_1, NULL, + test_command_generic); + return tester_run(); } -- 2.11.0