summaryrefslogtreecommitdiff
path: root/test/testpoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testpoll.c')
-rw-r--r--test/testpoll.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/testpoll.c b/test/testpoll.c
index 23a824dbd..0b866c618 100644
--- a/test/testpoll.c
+++ b/test/testpoll.c
@@ -27,6 +27,11 @@
* 64, the test will fail even though the code is correct.
*/
#define LARGE_NUM_SOCKETS 50
+#ifdef NETWARE
+#define SOCK_TIMEOUT 1000
+#else
+#define SOCK_TIMEOUT 0
+#endif
static apr_socket_t *s[LARGE_NUM_SOCKETS];
static apr_sockaddr_t *sa[LARGE_NUM_SOCKETS];
@@ -314,7 +319,7 @@ static void nomessage_pollset(abts_case *tc, void *data)
int lrv;
const apr_pollfd_t *descs = NULL;
- rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);
@@ -327,7 +332,7 @@ static void send0_pollset(abts_case *tc, void *data)
int num;
send_msg(s, sa, 0, tc);
- rv = apr_pollset_poll(pollset, 0, &num, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &num, &descs);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_INT_EQUAL(tc, 1, num);
ABTS_PTR_NOTNULL(tc, descs);
@@ -343,7 +348,7 @@ static void recv0_pollset(abts_case *tc, void *data)
const apr_pollfd_t *descs = NULL;
recv_msg(s, 0, p, tc);
- rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);
@@ -357,7 +362,7 @@ static void send_middle_pollset(abts_case *tc, void *data)
send_msg(s, sa, 2, tc);
send_msg(s, sa, 5, tc);
- rv = apr_pollset_poll(pollset, 0, &num, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &num, &descs);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_INT_EQUAL(tc, 2, num);
ABTS_PTR_NOTNULL(tc, descs);
@@ -376,7 +381,7 @@ static void clear_middle_pollset(abts_case *tc, void *data)
recv_msg(s, 2, p, tc);
recv_msg(s, 5, p, tc);
- rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);
@@ -389,7 +394,7 @@ static void send_last_pollset(abts_case *tc, void *data)
int num;
send_msg(s, sa, LARGE_NUM_SOCKETS - 1, tc);
- rv = apr_pollset_poll(pollset, 0, &num, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &num, &descs);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_INT_EQUAL(tc, 1, num);
ABTS_PTR_NOTNULL(tc, descs);
@@ -406,7 +411,7 @@ static void clear_last_pollset(abts_case *tc, void *data)
recv_msg(s, LARGE_NUM_SOCKETS - 1, p, tc);
- rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
+ rv = apr_pollset_poll(pollset, SOCK_TIMEOUT, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);