Commit 68f416c0 authored by sigiesec's avatar sigiesec

Problem: missing test case for zmq_poller_wait_all with negative number of events

Solution: add test case
parent a71f7b04
...@@ -178,6 +178,9 @@ void test_wait_corner_cases (void *ctx) ...@@ -178,6 +178,9 @@ void test_wait_corner_cases (void *ctx)
rc = zmq_poller_wait(poller, &event, -1); rc = zmq_poller_wait(poller, &event, -1);
assert (rc == -1 && errno == EFAULT); assert (rc == -1 && errno == EFAULT);
rc = zmq_poller_wait_all (poller, &event, -1, 0);
assert (rc == -1 && errno == EINVAL);
rc = zmq_poller_wait_all (poller, &event, 0, 0); rc = zmq_poller_wait_all (poller, &event, 0, 0);
assert (rc == -1 && errno == EAGAIN); assert (rc == -1 && errno == EAGAIN);
...@@ -268,13 +271,8 @@ int main (void) ...@@ -268,13 +271,8 @@ int main (void)
rc = zmq_connect (bowl, my_endpoint_0); rc = zmq_connect (bowl, my_endpoint_0);
assert (rc == 0); assert (rc == 0);
#if defined _WIN32 fd_t fd;
SOCKET fd; size_t fd_size = sizeof (fd);
size_t fd_size = sizeof (SOCKET);
#else
int fd;
size_t fd_size = sizeof (int);
#endif
rc = zmq_getsockopt (bowl, ZMQ_FD, &fd, &fd_size); rc = zmq_getsockopt (bowl, ZMQ_FD, &fd, &fd_size);
assert (rc == 0); assert (rc == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment