diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2018-01-04 18:57:26 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-01-22 18:17:23 +0000 |
commit | 3fca567ff438145e28dd1318ad5b1734c1091257 (patch) | |
tree | 7101b4ae130f2731e549f82ab98af8bfbabc6571 /test/ext/vapi_c_test.c | |
parent | e82488f10f20f464961c5c7b381b4a419bca0bbc (diff) |
svm: queue sub: Add conditional timed wait
On reviece side svm queue only permits blocking and
non-blocking calls. This patch adds timed wait blocking
functionality which returns either on signal/event or
on given time out.
It also preserves the original behavior, so it will not
hurt client applications which are using svm queue.
Change-Id: Ic10632170330a80afb8bc781d4ccddfe4da2c69a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'test/ext/vapi_c_test.c')
-rw-r--r-- | test/ext/vapi_c_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ext/vapi_c_test.c b/test/ext/vapi_c_test.c index ad75ad6e8b8..52a939f72a5 100644 --- a/test/ext/vapi_c_test.c +++ b/test/ext/vapi_c_test.c @@ -66,12 +66,12 @@ START_TEST (test_invalid_values) 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); @@ -531,7 +531,7 @@ START_TEST (test_show_version_1) 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); |