Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 57063 invoked from network); 13 Mar 2006 16:46:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Mar 2006 16:46:52 -0000 Received: (qmail 88998 invoked by uid 500); 13 Mar 2006 16:46:47 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 88966 invoked by uid 500); 13 Mar 2006 16:46:47 -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 88955 invoked by uid 99); 13 Mar 2006 16:46:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2006 08:46:46 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 13 Mar 2006 08:46:46 -0800 Received: (qmail 56712 invoked by uid 65534); 13 Mar 2006 16:46:24 -0000 Message-ID: <20060313164624.56709.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r385594 - /apr/apr/trunk/test/testsock.c Date: Mon, 13 Mar 2006 16:46:23 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: wrowe Date: Mon Mar 13 08:46:18 2006 New Revision: 385594 URL: http://svn.apache.org/viewcvs?rev=385594&view=rev Log: There are -so- many reasons this code -could- fail, and any of them will hang the remainder of the test. Better to simply fail them all, with an extra notice when the error is unusual. Modified: apr/apr/trunk/test/testsock.c Modified: apr/apr/trunk/test/testsock.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testsock.c?rev=385594&r1=385593&r2=385594&view=diff ============================================================================== --- apr/apr/trunk/test/testsock.c (original) +++ apr/apr/trunk/test/testsock.c Mon Mar 13 08:46:18 2006 @@ -258,15 +258,14 @@ * succeed (if the connection can be established synchronously), * but if it does, this test cannot proceed. */ rv = apr_socket_connect(cd, sa); - if (rv == APR_SUCCESS) { + if (!APR_STATUS_IS_EINPROGRESS(rv)) { apr_socket_close(ld); apr_socket_close(cd); + APR_ASSERT_SUCCESS(tc, "connect to listener", rv); ABTS_NOT_IMPL(tc, "Cannot test if connect completes " "synchronously"); return; } - - ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EINPROGRESS(rv)); APR_ASSERT_SUCCESS(tc, "accept connection", apr_socket_accept(&sd, ld, p));