Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 1747 invoked from network); 21 Feb 2007 13:36:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2007 13:36:07 -0000 Received: (qmail 70942 invoked by uid 500); 21 Feb 2007 13:36:15 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 70923 invoked by uid 500); 21 Feb 2007 13:36:15 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 70912 invoked by uid 99); 21 Feb 2007 13:36:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 05:36:15 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 05:36:04 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 6585C1A981A; Wed, 21 Feb 2007 05:35:44 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r510006 - /apr/apr/trunk/test/testpoll.c Date: Wed, 21 Feb 2007 13:35:44 -0000 To: commits@apr.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070221133544.6585C1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jorton Date: Wed Feb 21 05:35:43 2007 New Revision: 510006 URL: http://svn.apache.org/viewvc?view=rev&rev=510006 Log: * test/testpoll.c (setup_pollcb, trigger_pollcb, timeout_pollcb, timeout_pollin_pollcb): Skip tests if pollcb interface is ENOTIMPL. Modified: apr/apr/trunk/test/testpoll.c Modified: apr/apr/trunk/test/testpoll.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testpoll.c?view=diff&rev=510006&r1=510005&r2=510006 ============================================================================== --- apr/apr/trunk/test/testpoll.c (original) +++ apr/apr/trunk/test/testpoll.c Wed Feb 21 05:35:43 2007 @@ -553,11 +553,20 @@ (hot_files[1].client_data == (void *)1))); } +#define POLLCB_PREREQ do { if (pollcb == NULL) \ +ABTS_NOT_IMPL(tc, "pollcb interface not supported"); return; } while (0) + static void setup_pollcb(abts_case *tc, void *data) { apr_status_t rv; rv = apr_pollcb_create(&pollcb, LARGE_NUM_SOCKETS, p, 0); - ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + if (rv == APR_ENOTIMPL) { + pollcb = NULL; + ABTS_NOT_IMPL(tc, "pollcb interface not supported"); + } + else { + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + } } typedef struct pollcb_baton_t { @@ -580,6 +589,8 @@ apr_pollfd_t socket_pollfd; pollcb_baton_t pcb; + POLLCB_PREREQ; + ABTS_PTR_NOTNULL(tc, s[0]); socket_pollfd.desc_type = APR_POLL_SOCKET; socket_pollfd.reqevents = APR_POLLIN; @@ -603,6 +614,9 @@ { apr_status_t rv; pollcb_baton_t pcb; + + POLLCB_PREREQ; + pcb.count = 0; pcb.tc = tc; @@ -616,6 +630,8 @@ apr_status_t rv; pollcb_baton_t pcb; apr_pollfd_t socket_pollfd; + + POLLCB_PREREQ; recv_msg(s, 0, p, tc);