2014-12-04 17:03:53

by Marie Janssen

[permalink] [raw]
Subject: [PATCH BlueZ 0/2] unit/gatt: Replace custom structs with gatt_db

These patches replace the custom structs in test-gatt with building an
appropriate gatt_db and comparing the rebuilt client gatt_db with the source.

This set replaces service_data_1 with a gatt_db made by make_service_1_db(),
which is still closely tied to the SERVICE_DATA_1_PDU.

Michael Janssen (2):
unit/gatt: Use gatt_db for test data
Remove unused old test db structures

unit/test-gatt.c | 425 +++++++++++++++++++++++++++++--------------------------
1 file changed, 226 insertions(+), 199 deletions(-)

--
2.2.0.rc0.207.ga3a616c



2014-12-05 15:06:04

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ 0/2] unit/gatt: Replace custom structs with gatt_db

Hi Michael,

On Thu, Dec 4, 2014 at 7:03 PM, Michael Janssen <[email protected]> wrote:
> These patches replace the custom structs in test-gatt with building an
> appropriate gatt_db and comparing the rebuilt client gatt_db with the source.
>
> This set replaces service_data_1 with a gatt_db made by make_service_1_db(),
> which is still closely tied to the SERVICE_DATA_1_PDU.
>
> Michael Janssen (2):
> unit/gatt: Use gatt_db for test data
> Remove unused old test db structures
>
> unit/test-gatt.c | 425 +++++++++++++++++++++++++++++--------------------------
> 1 file changed, 226 insertions(+), 199 deletions(-)
>
> --
> 2.2.0.rc0.207.ga3a616c

Applied after changing add_char_with_value,
gatt_db_service_add_characteristic returns you the value attribute so
you can write directly to it.

--
Luiz Augusto von Dentz

2014-12-04 17:03:55

by Marie Janssen

[permalink] [raw]
Subject: [PATCH BlueZ 2/2] Remove unused old test db structures

---
unit/test-gatt.c | 83 --------------------------------------------------------
1 file changed, 83 deletions(-)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index ff3dbba..c3767dd 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -56,31 +56,6 @@ enum context_type {
SERVER
};

-struct gatt_desc {
- uint16_t handle;
- uint8_t uuid[16];
-};
-
-struct gatt_chrc {
- uint16_t handle;
- uint16_t value_handle;
- uint8_t properties;
- uint8_t uuid[16];
-
- const struct gatt_desc *descs;
- size_t num_descs;
-};
-
-struct gatt_service {
- bool primary;
- uint16_t start_handle;
- uint16_t end_handle;
- uint8_t uuid[16];
-
- const struct gatt_chrc **chars;
- size_t num_chars;
-};
-
struct test_data {
char *test_name;
struct test_pdu *pdu_list;
@@ -193,64 +168,6 @@ static bt_uuid_t uuid_char_128 = {
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}
};

-const struct gatt_desc descriptor_1 = {
- .handle = 0x0004,
- .uuid = {0x00, 0x00, 0x29, 0x01, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb}
-};
-
-const struct gatt_chrc characteristic_1 = {
- .handle = 0x0002,
- .value_handle = 0x0003,
- .properties = 0x02,
- .uuid = {0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb},
- .descs = &descriptor_1,
- .num_descs = 1
-};
-
-const struct gatt_desc descriptor_2 = {
- .handle = 0x0008,
- .uuid = {0x00, 0x00, 0x29, 0x01, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb}
-};
-
-const struct gatt_chrc characteristic_2 = {
- .handle = 0x0006,
- .value_handle = 0x0007,
- .properties = 0x02,
- .uuid = {0x00, 0x00, 0x2a, 0x29, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb},
- .descs = &descriptor_2,
- .num_descs = 1
-};
-
-const struct gatt_chrc *characteristics_1[] = {&characteristic_1};
-const struct gatt_chrc *characteristics_2[] = {&characteristic_2};
-
-const struct gatt_service gatt_service_1 = {
- .primary = true,
- .start_handle = 0x0001,
- .end_handle = 0x0004,
- .uuid = {0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb},
- .chars = characteristics_1,
- .num_chars = sizeof(characteristics_1) / sizeof(characteristics_1[0])
-};
-
-const struct gatt_service gatt_service_2 = {
- .primary = true,
- .start_handle = 0x0005,
- .end_handle = 0x0008,
- .uuid = {0x00, 0x00, 0x18, 0x0d, 0x00, 0x00, 0x10, 0x00,
- 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb},
- .chars = characteristics_2,
- .num_chars = sizeof(characteristics_2) / sizeof(characteristics_2[0])
-};
-
-const struct gatt_service *service_data_1[] = {&gatt_service_1,
- &gatt_service_2};
-
static void test_debug(const char *str, void *user_data)
{
const char *prefix = user_data;
--
2.2.0.rc0.207.ga3a616c


2014-12-04 17:03:54

by Marie Janssen

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] unit/gatt: Use gatt_db for test data

