apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r385594 - /apr/apr/trunk/test/testsock.c
Date Mon, 13 Mar 2006 16:46:23 GMT
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));



Mime
View raw message