diff options
Diffstat (limited to 'extras/libmemif/test')
-rw-r--r-- | extras/libmemif/test/main_test.c | 2 | ||||
-rw-r--r-- | extras/libmemif/test/socket_test.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/extras/libmemif/test/main_test.c b/extras/libmemif/test/main_test.c index 0a8e091f395..8ad9961157f 100644 --- a/extras/libmemif/test/main_test.c +++ b/extras/libmemif/test/main_test.c @@ -94,7 +94,7 @@ START_TEST (test_init_epoll) ck_assert_ptr_ne (lm, NULL); ck_assert_ptr_ne (lm->control_fd_update, NULL); ck_assert_int_gt (lm->timerfd, 2); - ck_assert_int_gt (memif_epfd, -1); + ck_assert_int_gt (lm->epfd, -1); if (lm->timerfd > 0) close (lm->timerfd); diff --git a/extras/libmemif/test/socket_test.c b/extras/libmemif/test/socket_test.c index 589bfd84cb7..2d229383c20 100644 --- a/extras/libmemif/test/socket_test.c +++ b/extras/libmemif/test/socket_test.c @@ -296,7 +296,9 @@ START_TEST (test_send_hello) NULL, NULL)) != MEMIF_ERR_SUCCESS) ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err)); - if ((err = memif_msg_send_hello (conn.fd)) != MEMIF_ERR_SUCCESS) + conn.args.socket = libmemif_main.default_socket; + + if ((err = memif_msg_send_hello (get_libmemif_main (conn.args.socket), conn.fd)) != MEMIF_ERR_SUCCESS) ck_assert_msg (err == MEMIF_ERR_BAD_FD, "err code: %u, err msg: %s", err, memif_strerror (err)); } @@ -387,7 +389,7 @@ START_TEST (test_recv_init) memif_list_elt_t elt; elt.key = 69; elt.data_struct = &conn; - add_list_elt (&elt, &ms.interface_list, &ms.interface_list_len); + add_list_elt (get_libmemif_main (conn.args.socket), &elt, &ms.interface_list, &ms.interface_list_len); if ((err = memif_init (control_fd_update, TEST_APP_NAME, NULL, |