Return-Path: From: Michael Janssen To: linux-bluetooth@vger.kernel.org Cc: Michael Janssen Subject: [PATCH BlueZ v2 04/12] unit/gatt: Add Test Spec Large Database 1 Date: Mon, 5 Jan 2015 13:32:46 -0800 Message-Id: <1420493574-37305-5-git-send-email-jamuraa@chromium.org> In-Reply-To: <1420493574-37305-1-git-send-email-jamuraa@chromium.org> References: <1420493574-37305-1-git-send-email-jamuraa@chromium.org> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Adds a large GATT database definition and initial service discovery test which satisfies a number of the requirements from the GATT Test Spec Document. --- unit/test-gatt.c | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 338 insertions(+), 1 deletion(-) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index 169fbd3..9f67239 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -152,6 +152,31 @@ struct context { raw_pdu(0x11, 0x06, 0x10, 0xF0, 0x17, 0xF0, 0x00, 0x18, \ 0xFF, 0xFF, 0xFF, 0xFF, 0x0a, 0x18) +#define PRIMARY_DISC_LARGE_DB_1 \ + raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x06, 0x10, 0x00, 0x13, 0x00, 0x01, 0x18, \ + 0x20, 0x00, 0x29, 0x00, 0x0A, 0xA0, \ + 0x30, 0x00, 0x32, 0x00, 0x0B, 0xA0), \ + raw_pdu(0x10, 0x33, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x06, 0x40, 0x00, 0x46, 0x00, 0x00, 0x18, \ + 0x50, 0x00, 0x52, 0x00, 0x0B, 0xA0, \ + 0x60, 0x00, 0x6B, 0x00, 0x0B, 0xA0), \ + raw_pdu(0x10, 0x6C, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x06, 0x70, 0x00, 0x76, 0x00, 0x0B, 0xA0, \ + 0x80, 0x00, 0x85, 0x00, 0x0B, 0xA0), \ + raw_pdu(0x10, 0x86, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x14, 0x90, 0x00, 0x96, 0x00, \ + 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, \ + 0x00, 0x00, 0x00, 0x00, 0x0C, 0xA0, 0x00, 0x00),\ + raw_pdu(0x10, 0x97, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x06, 0xa0, 0x00, 0xb1, 0x00, 0x0f, 0xa0),\ + raw_pdu(0x10, 0xb2, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x11, 0x14, 0xC0, 0x00, 0xDD, 0x00, \ + 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, \ + 0x00, 0x00, 0x00, 0x00, 0x0C, 0xA0, 0x00, 0x00),\ + raw_pdu(0x10, 0xde, 0x00, 0xff, 0xff, 0x00, 0x28), \ + raw_pdu(0x01, 0x10, 0xde, 0x00, 0x0a) + #define SECONDARY_DISC_SMALL_DB \ raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x01, 0x28), \ raw_pdu(0x11, 0x06, 0x01, 0x00, 0x0F, 0x00, 0x0a, 0x18),\ @@ -883,6 +908,312 @@ static struct gatt_db *make_test_spec_small_db(void) return make_db(specs); } +/* + * Defined Test database 2: + * Large Database with 128-bit services at the end + * Satisfies requirements: + * 4. at least one primary service without any include or characteristic + * at the max handle. + * 6. at least one secondary service + * 7. at least one each of 16-bit and 128-bit UUID with multiple instances + * 8. some simple services, some some with included services + * 9. one instance where an included service comes before the including + * 10. one or more services with both 16-bit and 128-bit service UUIDs + * 11. simple and complex characteristics + * 12. complex chars with 16-bit and 128-bit uuids + */ + +#define STRING_512BYTES "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "11111222223333344444555556666677777888889999900000" \ + "111112222233" + +static struct gatt_db *make_test_spec_large_db_1(void) +{ + const struct att_handle_spec specs[] = { + PRIMARY_SERVICE(0x0080, "a00b", 6), + CHARACTERISTIC(0xb008, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x08), + DESCRIPTOR(0xb015, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x01), + DESCRIPTOR(0xb016, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x02), + DESCRIPTOR(0xb017, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE | + BT_ATT_PERM_ENCRYPT, 0x03), + + SECONDARY_SERVICE(0x0001, "a00d", 6), + INCLUDE(0x0080), + CHARACTERISTIC(0xb00c, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x0C), + CHARACTERISTIC(0000b00b-0000-0000-0123-456789abcdef, + BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, 0x0B), + + PRIMARY_SERVICE(0x0010, GATT_UUID, 4), + CHARACTERISTIC(GATT_CHARAC_SERVICE_CHANGED, BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_INDICATE, + 0x01, 0x00, 0xFF, 0xFF), + DESCRIPTOR(GATT_CLIENT_CHARAC_CFG_UUID, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x00, 0x00), + + PRIMARY_SERVICE(0x0020, "a00a", 10), + INCLUDE(0x0001), + CHARACTERISTIC(0xb001, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x01), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + STRING_512BYTES), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_WRITE, + "1111122222333334444455555" + "6666677777888889999900000"), + CHARACTERISTIC(0xb003, BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_WRITE, 0x03), + + PRIMARY_SERVICE(0x0030, "a00b", 3), + CHARACTERISTIC(0xb007, BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_WRITE, 0x07), + + PRIMARY_SERVICE(0x0040, GAP_UUID, 7), + CHARACTERISTIC_STR(GATT_CHARAC_DEVICE_NAME, BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ, + "Test Database"), + CHARACTERISTIC(GATT_CHARAC_APPEARANCE, BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ, 17), + CHARACTERISTIC(GATT_CHARAC_PERIPHERAL_PREF_CONN, + BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x64, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x07, 0xD0), + + PRIMARY_SERVICE(0x0050, "a00b", 3), + CHARACTERISTIC(0xb006, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE | + BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP | + BT_GATT_CHRC_PROP_NOTIFY | + BT_GATT_CHRC_PROP_INDICATE, 0x06), + + PRIMARY_SERVICE(0x0060, "a00b", 12), + CHARACTERISTIC(0xb004, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | BT_GATT_CHRC_PROP_WRITE, 0x04), + CHARACTERISTIC(0xb004, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | BT_GATT_CHRC_PROP_WRITE, 0x04), + DESCRIPTOR(GATT_SERVER_CHARAC_CFG_UUID, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x00, 0x00), + CHARACTERISTIC(0xb004, 0, 0, 0x04), + DESCRIPTOR(0xb012, 0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, 0x11, 0x22, 0x33, + 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, 0x11, + 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, + 0x00, 0x11, 0x22, 0x33), + CHARACTERISTIC(0xb004, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x04), + DESCRIPTOR(0xb012, BT_ATT_PERM_READ, 0x11, 0x22, 0x33, 0x44, + 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, + 0x77, 0x88, 0x99, 0x00, 0x11, 0x22, 0x33), + + PRIMARY_SERVICE(0x0070, "a00b", 7), + CHARACTERISTIC(0xb005, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE | + BT_GATT_CHRC_PROP_EXT_PROP, + 0x05), + DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x03, + 0x00), + DESCRIPTOR_STR(GATT_CHARAC_USER_DESC_UUID, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + DESCRIPTOR(GATT_CHARAC_FMT_UUID, 0x04, 0x00, 0x01, 0x30, 0x01, + 0x11, 0x31), + DESCRIPTOR(0000d5d4-0000-0000-0123-456789abcdef, + BT_ATT_PERM_READ, 0x44), + + /* 0x0080 service defined earlier, included in 0x0001 */ + + PRIMARY_SERVICE(0x0090, "0000a00c-0000-0000-0123-456789abcdef", + 7), + INCLUDE(0x0001), + CHARACTERISTIC(0000b009-0000-0000-0123-456789abcdef, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE | + BT_GATT_CHRC_PROP_EXT_PROP, 0x09), + DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x01, + 0x00), + DESCRIPTOR(0000d9d2-0000-0000-0123-456789abcdef, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x22), + DESCRIPTOR(0000d9d3-0000-0000-0123-456789abcdef, + BT_ATT_PERM_WRITE, 0x33), + + PRIMARY_SERVICE(0x00a0, "a00f", 18), + CHARACTERISTIC_STR(0xb00e, BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ, "Length is "), + DESCRIPTOR(GATT_CHARAC_FMT_UUID, BT_ATT_PERM_READ, 0x19, 0x00, + 0x00, 0x30, 0x01, 0x00, 0x00), + CHARACTERISTIC(0xb00f, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, 0x65), + DESCRIPTOR(GATT_CHARAC_FMT_UUID, BT_ATT_PERM_READ, 0x04, 0x00, + 0x01, 0x27, 0x01, 0x01, 0x00), + CHARACTERISTIC(0xb006, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x34, 0x12), + DESCRIPTOR(GATT_CHARAC_FMT_UUID, BT_ATT_PERM_READ, 0x06, 0x00, + 0x10, 0x27, 0x01, 0x02, 0x00), + CHARACTERISTIC(0xb007, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x04, 0x03, 0x02, 0x01), + DESCRIPTOR(GATT_CHARAC_FMT_UUID, BT_ATT_PERM_READ, 0x08, 0x00, + 0x17, 0x27, 0x01, 0x03, 0x00), + CHARACTERISTIC(0xb010, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x65, 0x34, 0x12, 0x04, 0x03, 0x02, + 0x01), + DESCRIPTOR(GATT_CHARAC_AGREG_FMT_UUID, BT_ATT_PERM_READ, 0xA6, + 0x00, 0xa9, 0x00, 0xac, 0x00), + CHARACTERISTIC(0xb011, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_AUTH, 0x012), + + PRIMARY_SERVICE(0x00C0, "0000a00c-0000-0000-0123-456789abcdef", + 30), + CHARACTERISTIC(0xb00a, BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_READ, + 0x0A), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "111112222233333444445"), + DESCRIPTOR(0xb012, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "2222233333444445555566"), + DESCRIPTOR(0xb013, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, + 0x22), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "33333444445555566666777"), + DESCRIPTOR(0xb014, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, + 0x22, 0x33), + CHARACTERISTIC(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33), + DESCRIPTOR(0xb012, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33), + CHARACTERISTIC(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44), + DESCRIPTOR(0xb013, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44), + CHARACTERISTIC(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55), + DESCRIPTOR(0xb014, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "1111122222333334444455555" + "666667777788888999"), + DESCRIPTOR(0xb012, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "2222233333444445555566666" + "7777788888999990000"), + DESCRIPTOR(0xb013, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44), + CHARACTERISTIC_STR(0xb002, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE, + "3333344444555556666677777" + "88888999990000011111"), + DESCRIPTOR(0xb014, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, + 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, + 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, + 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x11, 0x22, + 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, + 0x11, 0x22, 0x33, 0x44, 0x55), + { } + }; + + return make_db(specs); +} + static void test_client(gconstpointer data) { struct context *context = create_context(512, data); @@ -1104,12 +1435,13 @@ static void test_read_by_type(gconstpointer data) int main(int argc, char *argv[]) { - struct gatt_db *service_db_1, *ts_small_db; + struct gatt_db *service_db_1, *ts_small_db, *ts_large_db_1; g_test_init(&argc, &argv, NULL); service_db_1 = make_service_data_1_db(); ts_small_db = make_test_spec_small_db(); + ts_large_db_1 = make_test_spec_large_db_1(); /* * Server Configuration @@ -1165,6 +1497,11 @@ int main(int argc, char *argv[]) raw_pdu(0x03, 0x00, 0x02), PRIMARY_DISC_SMALL_DB); + define_test_server("/TP/GAD/SR/BV-01-C-large-1", test_server, + ts_large_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + PRIMARY_DISC_LARGE_DB_1); + define_test_att("/TP/GAD/CL/BV-02-C-1", test_search_primary, &uuid_16, NULL, MTU_EXCHANGE_CLIENT_PDUS, -- 2.2.0.rc0.207.ga3a616c