aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat2/test
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2021-02-17 14:10:04 +0100
committerNeale Ranns <neale@graphiant.com>2021-02-18 08:18:46 +0000
commit71134f26a15f3d6b055dc122d050d71f8b8d3ed0 (patch)
tree07503f5d5a19722718be9fae2602752e85db17f7 /src/vat2/test
parent919654c07bb8fd2df30110220bbcc74fd3a40d01 (diff)
vat2: jsonconvert return checking - coverity
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I8348645927519800d2390d27e01fae612602a6eb
Diffstat (limited to 'src/vat2/test')
-rw-r--r--src/vat2/test/vat2_test.api6
-rw-r--r--src/vat2/test/vat2_test.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/vat2/test/vat2_test.api b/src/vat2/test/vat2_test.api
index afc8afa4dd7..6d211552cf6 100644
--- a/src/vat2/test/vat2_test.api
+++ b/src/vat2/test/vat2_test.api
@@ -14,6 +14,7 @@
*/
import "vnet/ip/ip_types.api";
+import "vnet/interface_types.api";
autoreply define test_prefix {
vl_api_prefix_t pref;
@@ -94,3 +95,8 @@ autoreply define test_empty {
u32 client_index;
u32 context;
};
+
+/* Interface */
+autoreply define test_interface {
+ vl_api_interface_index_t sw_if_index;
+};
diff --git a/src/vat2/test/vat2_test.c b/src/vat2/test/vat2_test.c
index 89714c4f992..1ac46527b3c 100644
--- a/src/vat2/test/vat2_test.c
+++ b/src/vat2/test/vat2_test.c
@@ -162,6 +162,11 @@ struct msgs msgs[] = {
.tojson = (tojson_fn_t) vl_api_test_empty_t_tojson,
.fromjson = (fromjson_fn_t) vl_api_test_empty_t_fromjson,
},
+ {
+ .name = "test_interface",
+ .tojson = (tojson_fn_t) vl_api_test_interface_t_tojson,
+ .fromjson = (fromjson_fn_t) vl_api_test_interface_t_fromjson,
+ },
};
struct tests tests[] = {
@@ -190,6 +195,7 @@ struct tests tests[] = {
{ .s = "{\"_msgname\": \"test_addresses3\", \"n\": 2, \"a\": "
"[\"2001:db8::23\", \"2001:db8::23\"] }" },
{ .s = "{\"_msgname\": \"test_empty\"}" },
+ { .s = "{\"_msgname\": \"test_interface\", \"sw_if_index\": 100 }" },
};
int main (int argc, char **argv)