aboutsummaryrefslogtreecommitdiffstats
path: root/test/ext
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2019-03-01 08:55:49 +0100
committerOle Trøan <otroan@employees.org>2019-03-15 10:24:22 +0000
commite63325e3ca03c847963863446345e6c80a2c0cfd (patch)
treecae33764e6186727697e91862c32f2b08334866b /test/ext
parent4ba4edd15085ce31145ef5da6342e435c57c1150 (diff)
API: Cleanup APIs interface.api
Use of consistent API types for interface.api Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'test/ext')
-rw-r--r--test/ext/vapi_c_test.c18
-rw-r--r--test/ext/vapi_cpp_test.cpp8
2 files changed, 13 insertions, 13 deletions
diff --git a/test/ext/vapi_c_test.c b/test/ext/vapi_c_test.c
index 0b22fff1706..725f5c30407 100644
--- a/test/ext/vapi_c_test.c
+++ b/test/ext/vapi_c_test.c
@@ -514,7 +514,7 @@ sw_interface_dump_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
{
ck_assert (NULL != reply);
printf ("Interface dump entry: [%u]: %s\n", reply->sw_if_index,
- reply->interface_name);
+ reply->interface_name.buf);
size_t i = 0;
for (i = 0; i < dctx->num_ifs; ++i)
{
@@ -577,8 +577,8 @@ START_TEST (test_loopbacks_1)
clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- clib_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,
@@ -609,8 +609,8 @@ START_TEST (test_loopbacks_1)
clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- clib_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)))
@@ -734,8 +734,8 @@ START_TEST (test_loopbacks_2)
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;
- clib_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)))
@@ -775,8 +775,8 @@ START_TEST (test_loopbacks_2)
dctx.last_called = false;
dump = vapi_alloc_sw_interface_dump (ctx);
dump->payload.name_filter_valid = 0;
- clib_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)))
diff --git a/test/ext/vapi_cpp_test.cpp b/test/ext/vapi_cpp_test.cpp
index 68366af2ac8..46a2c0ec2f1 100644
--- a/test/ext/vapi_cpp_test.cpp
+++ b/test/ext/vapi_cpp_test.cpp
@@ -151,7 +151,7 @@ START_TEST (test_loopbacks_1)
Sw_interface_dump d (con);
auto &p = d.get_request ().get_payload ();
p.name_filter_valid = 0;
- memset (p.name_filter, 0, sizeof (p.name_filter));
+ memset (p.name_filter.buf, 0, p.name_filter.length);
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -193,7 +193,7 @@ START_TEST (test_loopbacks_1)
Sw_interface_dump d (con);
auto &p = d.get_request ().get_payload ();
p.name_filter_valid = 0;
- memset (p.name_filter, 0, sizeof (p.name_filter));
+ memset (p.name_filter.buf, 0, p.name_filter.length);
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -311,7 +311,7 @@ START_TEST (test_loopbacks_2)
Sw_interface_dump d (con, std::ref (swdcb));
auto &p = d.get_request ().get_payload ();
p.name_filter_valid = 0;
- memset (p.name_filter, 0, sizeof (p.name_filter));
+ memset (p.name_filter.buf, 0, p.name_filter.length);
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -340,7 +340,7 @@ START_TEST (test_loopbacks_2)
Sw_interface_dump d (con);
auto &p = d.get_request ().get_payload ();
p.name_filter_valid = 0;
- memset (p.name_filter, 0, sizeof (p.name_filter));
+ memset (p.name_filter.buf, 0, p.name_filter.length);
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);