From 2d9bf236c70434e0015043ec4a572f2bbf837232 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 27 Jan 2015 13:41:21 +0200 Subject: [PATCH] unit/gatt: Add TP/GAR/CL/BI-17-C test Verify Generic Attribute Profile client behavior when the Read Long Characteristic Value procedure fails due to insufficient encryption key size. --- unit/test-gatt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index 8c08c4b23..bbafbda9c 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -1490,6 +1490,12 @@ static const struct test_step test_long_read_7 = { .expected_att_ecode = 0x05 }; +static const struct test_step test_long_read_8 = { + .handle = 0x0003, + .func = test_long_read, + .expected_att_ecode = 0x0c +}; + int main(int argc, char *argv[]) { struct gatt_db *service_db_1, *ts_small_db, *ts_large_db_1; @@ -2178,6 +2184,12 @@ int main(int argc, char *argv[]) raw_pdu(0x0c, 0x03, 0x00, 0x00, 0x00), raw_pdu(0x01, 0x0c, 0x03, 0x00, 0x05)); + define_test_client("/TP/GAR/CL/BI-17-C", test_client, service_db_1, + &test_long_read_8, + SERVICE_DATA_1_PDUS, + raw_pdu(0x0c, 0x03, 0x00, 0x00, 0x00), + raw_pdu(0x01, 0x0c, 0x03, 0x00, 0x0c)); + define_test_client("/TP/GAR/CL/BI-18-C", test_client, service_db_1, &test_multiple_read_2, SERVICE_DATA_1_PDUS, -- 2.47.3