Merge lp:~brianaker/libmemcached/feature-server_timeout into lp:libmemcached

Proposed by Brian Aker
Status: Merged
Merged at revision: 1111
Proposed branch: lp:~brianaker/libmemcached/feature-server_timeout
Merge into: lp:libmemcached
Diff against target: 1646 lines (+465/-217) (has conflicts)
44 files modified
.quickly (+0/-5)
ChangeLog (+4/-0)
GNUmakefile (+36/-0)
Makefile.am (+2/-1)
bootstrap.sh (+44/-55)
clients/include.am (+2/-0)
clients/memcp.cc (+4/-4)
configure.ac (+15/-14)
libmemcached-1.2/defaults.h (+1/-1)
libmemcached-1.2/server.h (+3/-0)
libmemcached-1.2/struct/memcached.h (+1/-0)
libmemcached-1.2/struct/server.h (+2/-0)
libmemcached-1.2/types/behavior.h (+1/-0)
libmemcached/behavior.cc (+8/-5)
libmemcached/connect.cc (+2/-1)
libmemcached/fetch.cc (+20/-0)
libmemcached/include.am (+8/-4)
libmemcached/instance.cc (+2/-0)
libmemcached/instance.hpp (+3/-0)
libmemcached/io.cc (+6/-3)
libmemcached/memcached.cc (+2/-0)
libmemcached/quit.cc (+9/-1)
libmemcached/server.cc (+20/-0)
libmemcached/server.hpp (+26/-17)
libmemcached/virtual_bucket.c (+4/-7)
libtest/comparison.cc (+2/-2)
libtest/formatter.cc (+78/-10)
libtest/include.am (+10/-8)
libtest/unittest.cc (+1/-1)
libtest/valgrind.h (+3/-3)
m4/ax_check_library.m4 (+0/-3)
m4/ax_compiler_vendor.m4 (+3/-2)
m4/ax_dlopen.m4 (+0/-10)
m4/ax_harden_compiler_flags.m4 (+0/-2)
m4/ax_pthread.m4 (+1/-1)
m4/ax_restore_flags.m4 (+32/-11)
m4/ax_sasl.m4 (+27/-28)
m4/ax_save_flags.m4 (+51/-11)
tests/include.am (+2/-2)
tests/libmemcached-1.0/all_tests.h (+1/-0)
tests/libmemcached-1.0/mem_functions.cc (+24/-1)
tests/libmemcached-1.0/mem_functions.h (+1/-0)
tests/libmemcached_world.h (+1/-1)
tests/mem_udp.cc (+3/-3)
Text conflict in ChangeLog
Text conflict in libmemcached/fetch.cc
To merge this branch: bzr merge lp:~brianaker/libmemcached/feature-server_timeout
Reviewer Review Type Date Requested Status
Tangent Trunk Pending
Review via email: mp+204413@code.launchpad.net
To post a comment you must log in.
1182. By Brian Aker