using gatt_db for test data makes tests clearer and
is a step towards adding server tests from the spec by
that must be run against multiple databases easily.
---
unit/test-gatt.c | 342 ++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 226 insertions(+), 116 deletions(-)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 12b1919..ff3dbba 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -86,8 +86,7 @@ struct test_data {
struct test_pdu *pdu_list;
enum context_type context_type;
bt_uuid_t *uuid;
- size_t num_services;
- const struct gatt_service **services;
+ struct gatt_db *source_db;
const void *step;
};

@@ -114,7 +113,7 @@ struct context {
.size = sizeof(data(args)), \
}

-#define define_test(name, function, type, bt_uuid, bt_services, \
+#define define_test(name, function, type, bt_uuid, db, \
test_step, args...) \
do { \
const struct test_pdu pdus[] = { \
@@ -125,9 +124,7 @@ struct context {
data.context_type = type; \
data.uuid = bt_uuid; \
data.step = test_step; \
- data.services = bt_services; \
- data.num_services = sizeof(bt_services) / \
- sizeof(bt_services[0]); \
+ data.source_db = db; \
data.pdu_list = g_malloc(sizeof(pdus)); \
memcpy(data.pdu_list, pdus, sizeof(pdus)); \
g_test_add_data_func(name, &data, function); \
@@ -136,11 +133,11 @@ struct context {
#define define_test_att(name, function, bt_uuid, test_step, args...) \
define_test(name, function, ATT, bt_uuid, NULL, test_step, args)

-#define define_test_client(name, function, bt_services, test_step, args...)\
- define_test(name, function, CLIENT, NULL, bt_services, test_step, args)
+#define define_test_client(name, function, source_db, test_step, args...)\
+ define_test(name, function, CLIENT, NULL, source_db, test_step, args)

-#define define_test_server(name, function, bt_services, test_step, args...)\
- define_test(name, function, SERVER, NULL, bt_services, test_step, args)
+#define define_test_server(name, function, source_db, test_step, args...)\
+ define_test(name, function, SERVER, NULL, source_db, test_step, args)

#define SERVICE_DATA_1_PDU \
raw_pdu(0x02, 0x00, 0x02), \
@@ -353,145 +350,166 @@ static void print_debug(const char *str, void *user_data)
g_print("%s%s\n", prefix, str);
}

-static void assert_service(const struct gatt_service *a,
- struct gatt_db_attribute *attr)
+typedef void (*test_step_t)(struct context *context);
+
+struct test_step {
+ test_step_t func;
+ uint16_t handle;
+ uint16_t end_handle;
+ uint8_t uuid[16];
+ uint8_t expected_att_ecode;
+ const uint8_t *value;
+ uint16_t length;
+};
+
+struct db_attribute_test_data {
+ struct gatt_db_attribute *match;
+ bool found;
+};
+
+static bool matching_desc_data(struct gatt_db_attribute *a,
+ struct gatt_db_attribute *b)
{
- uint16_t start_handle, end_handle;
- bool primary;
- bt_uuid_t uuid;
- uint128_t u128;
+ uint16_t a_handle, b_handle;
+ const bt_uuid_t *a_uuid, *b_uuid;

- g_assert(gatt_db_attribute_get_service_data(attr, &start_handle,
- &end_handle,
- &primary, &uuid));
+ a_handle = gatt_db_attribute_get_handle(a);
+ b_handle = gatt_db_attribute_get_handle(b);

- u128 = uuid.value.u128;
+ a_uuid = gatt_db_attribute_get_type(a);
+ b_uuid = gatt_db_attribute_get_type(b);

- g_assert(a->primary && primary);
- g_assert(a->start_handle == start_handle);
- g_assert(a->end_handle == end_handle);
- g_assert(memcmp(a->uuid, u128.data, sizeof(u128.data)) == 0);
+ return a_handle == b_handle && !bt_uuid_cmp(a_uuid, b_uuid);
}

-static void assert_chrc(const struct gatt_chrc *a,
- struct gatt_db_attribute *attr)
+static void find_matching_desc(struct gatt_db_attribute *source_desc_attr,
+ void *user_data)
{
- uint16_t handle, value_handle;
- uint8_t properties;
- bt_uuid_t uuid;
- uint128_t u128;
-
- g_assert(gatt_db_attribute_get_char_data(attr, &handle,
- &value_handle,
- &properties, &uuid));
+ struct db_attribute_test_data *desc_test_data = user_data;

- u128 = uuid.value.u128;
+ if (desc_test_data->found)
+ return;

- g_assert(a->handle == handle);
- g_assert(a->value_handle == value_handle);
- g_assert(a->properties == properties);
- g_assert(memcmp(a->uuid, u128.data, sizeof(u128.data)) == 0);
+ desc_test_data->found = matching_desc_data(desc_test_data->match,
+ source_desc_attr);
}

-static void assert_desc(const struct gatt_desc *a,
- struct gatt_db_attribute *attr)
+static void match_descs(struct gatt_db_attribute *client_desc_attr,
+ void *user_data)
{
- uint16_t handle;
- const bt_uuid_t *uuid;
- uint128_t u128;
+ struct gatt_db_attribute *source_char_attr = user_data;
+ struct db_attribute_test_data desc_test_data;

- handle = gatt_db_attribute_get_handle(attr);
- uuid = gatt_db_attribute_get_type(attr);
+ desc_test_data.match = client_desc_attr;
+ desc_test_data.found = false;

- u128 = uuid->value.u128;
+ gatt_db_service_foreach_desc(source_char_attr, find_matching_desc,
+ &desc_test_data);

- g_assert(a->handle == handle);
- g_assert(memcmp(a->uuid, u128.data, sizeof(u128.data)) == 0);
+ g_assert(desc_test_data.found);
}

-typedef void (*test_step_t)(struct context *context);
-
-struct test_step {
- test_step_t func;
- uint16_t handle;
- uint16_t end_handle;
- uint8_t uuid[16];
- uint8_t expected_att_ecode;
- const uint8_t *value;
- uint16_t length;
-};
-
-struct service_test_data {
- const struct test_data *data;
- size_t svc_index;
- size_t chrc_index;
- size_t desc_index;
-};
+static bool matching_char_data(struct gatt_db_attribute *a,
+ struct gatt_db_attribute *b)
+{
+ uint16_t a_handle, b_handle, a_value_handle, b_value_handle;
+ uint8_t a_properties, b_properties;
+ bt_uuid_t a_uuid, b_uuid;
+
+ gatt_db_attribute_get_char_data(a, &a_handle, &a_value_handle,
+ &a_properties, &a_uuid);
+ gatt_db_attribute_get_char_data(b, &b_handle, &b_value_handle,
+ &b_properties, &b_uuid);
+
+ return a_handle == b_handle && a_value_handle == b_value_handle &&
+ a_properties == b_properties &&
+ !bt_uuid_cmp(&a_uuid, &b_uuid);
+}

-static void compare_desc(struct gatt_db_attribute *attr, void *user_data)
+static void find_matching_char(struct gatt_db_attribute *source_char_attr,
+ void *user_data)
{
- struct service_test_data *test_data = user_data;
- const struct gatt_service *svc;
- const struct gatt_chrc *chrc;
+ struct db_attribute_test_data *char_test_data = user_data;

- svc = test_data->data->services[test_data->svc_index];
- chrc = svc->chars[test_data->chrc_index];
- g_assert(test_data->desc_index < chrc->num_descs);
+ if (char_test_data->found)
+ return;

- assert_desc(&chrc->descs[test_data->desc_index], attr);
+ if (matching_char_data(char_test_data->match, source_char_attr)) {

- test_data->desc_index++;
+ gatt_db_service_foreach_desc(char_test_data->match, match_descs,
+ source_char_attr);
+ char_test_data->found = true;
+ }
}

-static void compare_chrc(struct gatt_db_attribute *attr, void *user_data)
+static void match_chars(struct gatt_db_attribute *client_char_attr,
+ void *user_data)
{
- struct service_test_data *test_data = user_data;
- const struct gatt_service *svc;
- const struct gatt_chrc *chrc;
+ struct gatt_db_attribute *source_serv_attr = user_data;
+ struct db_attribute_test_data char_test_data;

- svc = test_data->data->services[test_data->svc_index];
- g_assert(test_data->chrc_index < svc->num_chars);
- chrc = svc->chars[test_data->chrc_index];
+ char_test_data.match = client_char_attr;
+ char_test_data.found = false;

- assert_chrc(chrc, attr);
+ gatt_db_service_foreach_char(source_serv_attr, find_matching_char,
+ &char_test_data);

- test_data->desc_index = 0;
+ g_assert(char_test_data.found);
+}
+
+static bool matching_service_data(struct gatt_db_attribute *a,
+ struct gatt_db_attribute *b)
+{
+ uint16_t a_start, b_start, a_end, b_end;
+ bool a_primary, b_primary;
+ bt_uuid_t a_uuid, b_uuid;

- gatt_db_service_foreach_desc(attr, compare_desc, test_data);
- g_assert(test_data->desc_index == chrc->num_descs);
+ gatt_db_attribute_get_service_data(a, &a_start, &a_end, &a_primary,
+ &a_uuid);
+ gatt_db_attribute_get_service_data(b, &b_start, &b_end, &b_primary,
+ &b_uuid);

- test_data->chrc_index++;
+ return a_start == b_start && a_end == b_end && a_primary == b_primary &&
+ !bt_uuid_cmp(&a_uuid, &b_uuid);
}

-static void compare_service(struct gatt_db_attribute *attr, void *user_data)
+static void find_matching_service(struct gatt_db_attribute *source_serv_attr,
+ void *user_data)
{
- struct service_test_data *test_data = user_data;
- const struct gatt_service *svc;
+ struct db_attribute_test_data *serv_test_data = user_data;

- g_assert(test_data->svc_index < test_data->data->num_services);
- svc = test_data->data->services[test_data->svc_index];
+ if (serv_test_data->found)
+ return;
+
+ if (matching_service_data(serv_test_data->match, source_serv_attr)) {
+ gatt_db_service_foreach_char(serv_test_data->match, match_chars,
+ source_serv_attr);
+ serv_test_data->found = true;
+ }
+}

- assert_service(test_data->data->services[test_data->svc_index], attr);
+static void match_services(struct gatt_db_attribute *client_serv_attr,
+ void *user_data)
+{
+ struct gatt_db *source_db = user_data;
+ struct db_attribute_test_data serv_test_data;

- test_data->chrc_index = 0;
+ serv_test_data.match = client_serv_attr;
+ serv_test_data.found = false;

- gatt_db_service_foreach_char(attr, compare_chrc, test_data);
- g_assert(test_data->chrc_index == svc->num_chars);
+ gatt_db_foreach_service(source_db,
+ find_matching_service, &serv_test_data);

- test_data->svc_index++;
+ g_assert(serv_test_data.found);
}

static void client_ready_cb(bool success, uint8_t att_ecode, void *user_data)
{
struct context *context = user_data;
- struct service_test_data test_data;

g_assert(success);

- test_data.data = context->data;
- test_data.svc_index = 0;
-
- if (!test_data.data->services) {
+ if (!context->data->source_db) {
context_quit(context);
return;
}
@@ -499,9 +517,8 @@ static void client_ready_cb(bool success, uint8_t att_ecode, void *user_data)
g_assert(context->client);
g_assert(context->client_db);

- gatt_db_foreach_service(context->client_db, compare_service,
- &test_data);
- g_assert(test_data.svc_index == test_data.data->num_services);
+ gatt_db_foreach_service(context->client_db, match_services,
+ context->data->source_db);

if (context->data->step) {
const struct test_step *step = context->data->step;
@@ -721,6 +738,95 @@ const struct test_step test_read_4 = {
.expected_att_ecode = 0x08,
};

+static void att_write_cb(struct gatt_db_attribute *att, int err,
+ void *user_data)
+{
+ g_assert(!err);
+}
+
+static struct gatt_db_attribute *add_char_with_value(struct gatt_db *db,
+ struct gatt_db_attribute *service_att,
+ bt_uuid_t *uuid,
+ uint32_t att_permissions,
+ uint8_t char_properties,
+ const void *value, size_t len)
+{
+ struct gatt_db_attribute *chrc_att, *value_att;
+ uint16_t value_handle;
+
+ chrc_att = gatt_db_service_add_characteristic(service_att, uuid,
+ att_permissions,
+ char_properties,
+ NULL, NULL,
+ NULL);
+
+ gatt_db_attribute_get_char_data(chrc_att, NULL, &value_handle, NULL,
+ NULL);
+
+ value_att = gatt_db_get_attribute(db, value_handle);
+
+ gatt_db_attribute_write(value_att, 0, value, len, 0x00, NULL,
+ att_write_cb, NULL);
+
+ return chrc_att;
+}
+
+static struct gatt_db_attribute *
+add_user_description(struct gatt_db_attribute *chrc_att, const char *desc,
+ bool writable)
+{
+ struct gatt_db_attribute *desc_att;
+ bt_uuid_t uuid;
+ uint32_t permissions = BT_ATT_PERM_READ;
+
+ if (writable)
+ permissions |= BT_ATT_PERM_WRITE;
+
+ bt_uuid16_create(&uuid, GATT_CHARAC_USER_DESC_UUID);
+ desc_att = gatt_db_service_add_descriptor(chrc_att, &uuid, permissions,
+ NULL, NULL, NULL);
+
+ gatt_db_attribute_write(desc_att, 0, (uint8_t *)desc, strlen(desc),
+ 0x00, NULL, att_write_cb, NULL);
+
+ return desc_att;
+}
+
+
+typedef struct gatt_db_attribute (*add_service_func) (struct gatt_db *db,
+ uint16_t handle,
+ bool primary,
+ uint16_t extra_handles);
+
+static struct gatt_db *make_service_data_1_db(void)
+{
+ struct gatt_db *db = gatt_db_new();
+ struct gatt_db_attribute *serv_att, *chrc_att;
+ bt_uuid_t uuid;
+
+ bt_string_to_uuid(&uuid, GATT_UUID);
+ serv_att = gatt_db_insert_service(db, 0x0001, &uuid, true, 4);
+
+ bt_uuid16_create(&uuid, GATT_CHARAC_DEVICE_NAME);
+ chrc_att = add_char_with_value(db, serv_att, &uuid, BT_ATT_PERM_READ,
+ BT_GATT_CHRC_PROP_READ, "BlueZ", 5);
+
+ add_user_description(chrc_att, "Device Name", false);
+
+ bt_string_to_uuid(&uuid, HEART_RATE_UUID);
+ serv_att = gatt_db_insert_service(db, 0x0005, &uuid, true, 4);
+
+ bt_uuid16_create(&uuid, GATT_CHARAC_MANUFACTURER_NAME_STRING);
+ chrc_att = gatt_db_service_add_characteristic(serv_att, &uuid,
+ BT_ATT_PERM_READ,
+ BT_GATT_CHRC_PROP_READ,
+ NULL, NULL, NULL);
+
+ add_user_description(chrc_att, "Manufacturer Name", false);
+
+ return db;
+}
+
static void test_client(gconstpointer data)
{
struct context *context = create_context(512, data);
@@ -942,8 +1048,12 @@ static void test_read_by_type(gconstpointer data)

int main(int argc, char *argv[])
{
+ struct gatt_db *service_db_1;
+
g_test_init(&argc, &argv, NULL);

+ service_db_1 = make_service_data_1_db();
+
/*
* Server Configuration
*
@@ -1067,25 +1177,25 @@ int main(int argc, char *argv[])
raw_pdu(0x05, 0x01, 0x15, 0x00, 0x04, 0x29, 0x16, 0x00,
0x05, 0x29));

- define_test_client("/TP/GAR/CL/BV-01-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BV-01-C", test_client, service_db_1,
&test_read_1,
SERVICE_DATA_1_PDU,
raw_pdu(0x0a, 0x03, 0x00),
raw_pdu(0x0b, 0x01, 0x02, 0x03));

- define_test_client("/TP/GAR/CL/BI-01-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-01-C", test_client, service_db_1,
&test_read_2,
SERVICE_DATA_1_PDU,
raw_pdu(0x0a, 0x00, 0x00),
raw_pdu(0x01, 0x0a, 0x00, 0x00, 0x01));

- define_test_client("/TP/GAR/CL/BI-02-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-02-C", test_client, service_db_1,
&test_read_3,
SERVICE_DATA_1_PDU,
raw_pdu(0x0a, 0x03, 0x00),
raw_pdu(0x01, 0x0a, 0x03, 0x00, 0x02));

- define_test_client("/TP/GAR/CL/BI-03-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-03-C", test_client, service_db_1,
&test_read_4,
SERVICE_DATA_1_PDU,
raw_pdu(0x0a, 0x03, 0x00),
@@ -1150,37 +1260,37 @@ int main(int argc, char *argv[])
raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0d, 0x2a),
raw_pdu(0x01, 0x08, 0x0b, 0x00, 0x0c));

- define_test_client("/TP/GAR/CL/BV-05-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BV-05-C", test_client, service_db_1,
&test_multiple_read_1,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
raw_pdu(0x0f, 0x01, 0x02, 0x03));

- define_test_client("/TP/GAR/CL/BI-18-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-18-C", test_client, service_db_1,
&test_multiple_read_2,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
raw_pdu(0x01, 0x0e, 0x03, 0x00, 0x02));

- define_test_client("/TP/GAR/CL/BI-19-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-19-C", test_client, service_db_1,
&test_multiple_read_3,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
raw_pdu(0x01, 0x0e, 0x03, 0x00, 0x01));

- define_test_client("/TP/GAR/CL/BI-20-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-20-C", test_client, service_db_1,
&test_multiple_read_4,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
raw_pdu(0x01, 0x0e, 0x03, 0x00, 0x08));

- define_test_client("/TP/GAR/CL/BI-21-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-21-C", test_client, service_db_1,
&test_multiple_read_5,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
raw_pdu(0x01, 0x0e, 0x03, 0x00, 0x05));

- define_test_client("/TP/GAR/CL/BI-21-C", test_client, service_data_1,
+ define_test_client("/TP/GAR/CL/BI-21-C", test_client, service_db_1,
&test_multiple_read_6,
SERVICE_DATA_1_PDU,
raw_pdu(0x0e, 0x03, 0x00, 0x07, 0x00),
--
2.2.0.rc0.207.ga3a616c