0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

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

Solution: add test case
This commit is contained in:
sigiesec 2017-08-22 20:04:55 +02:00
parent a71f7b0405
commit 68f416c0ca

View File

@ -178,6 +178,9 @@ void test_wait_corner_cases (void *ctx)
rc = zmq_poller_wait(poller, &event, -1);
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);
assert (rc == -1 && errno == EAGAIN);
@ -268,13 +271,8 @@ int main (void)
rc = zmq_connect (bowl, my_endpoint_0);
assert (rc == 0);
#if defined _WIN32
SOCKET fd;
size_t fd_size = sizeof (SOCKET);
#else
int fd;
size_t fd_size = sizeof (int);
#endif
fd_t fd;
size_t fd_size = sizeof (fd);
rc = zmq_getsockopt (bowl, ZMQ_FD, &fd, &fd_size);
assert (rc == 0);