Fix issue where we missed MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT from a switch/case.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file '.quickly'
2--- .quickly 2012-05-05 22:11:48 +0000
3+++ .quickly 1970-01-01 00:00:00 +0000
4@@ -1,5 +0,0 @@
5-project = libmemcached
6-version = 0.4.2
7-template = pandora-build
8-project-type = library
9-pandora-version = 0.175
10
11=== modified file 'ChangeLog'
12--- ChangeLog 2013-05-04 09:20:42 +0000
13+++ ChangeLog 2014-02-05 00:01:58 +0000
14@@ -2,7 +2,11 @@
15 * Enable MEMCACHED_BEHAVIOR_VERIFY_KEY by default
16
17 1.0.18
18+<<<<<<< TREE
19 *
20+=======
21+* MEMCACHED_BEHAVIOR_RETRY_TIMEOUT can now be set to zero.
22+>>>>>>> MERGE-SOURCE
23
24 1.0.17 Tue Apr 2 14:02:01 HST 2013
25 * Remove c++ namespace that was being exposed (the API should be plug compatible)..
26
27=== added file 'GNUmakefile'
28--- GNUmakefile 1970-01-01 00:00:00 +0000
29+++ GNUmakefile 2014-02-05 00:01:58 +0000
30@@ -0,0 +1,36 @@
31+# -*-Makefile-*-
32+#
33+_bootstrap_Makefile := $(wildcard [M]akefile)
34+_bootstrap_config-status := $(wildcard config.status)
35+
36+ALL_RECURSIVE_TARGETS=
37+
38+ifneq ($(_bootstrap_Makefile),)
39+ include Makefile
40+else
41+ ifneq ($(_bt_config-status),)
42+ $(srcdir)/config.status
43+ $(MAKE) $(AM_MAKEFLAGS) configure
44+ endif
45+
46+.DEFAULT_GOAL:= basic_build
47+srcdir= .
48+
49+configure: bootstrap.sh
50+ @$(srcdir)/bootstrap.sh -a
51+
52+Makefile: configure
53+ @$(srcdir)/bootstrap.sh -c
54+
55+.PHONY: basic_build
56+basic_build: Makefile
57+ @$(MAKE) $(AM_MAKEFLAGS)
58+endif
59+
60+ALL_RECURSIVE_TARGETS+= $(AM_RECURSIVE_TARGETS)
61+
62+ifneq ($(word 2, $(MAKECMDGOALS)), )
63+ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
64+.NOTPARALLEL:
65+endif
66+endif
67
68=== modified file 'Makefile.am'
69--- Makefile.am 2013-05-04 09:20:42 +0000
70+++ Makefile.am 2014-02-05 00:01:58 +0000
71@@ -31,7 +31,6 @@
72
73 DISTCLEANFILES+= aminclude.am
74
75-EXTRA_DIST+= .quickly
76 EXTRA_DIST+= README.FIRST
77 EXTRA_DIST+= README.win32
78
79@@ -137,5 +136,7 @@
80 -rm -f m4/ltsugar.m4
81 -rm -f m4/ltversion.m4
82 -rm -f m4/lt~obsolete.m4
83+ -rm -f m4/test-driver
84 -rmdir build-aux
85 -rm -rf ${top_builddir}/html
86+ -rm -f bootstrap
87
88=== modified file 'bootstrap.sh'
89--- bootstrap.sh 2013-11-04 17:14:31 +0000
90+++ bootstrap.sh 2014-02-05 00:01:58 +0000
91@@ -38,7 +38,7 @@
92 # LIBTOOLIZE
93 # MAKE
94 # PREFIX
95-# TESTS_ENVIRONMENT
96+# LOG_COMPILER
97 # VERBOSE
98 # WARNINGS
99 #
100@@ -486,8 +486,8 @@
101 die "OLD_MAKE($OLD_MAKE) was set on push, programmer error!"
102 fi
103
104- if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then
105- die "OLD_TESTS_ENVIRONMENT($OLD_TESTS_ENVIRONMENT) was set on push, programmer error!"
106+ if [[ -n "$OLD_LOG_COMPILER" ]]; then
107+ die "OLD_LOG_COMPILER($OLD_LOG_COMPILER) was set on push, programmer error!"
108 fi
109
110 if [[ -n "$CONFIGURE" ]]; then
111@@ -502,8 +502,8 @@
112 OLD_MAKE=$MAKE
113 fi
114
115- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
116- OLD_TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT
117+ if [[ -n "$LOG_COMPILER" ]]; then
118+ OLD_LOG_COMPILER=$LOG_COMPILER
119 fi
120 }
121
122@@ -525,15 +525,15 @@
123 MAKE=$OLD_MAKE
124 fi
125
126- if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then
127- TESTS_ENVIRONMENT=$OLD_TESTS_ENVIRONMENT
128+ if [[ -n "$OLD_LOG_COMPILER" ]]; then
129+ LOG_COMPILER=$OLD_LOG_COMPILER
130 fi
131
132 OLD_CONFIGURE=
133 OLD_CONFIGURE_ARG=
134 OLD_PREFIX=
135 OLD_MAKE=
136- OLD_TESTS_ENVIRONMENT=
137+ OLD_LOG_COMPILER=
138
139 export -n CC CXX
140 }
141@@ -567,9 +567,9 @@
142 # If we don't have a configure, then most likely we will be missing libtool
143 assert_file 'configure'
144 if [[ -x 'libtool' ]]; then
145- TESTS_ENVIRONMENT="./libtool --mode=execute $VALGRIND_COMMAND"
146+ LOG_COMPILER="./libtool --mode=execute $VALGRIND_COMMAND"
147 else
148- TESTS_ENVIRONMENT="$VALGRIND_COMMAND"
149+ LOG_COMPILER="$VALGRIND_COMMAND"
150 fi
151
152 make_target 'all'
153@@ -703,11 +703,11 @@
154 else
155 if [[ -n "$DISPLAY" ]]; then
156 if command_exists 'wine'; then
157- TESTS_ENVIRONMENT='wine'
158+ LOG_COMPILER='wine'
159 fi
160 fi
161
162- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
163+ if [[ -n "$LOG_COMPILER" ]]; then
164 make_target 'check' 'warn' || warn "$MAKE check failed"
165 ret=$?
166 fi
167@@ -935,9 +935,9 @@
168 # If we don't have a configure, then most likely we will be missing libtool
169 assert_file 'configure'
170 if [[ -f 'libtool' ]]; then
171- TESTS_ENVIRONMENT="./libtool --mode=execute $GDB_COMMAND"
172+ LOG_COMPILER="./libtool --mode=execute $GDB_COMMAND"
173 else
174- TESTS_ENVIRONMENT="$GDB_COMMAND"
175+ LOG_COMPILER="$GDB_COMMAND"
176 fi
177
178 make_target 'check'
179@@ -974,9 +974,9 @@
180 run_configure
181 fi
182
183- if [ -n "$TESTS_ENVIRONMENT" ]; then
184+ if [ -n "$LOG_COMPILER" ]; then
185 if $verbose; then
186- echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT"
187+ echo "LOG_COMPILER=$LOG_COMPILER"
188 fi
189 fi
190
191@@ -1386,16 +1386,16 @@
192 echo "MAKE=$MAKE"
193 fi
194
195- if [[ -n "$MAKE_TARGET" ]]; then
196- echo "MAKE_TARGET=$MAKE_TARGET"
197+ if [[ -n "$BOOTSTRAP_TARGET" ]]; then
198+ echo "BOOTSTRAP_TARGET=$BOOTSTRAP_TARGET"
199 fi
200
201 if [[ -n "$PREFIX" ]]; then
202 echo "PREFIX=$PREFIX"
203 fi
204
205- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
206- echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT"
207+ if [[ -n "$LOG_COMPILER" ]]; then
208+ echo "LOG_COMPILER=$LOG_COMPILER"
209 fi
210
211 if [[ -n "$VCS_CHECKOUT" ]]; then
212@@ -1511,7 +1511,7 @@
213 execute_job ()
214 {
215 # We should always have a target by this point
216- assert MAKE_TARGET
217+ assert BOOTSTRAP_TARGET
218
219 determine_target_platform
220
221@@ -1535,8 +1535,8 @@
222 fi
223 fi
224
225- # Use OLD_TESTS_ENVIRONMENT for tracking the state of the variable
226- local OLD_TESTS_ENVIRONMENT=
227+ # Use OLD_LOG_COMPILER for tracking the state of the variable
228+ local OLD_LOG_COMPILER=
229
230 # Set ENV PREFIX in order to set --prefix for ./configure
231 if [[ -n "$PREFIX" ]]; then
232@@ -1547,17 +1547,17 @@
233 make_maintainer_clean
234 fi
235
236- local MAKE_TARGET_ARRAY
237- MAKE_TARGET_ARRAY=( $MAKE_TARGET )
238+ local BOOTSTRAP_TARGET_ARRAY
239+ BOOTSTRAP_TARGET_ARRAY=( $BOOTSTRAP_TARGET )
240
241- for target in "${MAKE_TARGET_ARRAY[@]}"
242+ for target in "${BOOTSTRAP_TARGET_ARRAY[@]}"
243 do
244 # If we are running inside of Jenkins, we want to only run some of the possible tests
245 if $jenkins_build_environment; then
246 check_make_target $target
247 ret=$?
248 if [ $ret -ne 0 ]; then
249- die "Unknown MAKE_TARGET option: $target"
250+ die "Unknown BOOTSTRAP_TARGET option: $target"
251 fi
252 fi
253
254@@ -1663,7 +1663,7 @@
255 declare -x VCS_CHECKOUT=
256
257 # Variables we control globally
258- local -a MAKE_TARGET=
259+ local -a BOOTSTRAP_TARGET=
260 local CONFIGURE=
261 local use_libtool=false
262 local verbose=false
263@@ -1688,7 +1688,7 @@
264 local OLD_CONFIGURE_ARG=
265 local OLD_PREFIX=
266 local OLD_MAKE=
267- local OLD_TESTS_ENVIRONMENT=
268+ local OLD_LOG_COMPILER=
269
270 # If we call autoreconf on the platform or not
271 local AUTORECONF_REBUILD_HOST=false
272@@ -1726,47 +1726,36 @@
273 local OPT_TARGET=
274 parse_command_line_options "$@"
275
276- nassert MAKE_TARGET
277+ nassert BOOTSTRAP_TARGET
278
279 if [ -n "$OPT_TARGET" ]; then
280- MAKE_TARGET="$OPT_TARGET"
281+ BOOTSTRAP_TARGET="$OPT_TARGET"
282 fi
283
284 # If we are running under Jenkins we predetermine what tests we will run against
285- # This MAKE_TARGET can be overridden by parse_command_line_options based MAKE_TARGET changes.
286+ # This BOOTSTRAP_TARGET can be overridden by parse_command_line_options based BOOTSTRAP_TARGET changes.
287 # We don't want Jenkins overriding other variables, so we NULL them.
288- if [ -z "$MAKE_TARGET" ]; then
289+ if [ -z "$BOOTSTRAP_TARGET" ]; then
290 if $jenkins_build_environment; then
291 if [[ -n "$JENKINS_TARGET" ]]; then
292- MAKE_TARGET="$JENKINS_TARGET"
293+ check_make_target $JENKINS_TARGET
294+ if [ $? -eq 0 ]; then
295+ BOOTSTRAP_TARGET="$JENKINS_TARGET"
296+ else
297+ die "label not found: $label"
298+ fi
299 else
300- if [[ -n "$label" ]]; then
301- check_make_target $label
302- if [ $? -eq 0 ]; then
303- MAKE_TARGET="$label"
304- fi
305- fi
306-
307- if [[ -n "$LABEL" ]]; then
308- check_make_target $LABEL
309- if [ $? -eq 0 ]; then
310- MAKE_TARGET="$LABEL"
311- fi
312- fi
313-
314- if [ -z "$MAKE_TARGET" ]; then
315- MAKE_TARGET='jenkins'
316- fi
317+ BOOTSTRAP_TARGET='jenkins'
318 fi
319 fi
320 fi
321
322- if [ -z "$MAKE_TARGET" ]; then
323- MAKE_TARGET="make_default"
324+ if [ -z "$BOOTSTRAP_TARGET" ]; then
325+ BOOTSTRAP_TARGET="make_default"
326 fi
327
328 # We should always have a target by this point
329- assert MAKE_TARGET
330+ assert BOOTSTRAP_TARGET
331
332 execute_job
333 local ret=$?
334@@ -1882,7 +1871,7 @@
335 export LIBTOOLIZE_OPTIONS
336 export MAKE
337 export PREFIX_ARG
338- export TESTS_ENVIRONMENT
339+ export LOG_COMPILER
340 export VERBOSE
341 export WARNINGS
342
343
344=== modified file 'clients/include.am'
345--- clients/include.am 2013-10-02 00:54:50 +0000
346+++ clients/include.am 2014-02-05 00:01:58 +0000
347@@ -102,10 +102,12 @@
348 clients_memaslap_LDADD+= $(CLIENTS_LDADDS)
349 clients_memaslap_LDADD+= @PTHREAD_LIBS@
350
351+clients_memcapable_CXXFLAGS= @PTHREAD_CFLAGS@
352 clients_memcapable_SOURCES=
353 clients_memcapable_SOURCES+= clients/memcapable.cc
354 clients_memcapable_SOURCES+= libmemcached/byteorder.cc
355 clients_memcapable_LDADD= $(CLIENTS_LDADDS)
356+clients_memcapable_LDADD+= @PTHREAD_LIBS@
357
358 test-start-server:
359 clients/memflush --servers=localhost
360
361=== modified file 'clients/memcp.cc'
362--- clients/memcp.cc 2013-10-11 12:19:52 +0000
363+++ clients/memcp.cc 2014-02-05 00:01:58 +0000
364@@ -68,13 +68,13 @@
365 or (errno != 0 && val == 0))
366 {
367 *error= true;
368- return EXIT_SUCCESS;
369+ return 0;
370 }
371
372 if (endptr == nptr)
373 {
374 *error= true;
375- return EXIT_SUCCESS;
376+ return 0;
377 }
378
379 *error= false;
380@@ -385,10 +385,10 @@
381 case OPT_EXPIRE: /* --expire */
382 {
383 bool strtol_error;
384- opt_expires= (time_t)strtol_wrapper(optarg, 16, &strtol_error);
385+ opt_expires= (time_t)strtol_wrapper(optarg, 10, &strtol_error);
386 if (strtol_error == true)
387 {
388- fprintf(stderr, "Bad value passed via --flag\n");
389+ fprintf(stderr, "Bad value passed via --expire\n");
390 exit(1);
391 }
392 }
393
394=== modified file 'configure.ac'
395--- configure.ac 2013-11-04 17:14:31 +0000
396+++ configure.ac 2014-02-05 00:01:58 +0000
397@@ -7,18 +7,22 @@
398 # the COPYING file in this directory for full text.
399
400 m4_include([version.m4])
401+AC_PREREQ([2.61])
402 AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
403+
404+# Setup the compilers early on
405+AC_PROG_CC([cc gcc clang])
406+AC_PROG_CXX([c++ g++ clang++])
407+
408 AC_CONFIG_AUX_DIR([build-aux])
409 AC_CONFIG_MACRO_DIR([m4])
410
411-AC_CANONICAL_TARGET
412+AC_CANONICAL_HOST
413 AC_ARG_PROGRAM
414 AC_USE_SYSTEM_EXTENSIONS
415
416 AM_INIT_AUTOMAKE([1.11 color-tests -Wno-portability subdir-objects foreign tar-ustar])
417
418-AC_PREREQ([2.61])
419-
420 AC_CONFIG_HEADERS([mem_config.h:mem_config.in])dnl Keep filename to 8.3 for MS-DOS.
421 AC_SUBST([AUTOHEADER_FILE],[mem_config.h])
422 AC_CONFIG_SRCDIR([libmemcached/memcached.cc])
423@@ -47,17 +51,20 @@
424 m4_include([libhashkit/include.m4])
425
426 LT_PREREQ([2.2])
427-LT_INIT
428+LT_INIT([dlopen])
429 LT_LANG([C++])
430 LT_LIB_M
431
432+AC_SUBST([lt_cv_dlopen_libs])
433+
434+
435 AC_PROG_CC_C99
436 AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])])
437
438 AC_DEFUN([CHECK_CXX0X],[
439 AC_LANG_PUSH([C++])
440 AX_CHECK_COMPILE_FLAG([-std=c++0x],[
441- CXXFLAGS="$CXXFLAGS -std=c++0x"])
442+ CXX="$CXX -std=c++0x"])
443 AC_LANG_POP([C++])
444 ])
445 CHECK_CXX0X
446@@ -65,13 +72,8 @@
447 AX_ASSERT
448
449 AX_PLATFORM
450-
451 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
452
453-AX_CXX_HEADER_STDCXX_98
454-AS_IF([test "x$ax_cv_cxx_stdcxx_98" = "xno"],
455- [AC_MSG_ERROR([Your system lacks a new enough C++ compiler])])
456-
457 AC_DEFUN([LIBMEMCACHED_PROTOCOL],
458 [AC_ARG_ENABLE([libmemcachedprotocol],
459 [AS_HELP_STRING([--enable-libmemcachedprotocol],
460@@ -255,9 +257,6 @@
461 [AC_DEFINE([HAVE_CLOCK_GETTIME],[0],[Have clock_gettime])])
462
463
464-# Check for the ability to call dlopen (used in libhostile)
465-AX_DLOPEN
466-
467 AC_CHECK_HEADERS([atomic.h])
468 AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],
469 [AC_CHECK_FUNCS([atomic_add_64])
470@@ -298,8 +297,10 @@
471 AX_UUID_GENERATE_TIME_SAFE
472
473 AC_DEFUN([CHECK_FOR_PTHREAD_AND_SASL],
474- [AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])])
475+ [AC_LANG_PUSH([C++])
476+ AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])])
477 AX_PTHREAD_TIMEDJOIN_NP
478+ AC_LANG_POP([C++])
479
480 # The sasl functions should only be visible if we build with sasl support
481 #
482
483=== modified file 'libmemcached-1.2/defaults.h'
484--- libmemcached-1.2/defaults.h 2013-05-03 08:44:02 +0000
485+++ libmemcached-1.2/defaults.h 2014-02-05 00:01:58 +0000
486@@ -52,5 +52,5 @@
487 #define MEMCACHED_SERVER_FAILURE_LIMIT 5
488 #define MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT 2
489 #define MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT 0
490-
491+#define MEMCACHED_SERVER_TIMEOUT_LIMIT 0
492
493
494=== modified file 'libmemcached-1.2/server.h'
495--- libmemcached-1.2/server.h 2013-04-03 13:14:23 +0000
496+++ libmemcached-1.2/server.h 2014-02-05 00:01:58 +0000
497@@ -104,6 +104,9 @@
498 in_port_t memcached_server_port(const memcached_instance_st * self);
499
500 LIBMEMCACHED_API
501+in_port_t memcached_server_srcport(const memcached_instance_st * self);
502+
503+LIBMEMCACHED_API
504 void memcached_instance_next_retry(const memcached_instance_st * self, const time_t absolute_time);
505
506 LIBMEMCACHED_API
507
508=== modified file 'libmemcached-1.2/struct/memcached.h'
509--- libmemcached-1.2/struct/memcached.h 2013-03-31 23:24:29 +0000
510+++ libmemcached-1.2/struct/memcached.h 2014-02-05 00:01:58 +0000
511@@ -79,6 +79,7 @@
512 int32_t snd_timeout;
513 int32_t rcv_timeout;
514 uint32_t server_failure_limit;
515+ uint32_t server_timeout_limit;
516 uint32_t io_msg_watermark;
517 uint32_t io_bytes_watermark;
518 uint32_t io_key_prefetch;
519
520=== modified file 'libmemcached-1.2/struct/server.h'
521--- libmemcached-1.2/struct/server.h 2012-10-25 06:28:22 +0000
522+++ libmemcached-1.2/struct/server.h 2014-02-05 00:01:58 +0000
523@@ -77,6 +77,8 @@
524 uint32_t request_id;
525 uint32_t server_failure_counter;
526 uint64_t server_failure_counter_query_id;
527+ uint32_t server_timeout_counter;
528+ uint64_t server_timeout_counter_query_id;
529 uint32_t weight;
530 uint32_t version;
531 enum memcached_server_state_t state;
532
533=== modified file 'libmemcached-1.2/types/behavior.h'
534--- libmemcached-1.2/types/behavior.h 2012-01-08 00:54:08 +0000
535+++ libmemcached-1.2/types/behavior.h 2014-02-05 00:01:58 +0000
536@@ -76,6 +76,7 @@
537 MEMCACHED_BEHAVIOR_LOAD_FROM_FILE,
538 MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS,
539 MEMCACHED_BEHAVIOR_DEAD_TIMEOUT,
540+ MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT,
541 MEMCACHED_BEHAVIOR_MAX
542 };
543
544
545=== modified file 'libmemcached/behavior.cc'
546--- libmemcached/behavior.cc 2013-03-31 23:24:29 +0000
547+++ libmemcached/behavior.cc 2014-02-05 00:01:58 +0000
548@@ -116,6 +116,10 @@
549 ptr->server_failure_limit= uint32_t(data);
550 break;
551
552+ case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT:
553+ ptr->server_timeout_limit= uint32_t(data);
554+ break;
555+
556 case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL:
557 send_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol
558 if (data)
559@@ -230,11 +234,6 @@
560 break;
561
562 case MEMCACHED_BEHAVIOR_RETRY_TIMEOUT:
563- if (data == 0)
564- {
565- return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
566- memcached_literal_param("MEMCACHED_BEHAVIOR_RETRY_TIMEOUT requires a value greater then zero."));
567- }
568 ptr->retry_timeout= int32_t(data);
569 break;
570
571@@ -379,6 +378,9 @@
572 case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT:
573 return ptr->server_failure_limit;
574
575+ case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT:
576+ return ptr->server_timeout_limit;
577+
578 case MEMCACHED_BEHAVIOR_SORT_HOSTS:
579 return ptr->flags.use_sort_hosts;
580
581@@ -628,6 +630,7 @@
582 {
583 switch (flag)
584 {
585+ case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT: return "MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT";
586 case MEMCACHED_BEHAVIOR_NO_BLOCK: return "MEMCACHED_BEHAVIOR_NO_BLOCK";
587 case MEMCACHED_BEHAVIOR_TCP_NODELAY: return "MEMCACHED_BEHAVIOR_TCP_NODELAY";
588 case MEMCACHED_BEHAVIOR_HASH: return "MEMCACHED_BEHAVIOR_HASH";
589
590=== modified file 'libmemcached/connect.cc'
591--- libmemcached/connect.cc 2013-10-11 12:19:52 +0000
592+++ libmemcached/connect.cc 2014-02-05 00:01:58 +0000
593@@ -198,7 +198,7 @@
594 struct addrinfo hints;
595 memset(&hints, 0, sizeof(struct addrinfo));
596
597- hints.ai_family= AF_INET;
598+ hints.ai_family= AF_UNSPEC;
599 if (memcached_is_udp(server->root))
600 {
601 hints.ai_protocol= IPPROTO_UDP;
602@@ -715,6 +715,7 @@
603 if (_gettime_success and server->next_retry < curr_time.tv_sec)
604 {
605 server->state= MEMCACHED_SERVER_STATE_NEW;
606+ server->server_timeout_counter= 0;
607 }
608 else
609 {
610
611=== modified file 'libmemcached/fetch.cc'
612--- libmemcached/fetch.cc 2013-04-03 13:14:23 +0000
613+++ libmemcached/fetch.cc 2014-02-05 00:01:58 +0000
614@@ -194,7 +194,12 @@
615 *error= MEMCACHED_MAXIMUM_RETURN; // We use this to see if we ever go into the loop
616 memcached_instance_st *server;
617 memcached_return_t read_ret= MEMCACHED_SUCCESS;
618+<<<<<<< TREE
619 while ((server= memcached_io_get_readable_server(memc, read_ret)))
620+=======
621+ bool connection_failures= false;
622+ while ((server= memcached_io_get_readable_server(ptr, read_ret)))
623+>>>>>>> MERGE-SOURCE
624 {
625 char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
626 *error= memcached_response(server, buffer, sizeof(buffer), result);
627@@ -203,6 +208,11 @@
628 {
629 continue;
630 }
631+ else if (*error == MEMCACHED_CONNECTION_FAILURE)
632+ {
633+ connection_failures= true;
634+ continue;
635+ }
636 else if (*error == MEMCACHED_SUCCESS)
637 {
638 result->impl()->count++;
639@@ -230,6 +240,16 @@
640 {
641 *error= MEMCACHED_NOTFOUND;
642 }
643+ else if (connection_failures)
644+ {
645+ /*
646+ If we have a connection failure to some servers, the caller may
647+ wish to treat that differently to getting a definitive NOT_FOUND
648+ from all servers, so return MEMCACHED_CONNECTION_FAILURE to allow
649+ that.
650+ */
651+ *error= MEMCACHED_CONNECTION_FAILURE;
652+ }
653 else if (*error == MEMCACHED_SUCCESS)
654 {
655 *error= MEMCACHED_END;
656
657=== modified file 'libmemcached/include.am'
658--- libmemcached/include.am 2013-06-12 07:11:22 +0000
659+++ libmemcached/include.am 2014-02-05 00:01:58 +0000
660@@ -2,7 +2,7 @@
661 # included from Top Level Makefile.am
662 # All paths should be given relative to the root
663
664-libmemcached_libmemcached_la_SOURCES =
665+libmemcached_libmemcached_la_SOURCES=
666
667 include libmemcached/csl/include.am
668
669@@ -53,8 +53,11 @@
670 EXTRA_libmemcached_libmemcached_la_DEPENDENCIES=
671 libmemcached_libmemcached_la_LIBADD=
672 libmemcached_libmemcached_la_LDFLAGS=
673-libmemcached_libmemcached_la_CFLAGS= -DBUILDING_LIBMEMCACHED
674-libmemcached_libmemcached_la_CXXFLAGS= -DBUILDING_LIBMEMCACHED
675+libmemcached_libmemcached_la_CFLAGS=
676+libmemcached_libmemcached_la_CXXFLAGS=
677+
678+libmemcached_libmemcached_la_CFLAGS+= -DBUILDING_LIBMEMCACHED
679+libmemcached_libmemcached_la_CXXFLAGS+= -DBUILDING_LIBMEMCACHED
680
681 if BUILD_WIN32
682 libmemcached_libmemcached_la_CFLAGS+= -DBUILDING_HASHKIT
683@@ -120,9 +123,10 @@
684 libmemcached/options.cc: libmemcached/csl/parser.h
685
686 libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION}
687-libmemcached_libmemcached_la_LIBADD+= @DL_LIB@
688+libmemcached_libmemcached_la_LIBADD+= @lt_cv_dlopen_libs@
689
690 if HAVE_SASL
691+libmemcached_libmemcached_la_CFLAGS+= @PTHREAD_CFLAGS@
692 libmemcached_libmemcached_la_CXXFLAGS+= @PTHREAD_CFLAGS@
693 libmemcached_libmemcached_la_LIBADD+= @PTHREAD_LIBS@
694 libmemcached_libmemcached_la_LIBADD+= @SASL_LIB@
695
696=== modified file 'libmemcached/instance.cc'
697--- libmemcached/instance.cc 2013-03-31 23:24:29 +0000
698+++ libmemcached/instance.cc 2014-02-05 00:01:58 +0000
699@@ -54,6 +54,8 @@
700 self->request_id= 0;
701 self->server_failure_counter= 0;
702 self->server_failure_counter_query_id= 0;
703+ self->server_timeout_counter= 0;
704+ self->server_timeout_counter_query_id= 0;
705 self->weight= weight ? weight : 1; // 1 is the default weight value
706 self->io_wait_count.read= 0;
707 self->io_wait_count.write= 0;
708
709=== modified file 'libmemcached/instance.hpp'
710--- libmemcached/instance.hpp 2013-03-31 23:24:29 +0000
711+++ libmemcached/instance.hpp 2014-02-05 00:01:58 +0000
712@@ -73,6 +73,7 @@
713 void mark_server_as_clean()
714 {
715 server_failure_counter= 0;
716+ server_timeout_counter= 0;
717 next_retry= 0;
718 }
719
720@@ -147,6 +148,8 @@
721 uint32_t request_id;
722 uint32_t server_failure_counter;
723 uint64_t server_failure_counter_query_id;
724+ uint32_t server_timeout_counter;
725+ uint32_t server_timeout_counter_query_id;
726 uint32_t weight;
727 uint32_t version;
728 enum memcached_server_state_t state;
729
730=== modified file 'libmemcached/io.cc'
731--- libmemcached/io.cc 2013-11-04 11:17:45 +0000
732+++ libmemcached/io.cc 2014-02-05 00:01:58 +0000
733@@ -342,6 +342,7 @@
734 }
735
736 ssize_t sent_length= ::send(instance->fd, local_write_ptr, write_length, flags);
737+ int local_errno= get_socket_errno(); // We cache in case memcached_quit_server() modifies errno
738
739 if (sent_length == SOCKET_ERROR)
740 {
741@@ -381,14 +382,14 @@
742 }
743
744 memcached_quit_server(instance, true);
745- error= memcached_set_errno(*instance, get_socket_errno(), MEMCACHED_AT);
746+ error= memcached_set_errno(*instance, local_errno, MEMCACHED_AT);
747 return false;
748 }
749 case ENOTCONN:
750 case EPIPE:
751 default:
752 memcached_quit_server(instance, true);
753- error= memcached_set_errno(*instance, get_socket_errno(), MEMCACHED_AT);
754+ error= memcached_set_errno(*instance, local_errno, MEMCACHED_AT);
755 WATCHPOINT_ASSERT(instance->fd == INVALID_SOCKET);
756 return false;
757 }
758@@ -422,6 +423,8 @@
759 do
760 {
761 data_read= ::recv(instance->fd, instance->read_buffer, MEMCACHED_MAX_BUFFER, MSG_NOSIGNAL);
762+ int local_errno= get_socket_errno(); // We cache in case memcached_quit_server() modifies errno
763+
764 if (data_read == SOCKET_ERROR)
765 {
766 switch (get_socket_errno())
767@@ -460,7 +463,7 @@
768 case ECONNREFUSED:
769 default:
770 memcached_quit_server(instance, true);
771- memcached_set_errno(*instance, get_socket_errno(), MEMCACHED_AT);
772+ memcached_set_errno(*instance, local_errno, MEMCACHED_AT);
773 break;
774 }
775
776
777=== modified file 'libmemcached/memcached.cc'
778--- libmemcached/memcached.cc 2013-06-12 08:17:31 +0000
779+++ libmemcached/memcached.cc 2014-02-05 00:01:58 +0000
780@@ -87,6 +87,7 @@
781 self->snd_timeout= 0;
782 self->rcv_timeout= 0;
783 self->server_failure_limit= MEMCACHED_SERVER_FAILURE_LIMIT;
784+ self->server_timeout_limit= MEMCACHED_SERVER_TIMEOUT_LIMIT;
785 self->query_id= 1; // 0 is considered invalid
786
787 /* TODO, Document why we picked these defaults */
788@@ -362,6 +363,7 @@
789 new_clone->get_key_failure= source->get_key_failure;
790 new_clone->delete_trigger= source->delete_trigger;
791 new_clone->server_failure_limit= source->server_failure_limit;
792+ new_clone->server_timeout_limit= source->server_timeout_limit;
793 new_clone->io_msg_watermark= source->io_msg_watermark;
794 new_clone->io_bytes_watermark= source->io_bytes_watermark;
795 new_clone->io_key_prefetch= source->io_key_prefetch;
796
797=== modified file 'libmemcached/quit.cc'
798--- libmemcached/quit.cc 2013-03-31 23:24:29 +0000
799+++ libmemcached/quit.cc 2014-02-05 00:01:58 +0000
800@@ -93,6 +93,7 @@
801 * sent to the server.
802 */
803 instance->server_failure_counter= 0;
804+ instance->server_timeout_counter= 0;
805 }
806 }
807
808@@ -120,8 +121,15 @@
809
810 instance->close_socket();
811
812- if (io_death)
813+ if (io_death and memcached_is_udp(instance->root))
814 {
815+ /*
816+ If using UDP, we should stop using the server briefly on every IO
817+ failure. If using TCP, it may be that the connection went down a
818+ short while ago (e.g. the server failed) and we've only just
819+ noticed, so we should only set the retry timeout on a connect
820+ failure (which doesn't call this method).
821+ */
822 memcached_mark_server_for_timeout(instance);
823 }
824 }
825
826=== modified file 'libmemcached/server.cc'
827--- libmemcached/server.cc 2013-03-31 23:24:29 +0000
828+++ libmemcached/server.cc 2014-02-05 00:01:58 +0000
829@@ -54,6 +54,8 @@
830 self->request_id= 0;
831 self->server_failure_counter= 0;
832 self->server_failure_counter_query_id= 0;
833+ self->server_timeout_counter= 0;
834+ self->server_timeout_counter_query_id= 0;
835 self->weight= weight ? weight : 1; // 1 is the default weight value
836 self->io_wait_count.read= 0;
837 self->io_wait_count.write= 0;
838@@ -213,6 +215,24 @@
839 return self->port();
840 }
841
842+in_port_t memcached_server_srcport(const memcached_instance_st * self)
843+{
844+ WATCHPOINT_ASSERT(self);
845+ if (self == NULL || self->fd == INVALID_SOCKET || (self->type != MEMCACHED_CONNECTION_TCP && self->type != MEMCACHED_CONNECTION_UDP))
846+ {
847+ return 0;
848+ }
849+
850+ struct sockaddr_in sin;
851+ socklen_t addrlen= sizeof(sin);
852+ if (getsockname(self->fd, (struct sockaddr*)&sin, &addrlen) != -1)
853+ {
854+ return ntohs(sin.sin_port);
855+ }
856+
857+ return -1;
858+}
859+
860 uint32_t memcached_server_response_count(const memcached_instance_st * self)
861 {
862 WATCHPOINT_ASSERT(self);
863
864=== modified file 'libmemcached/server.hpp'
865--- libmemcached/server.hpp 2013-03-31 23:24:29 +0000
866+++ libmemcached/server.hpp 2014-02-05 00:01:58 +0000
867@@ -76,22 +76,31 @@
868 {
869 if (server->state != MEMCACHED_SERVER_STATE_IN_TIMEOUT)
870 {
871- struct timeval next_time;
872- if (gettimeofday(&next_time, NULL) == 0)
873- {
874- server->next_retry= next_time.tv_sec +server->root->retry_timeout;
875- }
876- else
877- {
878- server->next_retry= 1; // Setting the value to 1 causes the timeout to occur immediatly
879- }
880-
881- server->state= MEMCACHED_SERVER_STATE_IN_TIMEOUT;
882- if (server->server_failure_counter_query_id != server->root->query_id)
883- {
884- server->server_failure_counter++;
885- server->server_failure_counter_query_id= server->root->query_id;
886- }
887- set_last_disconnected_host(server);
888+ if (server->server_timeout_counter_query_id != server->root->query_id)
889+ {
890+ server->server_timeout_counter++;
891+ server->server_timeout_counter_query_id= server->root->query_id;
892+ }
893+
894+ if (server->server_timeout_counter >= server->root->server_timeout_limit)
895+ {
896+ struct timeval next_time;
897+ if (gettimeofday(&next_time, NULL) == 0)
898+ {
899+ server->next_retry= next_time.tv_sec +server->root->retry_timeout;
900+ }
901+ else
902+ {
903+ server->next_retry= 1; // Setting the value to 1 causes the timeout to occur immediatly
904+ }
905+
906+ server->state= MEMCACHED_SERVER_STATE_IN_TIMEOUT;
907+ if (server->server_failure_counter_query_id != server->root->query_id)
908+ {
909+ server->server_failure_counter++;
910+ server->server_failure_counter_query_id= server->root->query_id;
911+ }
912+ set_last_disconnected_host(server);
913+ }
914 }
915 }
916
917=== modified file 'libmemcached/virtual_bucket.c'
918--- libmemcached/virtual_bucket.c 2013-01-29 19:08:15 +0000
919+++ libmemcached/virtual_bucket.c 2014-02-05 00:01:58 +0000
920@@ -109,14 +109,11 @@
921 {
922 if (self->virtual_bucket)
923 {
924- if (self->virtual_bucket)
925- {
926- uint32_t result= (uint32_t) (digest & (self->virtual_bucket->size -1));
927- return self->virtual_bucket->buckets[result].master;
928- }
929-
930- return (uint32_t) (digest & (self->number_of_hosts -1));
931+ uint32_t result= (uint32_t) (digest & (self->virtual_bucket->size -1));
932+ return self->virtual_bucket->buckets[result].master;
933 }
934+
935+ return (uint32_t) (digest & (self->number_of_hosts -1));
936 }
937
938 return 0;
939
940=== modified file 'libtest/comparison.cc'
941--- libtest/comparison.cc 2013-01-01 01:46:35 +0000
942+++ libtest/comparison.cc 2014-02-05 00:01:58 +0000
943@@ -51,7 +51,7 @@
944
945 bool gdb_is_caller(void)
946 {
947- if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "gdb"))
948+ if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "gdb"))
949 {
950 return true;
951 }
952@@ -66,7 +66,7 @@
953
954 bool helgrind_is_caller(void)
955 {
956- if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "helgrind"))
957+ if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "helgrind"))
958 {
959 return true;
960 }
961
962=== modified file 'libtest/formatter.cc'
963--- libtest/formatter.cc 2013-01-04 01:24:50 +0000
964+++ libtest/formatter.cc 2014-02-05 00:01:58 +0000
965@@ -44,6 +44,56 @@
966
967 namespace libtest {
968
969+std::string& escape4XML(std::string const& arg, std::string& escaped_string)
970+{
971+ escaped_string.clear();
972+
973+ escaped_string+= '"';
974+ for (std::string::const_iterator x= arg.begin(), end= arg.end(); x != end; ++x)
975+ {
976+ unsigned char c= *x;
977+ if (c == '&')
978+ {
979+ escaped_string+= "&amp;";
980+ }
981+ else if (c == '>')
982+ {
983+ escaped_string+= "&gt;";
984+ }
985+ else if (c == '<')
986+ {
987+ escaped_string+= "&lt;";
988+ }
989+ else if (c == '\'')
990+ {
991+ escaped_string+= "&apos;"; break;
992+ }
993+ else if (c == '"')
994+ {
995+ escaped_string+= "&quot;";
996+ }
997+ else if (c == ' ')
998+ {
999+ escaped_string+= ' ';
1000+ }
1001+ else if (isalnum(c))
1002+ {
1003+ escaped_string+= c;
1004+ }
1005+ else
1006+ {
1007+ char const* const hexdig= "0123456789ABCDEF";
1008+ escaped_string+= "&#x";
1009+ escaped_string+= hexdig[c >> 4];
1010+ escaped_string+= hexdig[c & 0xF];
1011+ escaped_string+= ';';
1012+ }
1013+ }
1014+ escaped_string+= '"';
1015+
1016+ return escaped_string;
1017+}
1018+
1019 class TestCase {
1020 public:
1021 TestCase(const std::string& arg):
1022@@ -110,7 +160,10 @@
1023 void Formatter::skipped()
1024 {
1025 current()->result(TEST_SKIPPED);
1026- Out << name() << "." << current()->name() << "\t\t\t\t\t" << "[ " << test_strerror(current()->result()) << " ]";
1027+ Out << name() << "."
1028+ << current()->name()
1029+ << "\t\t\t\t\t"
1030+ << "[ " << test_strerror(current()->result()) << " ]";
1031
1032 reset();
1033 }
1034@@ -120,7 +173,9 @@
1035 assert(current());
1036 current()->result(TEST_FAILURE);
1037
1038- Out << name() << "." << current()->name() << "\t\t\t\t\t" << "[ " << test_strerror(current()->result()) << " ]";
1039+ Out << name()
1040+ << "." << current()->name() << "\t\t\t\t\t"
1041+ << "[ " << test_strerror(current()->result()) << " ]";
1042
1043 reset();
1044 }
1045@@ -129,6 +184,7 @@
1046 {
1047 assert(current());
1048 current()->result(TEST_SUCCESS, timer_);
1049+ std::string escaped_string;
1050
1051 Out << name() << "."
1052 << current()->name()
1053@@ -141,38 +197,50 @@
1054
1055 void Formatter::xml(libtest::Framework& framework_, std::ofstream& output)
1056 {
1057- output << "<testsuites name=\"" << framework_.name() << "\">" << std::endl;
1058+ std::string escaped_string;
1059+
1060+ output << "<testsuites name="
1061+ << escape4XML(framework_.name(), escaped_string) << ">" << std::endl;
1062+
1063 for (Suites::iterator framework_iter= framework_.suites().begin();
1064 framework_iter != framework_.suites().end();
1065 ++framework_iter)
1066 {
1067- output << "\t<testsuite name=\"" << (*framework_iter)->name() << "\" classname=\"\" package=\"\">" << std::endl;
1068+ output << "\t<testsuite name="
1069+ << escape4XML((*framework_iter)->name(), escaped_string)
1070+#if 0
1071+ << " classname=\"\" package=\"\""
1072+#endif
1073+ << ">" << std::endl;
1074
1075 for (TestCases::iterator case_iter= (*framework_iter)->formatter()->testcases().begin();
1076 case_iter != (*framework_iter)->formatter()->testcases().end();
1077 ++case_iter)
1078 {
1079- output << "\t\t<testcase name=\""
1080- << (*case_iter)->name()
1081- << "\" time=\""
1082+ output << "\t\t<testcase name="
1083+ << escape4XML((*case_iter)->name(), escaped_string)
1084+ << " time=\""
1085 << (*case_iter)->timer().elapsed_milliseconds()
1086- << "\">"
1087- << std::endl;
1088+ << "\"";
1089
1090 switch ((*case_iter)->result())
1091 {
1092 case TEST_SKIPPED:
1093+ output << ">" << std::endl;
1094 output << "\t\t <skipped/>" << std::endl;
1095+ output << "\t\t</testcase>" << std::endl;
1096 break;
1097
1098 case TEST_FAILURE:
1099+ output << ">" << std::endl;
1100 output << "\t\t <failure message=\"\" type=\"\"/>"<< std::endl;
1101+ output << "\t\t</testcase>" << std::endl;
1102 break;
1103
1104 case TEST_SUCCESS:
1105+ output << "/>" << std::endl;
1106 break;
1107 }
1108- output << "\t\t</testcase>" << std::endl;
1109 }
1110 output << "\t</testsuite>" << std::endl;
1111 }
1112
1113=== modified file 'libtest/include.am'
1114--- libtest/include.am 2013-06-12 07:11:22 +0000
1115+++ libtest/include.am 2014-02-05 00:01:58 +0000
1116@@ -7,7 +7,7 @@
1117 LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute
1118 VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
1119 SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
1120-VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND)
1121+VALGRIND_COMMAND= LOG_COMPILER="valgrind" $(VALGRIND_EXEC_COMMAND)
1122 HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
1123 DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1
1124 SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
1125@@ -25,22 +25,22 @@
1126 export GDB_COMMAND
1127
1128 valgrind:
1129- @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_EXEC_COMMAND)\""
1130+ @echo make check LOG_COMPILER="\"$(VALGRIND_EXEC_COMMAND)\""
1131
1132 sgcheck:
1133- @echo make check TESTS_ENVIRONMENT="\"$(SGCHECK_EXEC_COMMAND)\""
1134+ @echo make check LOG_COMPILER="\"$(SGCHECK_EXEC_COMMAND)\""
1135
1136 valgrind-supressions:
1137- @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_SUPRESSION)\""
1138+ @echo make check LOG_COMPILER="\"$(VALGRIND_SUPRESSION)\""
1139
1140 gdb:
1141- @echo make check TESTS_ENVIRONMENT="\"$(GDB_COMMAND)\""
1142+ @echo make check LOG_COMPILER="\"$(GDB_COMMAND)\""
1143
1144 helgrind:
1145- @echo make check TESTS_ENVIRONMENT="\"$(HELGRIND_COMMAND)\""
1146+ @echo make check LOG_COMPILER="\"$(HELGRIND_COMMAND)\""
1147
1148 drd:
1149- @echo make check TESTS_ENVIRONMENT="\"$(DRD_COMMAND)\""
1150+ @echo make check LOG_COMPILER="\"$(DRD_COMMAND)\""
1151
1152 EXTRA_DIST+= libtest/run.gdb
1153 EXTRA_DIST+= libtest/version.h
1154@@ -173,8 +173,10 @@
1155 # We are either building in tree, or with
1156 libtest_libtest_la_SOURCES+= libtest/memcached.cc
1157
1158+if HAVE_LIBDRIZZLE
1159 libtest_libtest_la_LDFLAGS+= @LIBDRIZZLE_LDFLAGS@
1160 libtest_libtest_la_LIBADD+= @LIBDRIZZLE_LIB@
1161+endif
1162
1163 libtest_libtest_la_SOURCES+= libtest/gearmand.cc
1164
1165@@ -247,7 +249,7 @@
1166 libtest_backtrace_LDADD=
1167 libtest_backtrace_SOURCES+= libtest/backtrace_test.cc
1168 libtest_backtrace_SOURCES+= libmemcached/backtrace.cc
1169-libtest_backtrace_LDADD+= @DL_LIB@
1170+libtest_backtrace_LDADD+= @lt_cv_dlopen_libs@
1171 noinst_PROGRAMS+= libtest/backtrace
1172 test-backtrace: libtest/backtrace
1173 @libtest/backtrace
1174
1175=== modified file 'libtest/unittest.cc'
1176--- libtest/unittest.cc 2013-10-11 12:19:52 +0000
1177+++ libtest/unittest.cc 2014-02-05 00:01:58 +0000
1178@@ -577,7 +577,7 @@
1179 server_startup_st *servers= (server_startup_st*)object;
1180 test_true(servers);
1181
1182- test_skip(false, bool(getenv("TESTS_ENVIRONMENT")));
1183+ test_skip(false, bool(getenv("LOG_COMPILER")));
1184
1185 if (MEMCACHED_SASL_BINARY)
1186 {
1187
1188=== modified file 'libtest/valgrind.h'
1189--- libtest/valgrind.h 2013-04-15 19:09:52 +0000
1190+++ libtest/valgrind.h 2014-02-05 00:01:58 +0000
1191@@ -38,14 +38,14 @@
1192
1193 static inline bool valgrind_is_caller(void)
1194 {
1195- if (getenv("TESTS_ENVIRONMENT") && strstr(getenv("TESTS_ENVIRONMENT"), "valgrind"))
1196+ if (getenv("LOG_COMPILER") && strstr(getenv("LOG_COMPILER"), "valgrind"))
1197 {
1198- if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool") == NULL)
1199+ if (strstr(getenv("LOG_COMPILER"), "--tool") == NULL)
1200 {
1201 return true;
1202 }
1203
1204- if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool=memcheck"))
1205+ if (strstr(getenv("LOG_COMPILER"), "--tool=memcheck"))
1206 {
1207 return true;
1208 }
1209
1210=== modified file 'm4/ax_check_library.m4'
1211--- m4/ax_check_library.m4 2013-01-08 01:03:28 +0000
1212+++ m4/ax_check_library.m4 2014-02-05 00:01:58 +0000
1213@@ -87,9 +87,6 @@
1214
1215 AS_IF([test "$]AS_TR_SH([ax_cv_have_]$1)[" = "yes"],
1216 [AC_DEFINE([HAVE_]$1, [1], [Define to 1 if ]$1[ is found])
1217- AC_SUBST($1[_CPPFLAGS])
1218- AC_SUBST($1[_LDFLAGS])
1219- AC_SUBST($1[_LIB],[-l]$3)
1220 ifelse([$4], , :, [$4])],
1221 [ifelse([$5], , :, [$5])])
1222 ])
1223
1224=== modified file 'm4/ax_compiler_vendor.m4'
1225--- m4/ax_compiler_vendor.m4 2012-11-04 06:54:36 +0000
1226+++ m4/ax_compiler_vendor.m4 2014-02-05 00:01:58 +0000
1227@@ -4,7 +4,7 @@
1228 #
1229 # SYNOPSIS
1230 #
1231-# AX_COMPILER_VENDOR()
1232+# AX_COMPILER_VENDOR
1233 #
1234 # DESCRIPTION
1235 #
1236@@ -44,7 +44,7 @@
1237 # modified version of the Autoconf Macro, you may extend this special
1238 # exception to the GPL to apply to your modified version as well.
1239
1240-#serial 11
1241+#serial 12
1242
1243 AC_DEFUN([AX_COMPILER_VENDOR],
1244 [AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
1245@@ -53,6 +53,7 @@
1246 ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__
1247 pathscale: __PATHCC__,__PATHSCALE__
1248 clang: __clang__
1249+ fujitsu: __FUJITSU
1250 gnu: __GNUC__
1251 sun: __SUNPRO_C,__SUNPRO_CC
1252 hp: __HP_cc,__HP_aCC
1253
1254=== removed file 'm4/ax_dlopen.m4'
1255--- m4/ax_dlopen.m4 2013-01-08 01:03:28 +0000
1256+++ m4/ax_dlopen.m4 1970-01-01 00:00:00 +0000
1257@@ -1,10 +0,0 @@
1258-#serial 2
1259-
1260-AC_DEFUN([AX_DLOPEN],
1261- [AS_IF([test "x$enable_shared" = xyes],
1262- [AX_CHECK_LIBRARY([DL],[dlfcn.h],[dl],
1263- [AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen])
1264- AC_CHECK_LIB([dl],[dlopen],[AC_DEFINE([HAVE_DLOPEN],[1],[Have dlopen])])
1265- AC_CHECK_LIB([dl],[dladdr],[AC_DEFINE([HAVE_DLADDR],[1],[Have dladdr])])])])
1266- ])
1267-
1268
1269=== modified file 'm4/ax_harden_compiler_flags.m4'
1270--- m4/ax_harden_compiler_flags.m4 2013-10-11 12:19:52 +0000
1271+++ m4/ax_harden_compiler_flags.m4 2014-02-05 00:01:58 +0000
1272@@ -211,7 +211,6 @@
1273 _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter])
1274 _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs])
1275 _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings])
1276- _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all])
1277 _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
1278 _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
1279 _APPEND_COMPILE_FLAGS_ERROR([-pipe])
1280@@ -317,7 +316,6 @@
1281 _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs])
1282 _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings])
1283 _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security])
1284- _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all])
1285 _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
1286 _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
1287 _APPEND_COMPILE_FLAGS_ERROR([-pipe])
1288
1289=== modified file 'm4/ax_pthread.m4'
1290--- m4/ax_pthread.m4 2013-11-04 17:14:31 +0000
1291+++ m4/ax_pthread.m4 2014-02-05 00:01:58 +0000
1292@@ -82,7 +82,7 @@
1293 # modified version of the Autoconf Macro, you may extend this special
1294 # exception to the GPL to apply to your modified version as well.
1295
1296-#serial 22
1297+#serial 23
1298
1299 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
1300 AC_DEFUN([AX_PTHREAD], [
1301
1302=== modified file 'm4/ax_restore_flags.m4'
1303--- m4/ax_restore_flags.m4 2012-10-09 05:01:35 +0000
1304+++ m4/ax_restore_flags.m4 2014-02-05 00:01:58 +0000
1305@@ -4,28 +4,49 @@
1306 #
1307 # SYNOPSIS
1308 #
1309-# AX_RESTORE_FLAGS()
1310+# AX_RESTORE_FLAGS([namespace])
1311 #
1312 # DESCRIPTION
1313 #
1314-# Restore common compilation flags from temporary variables
1315+# Restore common compilation flags from temporary variables.
1316+#
1317+# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
1318+# OBJCFLAGS.
1319+#
1320+# By default these flags are restored to a global (empty) namespace, but
1321+# user could restore from specific NAMESPACE by using
1322+# AX_RESTORE_FLAGS(NAMESPACE) macro.
1323+#
1324+# Typical usage is like:
1325+#
1326+# AX_SAVE_FLAGS(mypackage)
1327+# CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
1328+# dnl ... do some detection ...
1329+# AX_RESTORE_FLAGS(mypackage)
1330 #
1331 # LICENSE
1332 #
1333 # Copyright (c) 2009 Filippo Giunchedi <filippo@esaurito.net>
1334+# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
1335+# Copyright (c) 2011 Russ Allbery <rra@stanford.edu>
1336+# Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf@gmail.com>
1337 #
1338 # Copying and distribution of this file, with or without modification, are
1339 # permitted in any medium without royalty provided the copyright notice
1340 # and this notice are preserved. This file is offered as-is, without any
1341 # warranty.
1342
1343-#serial 3
1344-
1345-AC_DEFUN([AX_RESTORE_FLAGS], [
1346- CPPFLAGS="${CPPFLAGS_save}"
1347- CFLAGS="${CFLAGS_save}"
1348- CXXFLAGS="${CXXFLAGS_save}"
1349- OBJCFLAGS="${OBJCFLAGS_save}"
1350- LDFLAGS="${LDFLAGS_save}"
1351- LIBS="${LIBS_save}"
1352+#serial 6
1353+
1354+# save one flag in name space
1355+AC_DEFUN([_AX_RESTORE_ONE_FLAG],[dnl
1356+ AS_VAR_PUSHDEF([_ax_restore_flag_var], [$2[]_$1[]_ax_save_flags])
1357+ AS_VAR_COPY($2[],_ax_restore_flag_var)
1358+ AS_VAR_POPDEF([_ax_restore_flag_var])
1359+])
1360+
1361+AC_DEFUN([AX_RESTORE_FLAGS], [dnl
1362+ m4_foreach([FLAG], dnl
1363+ [_AX_SAVE_FLAGS_LIST()], dnl
1364+ [_AX_RESTORE_ONE_FLAG([$1],FLAG)])
1365 ])
1366
1367=== modified file 'm4/ax_sasl.m4'
1368--- m4/ax_sasl.m4 2012-12-13 02:48:43 +0000
1369+++ m4/ax_sasl.m4 2014-02-05 00:01:58 +0000
1370@@ -20,33 +20,32 @@
1371 # and this notice are preserved. This file is offered as-is, without any
1372 # warranty.
1373
1374-#serial 2
1375+#serial 3
1376
1377 AC_DEFUN([AX_SASL_OPTION],
1378- [AC_REQUIRE([AX_SASL_CHECK])
1379- AC_ARG_ENABLE([sasl],
1380- [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
1381- [ac_enable_sasl="$enableval"],
1382- [ac_enable_sasl=yes])
1383-
1384- AS_IF([test "x${ac_enable_sasl}" = xyes],
1385- [AC_MSG_CHECKING([checking to see if enabling sasl])
1386- AS_IF([test "x${ax_sasl_check}" = xyes],
1387- [ax_sasl_option=yes],
1388- [AC_MSG_WARN([request to add sasl support failed, please see config.log])
1389- ac_enable_sasl=no
1390- ax_sasl_option=no])
1391- AC_MSG_RESULT(["$ax_sasl_option"])
1392- ])
1393- AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes])
1394- ])
1395-
1396-AC_DEFUN([AX_SASL_CHECK],
1397- [ax_sasl_check=no
1398- AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],
1399- [ax_sasl_check=yes
1400- AC_SUBST([SASL_LIB],[[-lsasl2]])
1401- ])
1402- AC_MSG_CHECKING([checking to see if sasl works])
1403- AC_MSG_RESULT(["$ax_sasl_check"])
1404- ])
1405+ [AC_REQUIRE([AX_SASL_CHECK])
1406+ AC_ARG_ENABLE([sasl],
1407+ [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
1408+ [ac_enable_sasl="$enableval"],
1409+ [ac_enable_sasl=yes])
1410+
1411+ AS_IF([test "x${ac_enable_sasl}" = xyes],[
1412+ AC_MSG_CHECKING([checking to see if enabling sasl])
1413+ AS_IF([test "x${ax_sasl_check}" = xyes],[
1414+ ax_sasl_option=yes],[
1415+ AC_MSG_WARN([request to add sasl support failed, please see config.log])
1416+ ac_enable_sasl=no
1417+ ax_sasl_option=no])
1418+ AC_MSG_RESULT(["$ax_sasl_option"])],[
1419+ ax_sasl_option=no])
1420+ AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes])
1421+ ])
1422+
1423+AC_DEFUN([AX_SASL_CHECK],[
1424+ AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],[
1425+ ax_sasl_check=yes
1426+ AC_SUBST([SASL_LIB],[[-lsasl2]])],[
1427+ ax_sasl_check=no])
1428+ AC_MSG_CHECKING([checking to see if sasl works])
1429+ AC_MSG_RESULT(["$ax_sasl_check"])
1430+ ])
1431
1432=== modified file 'm4/ax_save_flags.m4'
1433--- m4/ax_save_flags.m4 2012-10-09 05:01:35 +0000
1434+++ m4/ax_save_flags.m4 2014-02-05 00:01:58 +0000
1435@@ -4,28 +4,68 @@
1436 #
1437 # SYNOPSIS
1438 #
1439-# AX_SAVE_FLAGS()
1440+# AX_SAVE_FLAGS([NAMESPACE])
1441 #
1442 # DESCRIPTION
1443 #
1444-# Save common compilation flags into temporary variables
1445+# Save common compilation flags into temporary variables.
1446+#
1447+# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
1448+# OBJCFLAGS.
1449+#
1450+# By default these flags are saved to a global (empty) namespace, but user
1451+# could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter
1452+# restore it by using AX_RESTORE_FLAGS(NAMESPACE).
1453+#
1454+# AX_SAVE_FLAGS(mypackage)
1455+# CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
1456+# dnl .. do some detection ...
1457+# AX_RESTORE_FLAGS(mypackage)
1458 #
1459 # LICENSE
1460 #
1461 # Copyright (c) 2009 Filippo Giunchedi <filippo@esaurito.net>
1462+# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
1463+# Copyright (c) 2011 Russ Allbery <rra@stanford.edu>
1464+# Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf@gmail.com>
1465 #
1466 # Copying and distribution of this file, with or without modification, are
1467 # permitted in any medium without royalty provided the copyright notice
1468 # and this notice are preserved. This file is offered as-is, without any
1469 # warranty.
1470
1471-#serial 3
1472-
1473-AC_DEFUN([AX_SAVE_FLAGS], [
1474- CPPFLAGS_save="${CPPFLAGS}"
1475- CFLAGS_save="${CFLAGS}"
1476- CXXFLAGS_save="${CXXFLAGS}"
1477- OBJCFLAGS_save="${OBJCFLAGS}"
1478- LDFLAGS_save="${LDFLAGS}"
1479- LIBS_save="${LIBS}"
1480+#serial 7
1481+
1482+# list of flag to save
1483+AC_DEFUN([_AX_SAVE_FLAGS_LIST],[dnl
1484+[CCASFLAGS],dnl
1485+[CFLAGS],dnl
1486+[CPPFLAGS],dnl
1487+[CXXFLAGS],dnl
1488+[ERLCFLAGS],dnl
1489+[FCFLAGS],dnl
1490+[FCLIBS],dnl
1491+[FFLAGS],dnl
1492+[FLIBS],dnl
1493+[GCJFLAGS],dnl
1494+[JAVACFLAGS],dnl
1495+[LDFLAGS],dnl
1496+[LIBS],dnl
1497+[OBJCFLAGS],dnl
1498+[OBJCXXFLAGS],dnl
1499+[UPCFLAGS],dnl
1500+[VALAFLAGS]dnl
1501+])
1502+
1503+# save one flag in name space
1504+AC_DEFUN([_AX_SAVE_ONE_FLAG],[
1505+ AS_VAR_PUSHDEF([_ax_save_flag_var], [$2[]_$1[]_ax_save_flags])
1506+ AS_VAR_COPY(_ax_save_flag_var, $2[])
1507+ AS_VAR_POPDEF([_ax_save_flag_var])
1508+])
1509+
1510+AC_DEFUN([AX_SAVE_FLAGS],[dnl
1511+ m4_foreach([FLAG], dnl
1512+ [_AX_SAVE_FLAGS_LIST()], dnl
1513+ [_AX_SAVE_ONE_FLAG([$1],FLAG)])
1514 ])
1515
1516=== modified file 'tests/include.am'
1517--- tests/include.am 2013-04-29 15:24:05 +0000
1518+++ tests/include.am 2014-02-05 00:01:58 +0000
1519@@ -27,10 +27,10 @@
1520 # Cycle should always run first
1521 tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
1522 tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
1523-tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
1524+tests_cycle_CXXFLAGS+= @PTHREAD_CFLAGS@
1525 tests_cycle_SOURCES= tests/cycle.cc
1526 tests_cycle_LDADD= $(TESTS_LDADDS)
1527-tests_cycle_LDADD+= ${PTHREAD_LIBS}
1528+tests_cycle_LDADD+= @PTHREAD_LIBS@
1529 check_PROGRAMS+= tests/cycle
1530 noinst_PROGRAMS+= tests/cycle
1531
1532
1533=== modified file 'tests/libmemcached-1.0/all_tests.h'
1534--- tests/libmemcached-1.0/all_tests.h 2013-09-15 07:19:20 +0000
1535+++ tests/libmemcached-1.0/all_tests.h 2014-02-05 00:01:58 +0000
1536@@ -284,6 +284,7 @@
1537 {"lp:1021819", true, (test_callback_fn*)regression_1021819_TEST },
1538 {"lp:1048945", true, (test_callback_fn*)regression_1048945_TEST },
1539 {"lp:1067242", true, (test_callback_fn*)regression_1067242_TEST },
1540+ {"lp:1251482", true, (test_callback_fn*)regression_bug_1251482 },
1541 {0, false, (test_callback_fn*)0}
1542 };
1543
1544
1545=== modified file 'tests/libmemcached-1.0/mem_functions.cc'
1546--- tests/libmemcached-1.0/mem_functions.cc 2013-11-04 17:14:31 +0000
1547+++ tests/libmemcached-1.0/mem_functions.cc 2014-02-05 00:01:58 +0000
1548@@ -413,6 +413,7 @@
1549 test_true(memc_clone->retry_timeout == memc->retry_timeout);
1550 test_true(memc_clone->send_size == memc->send_size);
1551 test_true(memc_clone->server_failure_limit == memc->server_failure_limit);
1552+ test_true(memc_clone->server_timeout_limit == memc->server_timeout_limit);
1553 test_true(memc_clone->snd_timeout == memc->snd_timeout);
1554 test_true(memc_clone->user_data == memc->user_data);
1555
1556@@ -4562,7 +4563,7 @@
1557
1558 /* Put a retry timeout to effectively activate failure_limit effect */
1559 test_compare(MEMCACHED_SUCCESS,
1560- memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, true));
1561+ memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1));
1562
1563 /* change behavior that triggers memcached_quit()*/
1564 test_compare(MEMCACHED_SUCCESS,
1565@@ -4844,6 +4845,28 @@
1566 return TEST_SUCCESS;
1567 }
1568
1569+test_return_t regression_bug_1251482(memcached_st*)
1570+{
1571+ test::Memc memc("--server=localhost:5");
1572+
1573+ memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 0);
1574+
1575+ for (size_t x= 4; x; --x)
1576+ {
1577+ size_t value_length;
1578+ memcached_return_t rc;
1579+ char *value= memcached_get(&memc,
1580+ test_literal_param(__func__),
1581+ &value_length, NULL, &rc);
1582+
1583+ test_false(value);
1584+ test_compare(0LLU, value_length);
1585+ test_compare(MEMCACHED_CONNECTION_FAILURE, rc);
1586+ }
1587+
1588+ return TEST_SUCCESS;
1589+}
1590+
1591 test_return_t regression_1009493_TEST(memcached_st*)
1592 {
1593 memcached_st* memc= memcached_create(NULL);
1594
1595=== modified file 'tests/libmemcached-1.0/mem_functions.h'
1596--- tests/libmemcached-1.0/mem_functions.h 2013-09-15 07:19:20 +0000
1597+++ tests/libmemcached-1.0/mem_functions.h 2014-02-05 00:01:58 +0000
1598@@ -187,3 +187,4 @@
1599 test_return_t regression_1048945_TEST(memcached_st*);
1600 test_return_t regression_1067242_TEST(memcached_st*);
1601 test_return_t comparison_operator_memcached_st_and__memcached_return_t_TEST(memcached_st*);
1602+test_return_t regression_bug_1251482(memcached_st*);
1603
1604=== modified file 'tests/libmemcached_world.h'
1605--- tests/libmemcached_world.h 2013-10-11 12:19:52 +0000
1606+++ tests/libmemcached_world.h 2014-02-05 00:01:58 +0000
1607@@ -50,7 +50,7 @@
1608 SKIP_UNLESS(libmemcached_has_feature(LIBMEMCACHED_FEATURE_HAS_SASL));
1609
1610 // Assume we are running under valgrind, and bail
1611- if (getenv("TESTS_ENVIRONMENT"))
1612+ if (getenv("LOG_COMPILER"))
1613 {
1614 error= TEST_SKIPPED;
1615 return NULL;
1616
1617=== modified file 'tests/mem_udp.cc'
1618--- tests/mem_udp.cc 2013-04-03 13:14:23 +0000
1619+++ tests/mem_udp.cc 2014-02-05 00:01:58 +0000
1620@@ -145,7 +145,7 @@
1621
1622 static test_return_t init_udp_valgrind(memcached_st *memc)
1623 {
1624- if (getenv("TESTS_ENVIRONMENT"))
1625+ if (getenv("LOG_COMPILER"))
1626 {
1627 return TEST_SKIPPED;
1628 }
1629@@ -157,7 +157,7 @@
1630
1631 static test_return_t binary_init_udp(memcached_st *memc)
1632 {
1633- if (getenv("TESTS_ENVIRONMENT"))
1634+ if (getenv("LOG_COMPILER"))
1635 {
1636 return TEST_SKIPPED;
1637 }
1638@@ -269,7 +269,7 @@
1639 static test_return_t udp_set_test(memcached_st *memc)
1640 {
1641 // Assume we are running under valgrind, and bail
1642- if (getenv("TESTS_ENVIRONMENT"))
1643+ if (getenv("LOG_COMPILER"))
1644 {
1645 return TEST_SUCCESS;
1646 }

Subscribers

People subscribed via source and target branches

to all changes: