summaryrefslogtreecommitdiff
path: root/test/testpoll.c
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2003-11-20 13:51:32 +0000
committerJoe Orton <jorton@apache.org>2003-11-20 13:51:32 +0000
commitcfe9fb9cfac0be88272db1d30305d889a228a247 (patch)
tree15c3fad71cdf5d06975a08c526b3d384b5431d10 /test/testpoll.c
parent7da7be3e36614cf9b64f1d0971927ecd63ec6101 (diff)
downloadapr-cfe9fb9cfac0be88272db1d30305d889a228a247.tar.gz
* test/testpoll.c: Fix test suite until the tests using the old API
are either converted to the new API or removed, as appropriate. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64777 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testpoll.c')
-rw-r--r--test/testpoll.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/testpoll.c b/test/testpoll.c
index c6b634d1a..033a5ab40 100644
--- a/test/testpoll.c
+++ b/test/testpoll.c
@@ -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 @@ static void make_socket(apr_socket_t **sock, apr_sockaddr_t **sa,
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 @@ static void check_sockets(const apr_pollfd_t *pollarray,
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 @@ static void create_all_sockets(CuTest *tc)
}
}
+#ifdef OLD_POLL_INTERFACE
static void setup_small_poll(CuTest *tc)
{
apr_status_t rv;
@@ -310,6 +319,7 @@ static void recv_large_pollarray(CuTest *tc)
check_sockets(pollarray_large, s, i, 0, tc);
}
}
+#endif
static void setup_pollset(CuTest *tc)
{
@@ -534,6 +544,8 @@ CuSuite *testpoll(void)
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 @@ CuSuite *testpoll(void)
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);