summaryrefslogtreecommitdiff
path: root/test/testutil.h
diff options
context:
space:
mode:
authorrpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68>2023-05-09 10:47:07 +0000
committerrpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68>2023-05-09 10:47:07 +0000
commitabd82d70b93abdb52b8a8800f1042865cddd2d28 (patch)
tree14a54f7bdae63f2561e022eaf86d82434b9ce193 /test/testutil.h
parent1735008a19cfd025ae0e86b2ed14373f82d39969 (diff)
downloadlibapr-util-1.7.x.tar.gz
Merge r582543, r1090093, r1102978, r1909474, r1909585, r1909586, r1909590, r1909677 from trunk:1.7.x
In preparation to be able to test multiple, parallel flavors of the apr build, we'll need to designate the path of the apr-invoked binaires. Macroize this. Removed tabs and trailing spaces. Appears to be required for getpid() In case that we have threads store the apr_reslist parameters in the apr_memcache_server_t struct for later usage. * include/apr_memcache.h::struct apr_memcache_server_t: Add missing fields to struct. * memcache/apr_memcache.c::apr_memcache_server_create: Init fields with given values. Check sockets from connection pool before using them and try to reconnect them if they are not usable any longer. * memcache/apr_memcache.c::ms_find_conn: Check if the socket returned from the connection pool is still readable. If not then invalidate the connection in the pool and request a new one from the connection pool. Repeat this until a valid socket is returned or this was done the maximum number of connections in the pool plus one. This ensures that at least one new socket was created. If a new socket does not work this indicates a broken backend and not just a restart in the past. In this case return an error like previously. * test/testmemcache.c: Add new test for connection validation. * test/memcachedmock.c: For the new test we need a memcached mock server that we control and can restart. * test/testmemcache.h: Shared defines between test/testmemcache.c and test/memcachedmock.c. * test/Makefile.in: * test/Makefile.win: * test/NWGNUmakefile: * test/NWGNUmemcachedmock: Needed changes to build test/memcachedmock.c on different platforms. * Add missing test/memcachedmock.c * Wait for the mock memcached to shutdown the socket * Add CHANGES entry for r1909474, r1909585, r1909586, r1909590 Reviewed by: ruediger git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1909699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testutil.h')
-rw-r--r--test/testutil.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/testutil.h b/test/testutil.h
index c6e23887..2f557070 100644
--- a/test/testutil.h
+++ b/test/testutil.h
@@ -15,12 +15,26 @@
*/
#include "apr_pools.h"
+#include "apr_general.h"
#include "abts.h"
#ifndef APR_TEST_UTIL
#define APR_TEST_UTIL
-/* XXX FIXME */
+/* XXX: FIXME - these all should become much more utilitarian
+ * and part of apr, itself
+ */
+
+#ifdef WIN32
+#ifdef BINPATH
+#define TESTBINPATH APR_STRINGIFY(BINPATH) "/"
+#else
+#define TESTBINPATH ""
+#endif
+#else
+#define TESTBINPATH "./"
+#endif
+
#ifdef WIN32
#define EXTENSION ".exe"
#elif NETWARE