Return-Path: Delivered-To: apmail-apr-cvs-archive@www.apache.org Received: (qmail 21099 invoked from network); 20 Nov 2003 13:51:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Nov 2003 13:51:33 -0000 Received: (qmail 35494 invoked by uid 500); 20 Nov 2003 13:51:30 -0000 Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 35446 invoked by uid 500); 20 Nov 2003 13:51:30 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 35380 invoked from network); 20 Nov 2003 13:51:29 -0000 Date: 20 Nov 2003 13:51:32 -0000 Message-ID: <20031120135132.21015.qmail@minotaur.apache.org> From: jorton@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/test testpoll.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N jorton 2003/11/20 05:51:32 Modified: test testpoll.c Log: * test/testpoll.c: Fix test suite until the tests using the old API are either converted to the new API or removed, as appropriate. Revision Changes Path 1.27 +14 -1 apr/test/testpoll.c Index: testpoll.c =================================================================== RCS file: /home/cvs/apr/test/testpoll.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -u -r1.26 -r1.27 --- testpoll.c 3 Sep 2003 14:43:53 -0000 1.26 +++ testpoll.c 20 Nov 2003 13:51:32 -0000 1.27 @@ -69,9 +69,15 @@ static apr_socket_t *s[LARGE_NUM_SOCKETS]; static apr_sockaddr_t *sa[LARGE_NUM_SOCKETS]; +static apr_pollset_t *pollset; + +/* ###: tests surrounded by ifdef OLD_POLL_INTERFACE either need to be + * converted to use the pollset interface or removed. */ + +#ifdef OLD_POLL_INTERFACE static apr_pollfd_t *pollarray; static apr_pollfd_t *pollarray_large; -static apr_pollset_t *pollset; +#endif static void make_socket(apr_socket_t **sock, apr_sockaddr_t **sa, apr_port_t port, apr_pool_t *p, CuTest *tc) @@ -88,6 +94,7 @@ CuAssertIntEquals(tc, APR_SUCCESS, rv); } +#ifdef OLD_POLL_INTERFACE static void check_sockets(const apr_pollfd_t *pollarray, apr_socket_t **sockarray, int which, int pollin, CuTest *tc) @@ -109,6 +116,7 @@ CuAssert(tc, str, !(event & APR_POLLIN)); } } +#endif static void send_msg(apr_socket_t **sockarray, apr_sockaddr_t **sas, int which, CuTest *tc) @@ -151,6 +159,7 @@ } } +#ifdef OLD_POLL_INTERFACE static void setup_small_poll(CuTest *tc) { apr_status_t rv; @@ -310,6 +319,7 @@ check_sockets(pollarray_large, s, i, 0, tc); } } +#endif static void setup_pollset(CuTest *tc) { @@ -534,6 +544,8 @@ CuSuite *suite = CuSuiteNew("Poll"); SUITE_ADD_TEST(suite, create_all_sockets); + +#ifdef OLD_POLL_INTERFACE SUITE_ADD_TEST(suite, setup_small_poll); SUITE_ADD_TEST(suite, setup_large_poll); SUITE_ADD_TEST(suite, nomessage); @@ -544,6 +556,7 @@ SUITE_ADD_TEST(suite, clear_all_signalled); SUITE_ADD_TEST(suite, send_large_pollarray); SUITE_ADD_TEST(suite, recv_large_pollarray); +#endif SUITE_ADD_TEST(suite, setup_pollset); SUITE_ADD_TEST(suite, add_sockets_pollset);