#include <assert.h>
#include <setjmp.h>
#include <check.h>
+#include <vppinfra/string.h>
#include <vapi/vapi.h>
#include <vapi/vpe.api.vapi.h>
#include <vapi/interface.api.vapi.h>
#include <vapi/l2.api.vapi.h>
-#include <vapi/stats.api.vapi.h>
#include <fake.api.vapi.h>
+#include <vppinfra/vec.h>
+#include <vppinfra/mem.h>
+
DEFINE_VAPI_MSG_IDS_VPE_API_JSON;
DEFINE_VAPI_MSG_IDS_INTERFACE_API_JSON;
DEFINE_VAPI_MSG_IDS_L2_API_JSON;
-DEFINE_VAPI_MSG_IDS_STATS_API_JSON;
DEFINE_VAPI_MSG_IDS_FAKE_API_JSON;
static char *app_name = NULL;
static const int max_outstanding_requests = 64;
static const int response_queue_size = 32;
+/* centos has ancient check so we hack our way around here
+ * to make it work somehow */
+#ifndef ck_assert_ptr_eq
+#define ck_assert_ptr_eq(X,Y) ck_assert_int_eq((long)X, (long)Y)
+#endif
+
+#ifndef ck_assert_ptr_ne
+#define ck_assert_ptr_ne(X,Y) ck_assert_int_ne((long)X, (long)Y)
+#endif
+
START_TEST (test_invalid_values)
{
vapi_ctx_t ctx;
rv = vapi_send (ctx, sv);
ck_assert_int_eq (VAPI_EINVAL, rv);
rv = vapi_connect (ctx, app_name, api_prefix, max_outstanding_requests,
- response_queue_size, VAPI_MODE_BLOCKING);
+ response_queue_size, VAPI_MODE_BLOCKING, true);
ck_assert_int_eq (VAPI_OK, rv);
rv = vapi_send (ctx, NULL);
ck_assert_int_eq (VAPI_EINVAL, rv);
rv = vapi_send (NULL, NULL);
ck_assert_int_eq (VAPI_EINVAL, rv);
- rv = vapi_recv (NULL, NULL, NULL);
+ rv = vapi_recv (NULL, NULL, NULL, 0, 0);
ck_assert_int_eq (VAPI_EINVAL, rv);
- rv = vapi_recv (ctx, NULL, NULL);
+ rv = vapi_recv (ctx, NULL, NULL, 0, 0);
ck_assert_int_eq (VAPI_EINVAL, rv);
vapi_msg_show_version_reply *reply;
- rv = vapi_recv (ctx, (void **) &reply, NULL);
+ rv = vapi_recv (ctx, (void **) &reply, NULL, 0, 0);
ck_assert_int_eq (VAPI_EINVAL, rv);
rv = vapi_disconnect (ctx);
ck_assert_int_eq (VAPI_OK, rv);
END_TEST;
-START_TEST (test_hton_3)
-{
- const size_t data_size = 10;
- vapi_msg_vnet_interface_combined_counters *m =
- malloc (sizeof (vapi_msg_vnet_interface_combined_counters) +
- data_size * sizeof (vapi_type_vlib_counter));
- ck_assert_ptr_ne (NULL, m);
- vapi_payload_vnet_interface_combined_counters *p = &m->payload;
- const u16 _vl_msg_id = 1;
- p->_vl_msg_id = _vl_msg_id;
- const u32 first_sw_if_index = 2;
- p->first_sw_if_index = first_sw_if_index;
- p->count = data_size;
- const u64 packets = 1234;
- const u64 bytes = 2345;
- int i;
- for (i = 0; i < data_size; ++i)
- {
- p->data[i].packets = packets;
- p->data[i].bytes = bytes;
- }
- vapi_msg_vnet_interface_combined_counters_hton (m);
- ck_assert_int_eq (_vl_msg_id, be16toh (p->_vl_msg_id));
- ck_assert_int_eq (first_sw_if_index, be32toh (p->first_sw_if_index));
- ck_assert_int_eq (data_size, be32toh (p->count));
- for (i = 0; i < data_size; ++i)
- {
- ck_assert_int_eq (packets, be64toh (p->data[i].packets));
- ck_assert_int_eq (bytes, be64toh (p->data[i].bytes));
- }
- free (p);
-}
-
-END_TEST;
-
#define verify_hton_swap(expr, value) \
if (4 == sizeof (expr)) \
{ \
d->header._vl_msg_id = cnt++;
d->header.context = cnt++;
d->payload.bd_id = cnt++;
- d->payload.flood = cnt++;
- d->payload.uu_flood = cnt++;
- d->payload.forward = cnt++;
- d->payload.learn = cnt++;
- d->payload.arp_term = cnt++;
d->payload.mac_age = cnt++;
d->payload.bvi_sw_if_index = cnt++;
d->payload.n_sw_ifs = vla_count;
++tmp;
verify_hton_swap (d->payload.bd_id, tmp);
++tmp;
- verify_hton_swap (d->payload.flood, tmp);
- ++tmp;
- verify_hton_swap (d->payload.uu_flood, tmp);
- ++tmp;
- verify_hton_swap (d->payload.forward, tmp);
- ++tmp;
- verify_hton_swap (d->payload.learn, tmp);
- ++tmp;
- verify_hton_swap (d->payload.arp_term, tmp);
- ++tmp;
verify_hton_swap (d->payload.mac_age, tmp);
++tmp;
verify_hton_swap (d->payload.bvi_sw_if_index, tmp);
++tmp;
ck_assert_int_eq (d->payload.bd_id, tmp);
++tmp;
- ck_assert_int_eq (d->payload.flood, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.uu_flood, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.forward, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.learn, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.arp_term, tmp);
- ++tmp;
ck_assert_int_eq (d->payload.mac_age, tmp);
++tmp;
ck_assert_int_eq (d->payload.bvi_sw_if_index, tmp);
END_TEST;
-START_TEST (test_ntoh_3)
-{
- const size_t data_size = 10;
- vapi_msg_vnet_interface_combined_counters *m =
- malloc (sizeof (vapi_msg_vnet_interface_combined_counters) +
- data_size * sizeof (vapi_type_vlib_counter));
- ck_assert_ptr_ne (NULL, m);
- vapi_payload_vnet_interface_combined_counters *p = &m->payload;
- const u16 _vl_msg_id = 1;
- p->_vl_msg_id = _vl_msg_id;
- const u32 first_sw_if_index = 2;
- p->first_sw_if_index = first_sw_if_index;
- const size_t be_data_size = htobe32 (data_size);
- p->count = be_data_size;
- const u64 packets = 1234;
- const u64 bytes = 2345;
- int i;
- for (i = 0; i < data_size; ++i)
- {
- p->data[i].packets = packets;
- p->data[i].bytes = bytes;
- }
- vapi_msg_vnet_interface_combined_counters_ntoh (m);
- ck_assert_int_eq (_vl_msg_id, be16toh (p->_vl_msg_id));
- ck_assert_int_eq (first_sw_if_index, be32toh (p->first_sw_if_index));
- ck_assert_int_eq (be_data_size, be32toh (p->count));
- for (i = 0; i < data_size; ++i)
- {
- ck_assert_int_eq (packets, htobe64 (p->data[i].packets));
- ck_assert_int_eq (bytes, htobe64 (p->data[i].bytes));
- }
- free (p);
-}
-
-END_TEST;
-
#define verify_ntoh_swap(expr, value) \
if (4 == sizeof (expr)) \
{ \
d->header._vl_msg_id = cnt++;
d->header.context = cnt++;
d->payload.bd_id = cnt++;
- d->payload.flood = cnt++;
- d->payload.uu_flood = cnt++;
- d->payload.forward = cnt++;
- d->payload.learn = cnt++;
- d->payload.arp_term = cnt++;
d->payload.mac_age = cnt++;
d->payload.bvi_sw_if_index = cnt++;
d->payload.n_sw_ifs = htobe32 (vla_count);
++tmp;
verify_ntoh_swap (d->payload.bd_id, tmp);
++tmp;
- verify_ntoh_swap (d->payload.flood, tmp);
- ++tmp;
- verify_ntoh_swap (d->payload.uu_flood, tmp);
- ++tmp;
- verify_ntoh_swap (d->payload.forward, tmp);
- ++tmp;
- verify_ntoh_swap (d->payload.learn, tmp);
- ++tmp;
- verify_ntoh_swap (d->payload.arp_term, tmp);
- ++tmp;
verify_ntoh_swap (d->payload.mac_age, tmp);
++tmp;
verify_ntoh_swap (d->payload.bvi_sw_if_index, tmp);
++tmp;
ck_assert_int_eq (d->payload.bd_id, tmp);
++tmp;
- ck_assert_int_eq (d->payload.flood, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.uu_flood, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.forward, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.learn, tmp);
- ++tmp;
- ck_assert_int_eq (d->payload.arp_term, tmp);
- ++tmp;
ck_assert_int_eq (d->payload.mac_age, tmp);
++tmp;
ck_assert_int_eq (d->payload.bvi_sw_if_index, tmp);
vapi_error_e rv = vapi_ctx_alloc (&ctx);
ck_assert_int_eq (VAPI_OK, rv);
rv = vapi_connect (ctx, app_name, api_prefix, max_outstanding_requests,
- response_queue_size, VAPI_MODE_BLOCKING);
+ response_queue_size, VAPI_MODE_BLOCKING, true);
ck_assert_int_eq (VAPI_OK, rv);
rv = vapi_disconnect (ctx);
ck_assert_int_eq (VAPI_OK, rv);
vapi_error_e rv = vapi_ctx_alloc (&ctx);
ck_assert_int_eq (VAPI_OK, rv);
rv = vapi_connect (ctx, app_name, api_prefix, max_outstanding_requests,
- response_queue_size, VAPI_MODE_BLOCKING);
+ response_queue_size, VAPI_MODE_BLOCKING, true);
ck_assert_int_eq (VAPI_OK, rv);
}
vapi_error_e rv = vapi_ctx_alloc (&ctx);
ck_assert_int_eq (VAPI_OK, rv);
rv = vapi_connect (ctx, app_name, api_prefix, max_outstanding_requests,
- response_queue_size, VAPI_MODE_NONBLOCKING);
+ response_queue_size, VAPI_MODE_NONBLOCKING, true);
ck_assert_int_eq (VAPI_OK, rv);
}
ck_assert_int_eq (VAPI_OK, rv);
vapi_msg_show_version_reply *resp;
size_t size;
- rv = vapi_recv (ctx, (void *) &resp, &size);
+ rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
ck_assert_int_eq (VAPI_OK, rv);
int dummy;
show_version_cb (NULL, &dummy, VAPI_OK, true, &resp->payload);
}
else
{
- ck_assert (reply);
+ ck_assert (NULL != reply);
printf ("Interface dump entry: [%u]: %s\n", reply->sw_if_index,
reply->interface_name);
size_t i = 0;
printf ("--- Create/delete loopbacks using blocking API ---\n");
const size_t num_ifs = 5;
u8 mac_addresses[num_ifs][6];
- memset (&mac_addresses, 0, sizeof (mac_addresses));
+ clib_memset (&mac_addresses, 0, sizeof (mac_addresses));
u32 sw_if_indexes[num_ifs];
- memset (&sw_if_indexes, 0xff, sizeof (sw_if_indexes));
+ clib_memset (&sw_if_indexes, 0xff, sizeof (sw_if_indexes));
test_create_loopback_ctx_t clcs[num_ifs];
- memset (&clcs, 0, sizeof (clcs));
+ clib_memset (&clcs, 0, sizeof (clcs));
test_delete_loopback_ctx_t dlcs[num_ifs];
- memset (&dlcs, 0, sizeof (dlcs));
+ clib_memset (&dlcs, 0, sizeof (dlcs));
int i;
for (i = 0; i < num_ifs; ++i)
{
for (i = 0; i < attempts; ++i)
{
dctx.last_called = false;
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- memset (dump->payload.name_filter, 0,
- sizeof (dump->payload.name_filter));
+ clib_memset (dump->payload.name_filter.buf, 0,
+ dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb,
ck_assert_int_eq (true, seen[j]);
}
}
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
for (i = 0; i < num_ifs; ++i)
{
vapi_msg_delete_loopback *dl = vapi_alloc_delete_loopback (ctx);
printf ("Deleted loopback with sw_if_index %u\n", sw_if_indexes[i]);
}
dctx.last_called = false;
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- memset (dump->payload.name_filter, 0, sizeof (dump->payload.name_filter));
+ clib_memset (dump->payload.name_filter.buf, 0,
+ dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
vapi_error_e rv;
const size_t num_req = 5;
int contexts[num_req];
- memset (contexts, 0, sizeof (contexts));
+ clib_memset (contexts, 0, sizeof (contexts));
int i;
for (i = 0; i < num_req; ++i)
{
{
ck_assert_int_eq (1, contexts[i]);
}
- memset (contexts, 0, sizeof (contexts));
+ clib_memset (contexts, 0, sizeof (contexts));
rv = vapi_dispatch (ctx);
ck_assert_int_eq (VAPI_OK, rv);
for (i = 0; i < num_req; ++i)
vapi_error_e rv;
const size_t num_ifs = 5;
u8 mac_addresses[num_ifs][6];
- memset (&mac_addresses, 0, sizeof (mac_addresses));
+ clib_memset (&mac_addresses, 0, sizeof (mac_addresses));
u32 sw_if_indexes[num_ifs];
- memset (&sw_if_indexes, 0xff, sizeof (sw_if_indexes));
+ clib_memset (&sw_if_indexes, 0xff, sizeof (sw_if_indexes));
test_create_loopback_ctx_t clcs[num_ifs];
- memset (&clcs, 0, sizeof (clcs));
+ clib_memset (&clcs, 0, sizeof (clcs));
test_delete_loopback_ctx_t dlcs[num_ifs];
- memset (&dlcs, 0, sizeof (dlcs));
+ clib_memset (&dlcs, 0, sizeof (dlcs));
int i;
for (i = 0; i < num_ifs; ++i)
{
sw_if_indexes[i]);
}
bool seen[num_ifs];
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
sw_interface_dump_ctx dctx = { false, num_ifs, sw_if_indexes, seen, 0 };
vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- memset (dump->payload.name_filter, 0, sizeof (dump->payload.name_filter));
+ clib_memset (dump->payload.name_filter.buf, 0,
+ dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
{
ck_assert_int_eq (false, seen[i]);
}
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
ck_assert_int_eq (false, dctx.last_called);
rv = vapi_dispatch (ctx);
ck_assert_int_eq (VAPI_OK, rv);
{
ck_assert_int_eq (true, seen[i]);
}
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
ck_assert_int_eq (true, dctx.last_called);
for (i = 0; i < num_ifs; ++i)
{
ck_assert_int_eq (1, dlcs[i].called);
printf ("Deleted loopback with sw_if_index %u\n", sw_if_indexes[i]);
}
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
dctx.last_called = false;
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- memset (dump->payload.name_filter, 0, sizeof (dump->payload.name_filter));
+ clib_memset (dump->payload.name_filter.buf, 0,
+ dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
{
ck_assert_int_eq (false, seen[i]);
}
- memset (&seen, 0, sizeof (seen));
+ clib_memset (&seen, 0, sizeof (seen));
ck_assert_int_eq (true, dctx.last_called);
}
END_TEST;
-vapi_error_e
-interface_simple_stats_cb (vapi_ctx_t ctx, void *callback_ctx,
- vapi_error_e rv, bool is_last,
- vapi_payload_want_interface_simple_stats_reply *
- payload)
-{
- return VAPI_OK;
-}
-
-vapi_error_e
-simple_counters_cb (vapi_ctx_t ctx, void *callback_ctx,
- vapi_payload_vnet_interface_simple_counters * payload)
-{
- int *called = callback_ctx;
- ++*called;
- printf ("simple counters: first_sw_if_index=%u\n",
- payload->first_sw_if_index);
- return VAPI_OK;
-}
-
-START_TEST (test_stats_1)
-{
- printf ("--- Receive stats using generic blocking API ---\n");
- vapi_msg_want_interface_simple_stats *ws =
- vapi_alloc_want_interface_simple_stats (ctx);
- ws->payload.enable_disable = 1;
- ws->payload.pid = getpid ();
- vapi_error_e rv;
- rv = vapi_want_interface_simple_stats (ctx, ws, interface_simple_stats_cb,
- NULL);
- ck_assert_int_eq (VAPI_OK, rv);
- int called = 0;
- vapi_set_event_cb (ctx, vapi_msg_id_vnet_interface_simple_counters,
- (vapi_event_cb) simple_counters_cb, &called);
- rv = vapi_dispatch_one (ctx);
- ck_assert_int_eq (VAPI_OK, rv);
- ck_assert_int_eq (1, called);
-}
-
-END_TEST;
-
-START_TEST (test_stats_2)
-{
- printf ("--- Receive stats using stat-specific blocking API ---\n");
- vapi_msg_want_interface_simple_stats *ws =
- vapi_alloc_want_interface_simple_stats (ctx);
- ws->payload.enable_disable = 1;
- ws->payload.pid = getpid ();
- vapi_error_e rv;
- rv = vapi_want_interface_simple_stats (ctx, ws, interface_simple_stats_cb,
- NULL);
- ck_assert_int_eq (VAPI_OK, rv);
- int called = 0;
- vapi_set_vapi_msg_vnet_interface_simple_counters_event_cb (ctx,
- simple_counters_cb,
- &called);
- rv = vapi_dispatch_one (ctx);
- ck_assert_int_eq (VAPI_OK, rv);
- ck_assert_int_eq (1, called);
-}
-
-END_TEST;
-
vapi_error_e
generic_cb (vapi_ctx_t ctx, void *callback_ctx, vapi_msg_id_t id, void *msg)
{
END_TEST;
-vapi_error_e
-combined_counters_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
- vapi_payload_vnet_interface_combined_counters * payload)
-{
- int *called = callback_ctx;
- ++*called;
- printf ("combined counters: first_sw_if_index=%u\n",
- payload->first_sw_if_index);
- return VAPI_OK;
-}
-
-vapi_error_e
-stats_cb (vapi_ctx_t ctx, void *callback_ctx, vapi_error_e rv,
- bool is_last, vapi_payload_want_stats_reply * payload)
-{
- return VAPI_OK;
-}
-
-START_TEST (test_stats_3)
-{
- printf ("--- Receive multiple stats using stat-specific non-blocking API "
- "---\n");
- vapi_msg_want_stats *ws = vapi_alloc_want_stats (ctx);
- ws->payload.enable_disable = 1;
- ws->payload.pid = getpid ();
- vapi_error_e rv;
- rv = vapi_want_stats (ctx, ws, stats_cb, NULL);
- ck_assert_int_eq (VAPI_OK, rv);
- int called = 0;
- int called2 = 0;
- vapi_set_vapi_msg_vnet_interface_simple_counters_event_cb (ctx,
- simple_counters_cb,
- &called);
- vapi_set_vapi_msg_vnet_interface_combined_counters_event_cb (ctx,
- combined_counters_cb,
- &called2);
- while (!called || !called2)
- {
- if (VAPI_EAGAIN != (rv = vapi_dispatch_one (ctx)))
- {
- ck_assert_int_eq (VAPI_OK, rv);
- }
- }
-}
-
-END_TEST;
-
vapi_error_e
show_version_no_cb (vapi_ctx_t ctx, void *caller_ctx,
vapi_error_e rv, bool is_last,
END_TEST;
+START_TEST (test_api_strings)
+{
+ printf ("--- Invalid api strings ---\n");
+
+ /* test string 'TEST'
+ * size = 5
+ * length = 4
+ */
+ const char str[] = "TEST";
+ u8 *vec_str = 0, *vstr = 0;
+ char *cstr;
+
+ vapi_msg_sw_interface_dump *dump =
+ malloc (sizeof (vapi_msg_sw_interface_dump) + strlen (str));
+ clib_mem_init (0, 1 << 20);
+
+ vl_api_c_string_to_api_string (str, &dump->payload.name_filter);
+ /* Assert nul terminator NOT present */
+ ck_assert_int_eq (vl_api_string_len (&dump->payload.name_filter),
+ strlen (str));
+
+ cstr = vl_api_from_api_to_new_c_string (&dump->payload.name_filter);
+ ck_assert_ptr_ne (cstr, NULL);
+ /* Assert nul terminator present */
+ ck_assert_int_eq (vec_len (cstr), sizeof (str));
+ ck_assert_int_eq (strlen (str), strlen (cstr));
+ vec_free (cstr);
+
+ vstr = vl_api_from_api_to_new_vec (&dump->payload.name_filter);
+ ck_assert_ptr_ne (vstr, NULL);
+ /* Assert nul terminator NOT present */
+ ck_assert_int_eq (vec_len (vstr), strlen (str));
+ vec_free (vstr);
+
+ /* vector conaining NON nul terminated string 'TEST' */
+ vec_add (vec_str, str, strlen (str));
+ clib_memset (dump->payload.name_filter.buf, 0, strlen (str));
+ dump->payload.name_filter.length = 0;
+
+ vl_api_vec_to_api_string (vec_str, &dump->payload.name_filter);
+ /* Assert nul terminator NOT present */
+ ck_assert_int_eq (vl_api_string_len (&dump->payload.name_filter),
+ vec_len (vec_str));
+
+ cstr = vl_api_from_api_to_new_c_string (&dump->payload.name_filter);
+ ck_assert_ptr_ne (cstr, NULL);
+ /* Assert nul terminator present */
+ ck_assert_int_eq (vec_len (cstr), sizeof (str));
+ ck_assert_int_eq (strlen (str), strlen (cstr));
+ vec_free (cstr);
+
+ vstr = vl_api_from_api_to_new_vec (&dump->payload.name_filter);
+ ck_assert_ptr_ne (vstr, NULL);
+ /* Assert nul terminator NOT present */
+ ck_assert_int_eq (vec_len (vstr), strlen (str));
+ vec_free (vstr);
+}
+
+END_TEST;
+
Suite *
test_suite (void)
{
TCase *tc_swap = tcase_create ("Byteswap tests");
tcase_add_test (tc_swap, test_hton_1);
tcase_add_test (tc_swap, test_hton_2);
- tcase_add_test (tc_swap, test_hton_3);
tcase_add_test (tc_swap, test_hton_4);
tcase_add_test (tc_swap, test_ntoh_1);
tcase_add_test (tc_swap, test_ntoh_2);
- tcase_add_test (tc_swap, test_ntoh_3);
tcase_add_test (tc_swap, test_ntoh_4);
suite_add_tcase (s, tc_swap);
tcase_add_test (tc_block, test_show_version_1);
tcase_add_test (tc_block, test_show_version_2);
tcase_add_test (tc_block, test_loopbacks_1);
- tcase_add_test (tc_block, test_stats_1);
- tcase_add_test (tc_block, test_stats_2);
suite_add_tcase (s, tc_block);
TCase *tc_nonblock = tcase_create ("Nonblocking API");
tcase_add_test (tc_nonblock, test_show_version_4);
tcase_add_test (tc_nonblock, test_show_version_5);
tcase_add_test (tc_nonblock, test_loopbacks_2);
- tcase_add_test (tc_nonblock, test_stats_3);
tcase_add_test (tc_nonblock, test_no_response_1);
tcase_add_test (tc_nonblock, test_no_response_2);
suite_add_tcase (s, tc_nonblock);
tcase_add_test (tc_unsupported, test_unsupported);
suite_add_tcase (s, tc_unsupported);
+ TCase *tc_dynamic = tcase_create ("Dynamic message size");
+ tcase_add_test (tc_dynamic, test_api_strings);
+ suite_add_tcase (s, tc_dynamic);
+
return s;
}