apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/test testpoll.c
Date Tue, 25 May 2004 22:29:33 GMT
bnicholes    2004/05/25 15:29:33

  Modified:    test     testpoll.c
  Log:
  A timeout value of 0 causes select() on NetWare to return immediately with a timeout error.
 So give NetWare a little time.
  
  Revision  Changes    Path
  1.32      +12 -7     apr/test/testpoll.c
  
  Index: testpoll.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpoll.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- testpoll.c	14 May 2004 14:43:22 -0000	1.31
  +++ testpoll.c	25 May 2004 22:29:33 -0000	1.32
  @@ -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 @@
       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 @@
       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 @@
       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 @@
       
       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 @@
       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 @@
       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 @@
   
       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);
  
  
  

Mime
View raw message