apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: cvs commit: apr/test testpoll.c
Date Wed, 26 May 2004 10:07:46 GMT
On Tue, May 25, 2004 at 10:29:33PM -0000, Brad Nicholes wrote:
> bnicholes    2004/05/25 15:29:33
> 
>   A timeout value of 0 causes select() on NetWare to return
>   immediately with a timeout error.  So give NetWare a little time.
...

Well, that's hiding a real problem then.  Passing select() a zeroed 
timeout structure has well-defined behaviour on Unix.

So either this needs to be fixed in the APR port to NetWare, or it needs
to be documented in the API as undefined behaviour, and the test suite
shouldn't test for it.

>   --- 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);


Mime
View raw message