diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2006-03-13 16:46:18 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2006-03-13 16:46:18 +0000 |
commit | 3ac5a6bad1c81b2288ef8d3f6607c3484a29a1c5 (patch) | |
tree | 02a9faf7c22967953579c46c24d886531b393851 /test/testsock.c | |
parent | 1a069acd03d0b7d4ddae69b9c5fbbe69653d689c (diff) | |
download | libapr-3ac5a6bad1c81b2288ef8d3f6607c3484a29a1c5.tar.gz |
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.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@385594 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testsock.c')
-rw-r--r-- | test/testsock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/testsock.c b/test/testsock.c index e1b4bfa3d..d5a3e65a5 100644 --- a/test/testsock.c +++ b/test/testsock.c @@ -258,16 +258,15 @@ static void test_get_addr(abts_case *tc, void *data) * 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)); |