summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/test/main_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/test/main_test.c')
-rw-r--r--extras/libmemif/test/main_test.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/extras/libmemif/test/main_test.c b/extras/libmemif/test/main_test.c
index a5e0e3dc860..e4697beb56f 100644
--- a/extras/libmemif/test/main_test.c
+++ b/extras/libmemif/test/main_test.c
@@ -66,7 +66,7 @@ START_TEST (test_init)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
libmemif_main_t *lm = &libmemif_main;
@@ -86,7 +86,7 @@ START_TEST (test_init_epoll)
int err;
if ((err =
- memif_init (NULL, TEST_APP_NAME, NULL, NULL)) != MEMIF_ERR_SUCCESS)
+ memif_init (NULL, TEST_APP_NAME, NULL, NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
libmemif_main_t *lm = &libmemif_main;
@@ -113,7 +113,7 @@ START_TEST (test_create)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -147,8 +147,8 @@ START_TEST (test_create)
ck_assert_ptr_ne (c->on_disconnect, NULL);
ck_assert_ptr_ne (c->on_interrupt, NULL);
- ck_assert_str_eq (c->args.interface_name, args.interface_name);
- ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
+ ck_assert_str_eq ((char *)c->args.interface_name, (char *)args.interface_name);
+ ck_assert_str_eq ((char *)c->args.socket_filename, SOCKET_FILENAME);
struct itimerspec timer;
timerfd_gettime (lm->timerfd, &timer);
@@ -177,7 +177,7 @@ START_TEST (test_create_master)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -211,8 +211,8 @@ START_TEST (test_create_master)
ck_assert_ptr_ne (c->on_disconnect, NULL);
ck_assert_ptr_ne (c->on_interrupt, NULL);
- ck_assert_str_eq (c->args.interface_name, args.interface_name);
- ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
+ ck_assert_str_eq ((char *)c->args.interface_name, (char *)args.interface_name);
+ ck_assert_str_eq ((char *)c->args.socket_filename, SOCKET_FILENAME);
struct stat file_stat;
@@ -238,7 +238,7 @@ START_TEST (test_create_mult)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -296,10 +296,10 @@ START_TEST (test_create_mult)
ck_assert_ptr_ne (c1->on_disconnect, NULL);
ck_assert_ptr_ne (c1->on_interrupt, NULL);
- ck_assert_str_eq (c->args.interface_name, args.interface_name);
- ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
- ck_assert_str_eq (c1->args.interface_name, args.interface_name);
- ck_assert_str_eq (c1->args.socket_filename, SOCKET_FILENAME);
+ ck_assert_str_eq ((char *)c->args.interface_name, (char *)args.interface_name);
+ ck_assert_str_eq ((char *)c->args.socket_filename, SOCKET_FILENAME);
+ ck_assert_str_eq ((char *)c1->args.interface_name, (char *)args.interface_name);
+ ck_assert_str_eq ((char *)c1->args.socket_filename, SOCKET_FILENAME);
struct itimerspec timer;
timerfd_gettime (lm->timerfd, &timer);
@@ -330,7 +330,7 @@ START_TEST (test_control_fd_handler)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -401,7 +401,7 @@ START_TEST (test_buffer_alloc)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -495,7 +495,7 @@ START_TEST (test_tx_burst)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -600,7 +600,7 @@ START_TEST (test_rx_burst)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -689,7 +689,7 @@ START_TEST (test_get_details)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -718,11 +718,11 @@ START_TEST (test_get_details)
if ((err = memif_get_details (conn, &md, buf, buflen)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
- ck_assert_str_eq (md.if_name, c->args.interface_name);
- ck_assert_str_eq (md.remote_if_name, c->remote_if_name);
- ck_assert_str_eq (md.remote_inst_name, c->remote_name);
- ck_assert_str_eq (md.secret, c->args.secret);
- ck_assert_str_eq (md.socket_filename, c->args.socket_filename);
+ ck_assert_str_eq ((char *)md.if_name, (char *)c->args.interface_name);
+ ck_assert_str_eq ((char *)md.remote_if_name, (char *)c->remote_if_name);
+ ck_assert_str_eq ((char *)md.remote_inst_name, (char *)c->remote_name);
+ ck_assert_str_eq ((char *)md.secret, (char *)c->args.secret);
+ ck_assert_str_eq ((char *)md.socket_filename, (char *)c->args.socket_filename);
ck_assert_uint_eq (md.id, c->args.interface_id);
ck_assert_uint_ne (md.role, c->args.is_master);
@@ -766,7 +766,7 @@ START_TEST (test_init_regions_and_queues)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -790,7 +790,7 @@ START_TEST (test_init_regions_and_queues)
ck_assert_ptr_ne (c->tx_queues, NULL);
ck_assert_ptr_ne (c->rx_queues, NULL);
- ck_assert_ptr_ne (c->regions->shm, NULL);
+ ck_assert_ptr_ne (c->regions->addr, NULL);
ck_assert_ptr_ne (c->tx_queues->ring, NULL);
ck_assert_ptr_ne (c->rx_queues->ring, NULL);
@@ -821,7 +821,7 @@ START_TEST (test_connect1)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
@@ -867,7 +867,7 @@ START_TEST (test_disconnect_internal)
if ((err =
memif_init (control_fd_update, TEST_APP_NAME, NULL,
- NULL)) != MEMIF_ERR_SUCCESS)
+ NULL, NULL)) != MEMIF_ERR_SUCCESS)
ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));