Merge lp:~brianaker/libmemcached/1220444 into lp:libmemcached

Proposed by Brian Aker
Status: Merged
Merged at revision: 1109
Proposed branch: lp:~brianaker/libmemcached/1220444
Merge into: lp:libmemcached
Diff against target: 835 lines (+210/-129) (has conflicts)
23 files modified
bootstrap.sh (+45/-17)
clients/generator.cc (+5/-3)
clients/memcp.cc (+1/-1)
clients/memslap.cc (+5/-3)
libmemcached/io.cc (+4/-4)
libmemcached/string.cc (+11/-9)
libtest/cmdline.cc (+1/-1)
libtest/core.cc (+2/-2)
libtest/cpu.cc (+5/-0)
libtest/main.cc (+9/-2)
libtest/unittest.cc (+5/-5)
m4/ax_debug.m4 (+4/-2)
m4/ax_harden_compiler_flags.m4 (+36/-0)
m4/ax_memcached.m4 (+10/-21)
m4/hiredis.m4 (+26/-34)
tests/libmemcached-1.0/plus.cpp (+7/-0)
tests/memcat.cc (+7/-5)
tests/memcp.cc (+4/-0)
tests/memdump.cc (+3/-2)
tests/memexist.cc (+8/-8)
tests/memping.cc (+2/-2)
tests/memrm.cc (+3/-1)
tests/memtouch.cc (+7/-7)
Text conflict in bootstrap.sh
Text conflict in libtest/cpu.cc
Text conflict in libtest/main.cc
Text conflict in m4/ax_harden_compiler_flags.m4
To merge this branch: bzr merge lp:~brianaker/libmemcached/1220444
Reviewer Review Type Date Requested Status
Tangent Trunk Pending
Review via email: mp+190539@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
=== modified file 'bootstrap.sh'
--- bootstrap.sh 2013-06-13 22:13:53 +0000
+++ bootstrap.sh 2013-10-11 06:45:05 +0000
@@ -421,7 +421,11 @@
421 # If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV421 # If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV
422 case $HOST_OS in422 case $HOST_OS in
423 *-darwin-*)423 *-darwin-*)
424<<<<<<< TREE
424 run CC=clang CXX=clang++ $top_srcdir/configure "$BUILD_CONFIGURE_ARG" || die "Cannot execute CC=clang CXX=clang++ configure $BUILD_CONFIGURE_ARG"425 run CC=clang CXX=clang++ $top_srcdir/configure "$BUILD_CONFIGURE_ARG" || die "Cannot execute CC=clang CXX=clang++ configure $BUILD_CONFIGURE_ARG"
426=======
427 run CC=clang CXX=clang++ $CONFIGURE "$BUILD_CONFIGURE_ARG" || die "Cannot execute CC=clang CXX=clang++ configure $BUILD_CONFIGURE_ARG"
428>>>>>>> MERGE-SOURCE
425 ret=$?429 ret=$?
426 ;;430 ;;
427 rhel-5*)431 rhel-5*)
@@ -793,18 +797,14 @@
793797
794 CC=clang CXX=clang++798 CC=clang CXX=clang++
795 export CC CXX799 export CC CXX
800 CONFIGURE='scan-build ./configure'
796 CONFIGURE_ARGS='--enable-debug'801 CONFIGURE_ARGS='--enable-debug'
797802
798 make_skeleton803 run_configure
799 ret=$?
800
801 make_target 'clean' 'warn'
802804
803 scan-build -o clang-html make -j4 -k805 scan-build -o clang-html make -j4 -k
804806
805 restore_BUILD807 restore_BUILD
806
807 return $ret
808}808}
809809
810# If we are locally testing, we should make sure the environment is setup correctly810# If we are locally testing, we should make sure the environment is setup correctly
@@ -1010,6 +1010,9 @@
1010{1010{
1011 if command_exists 'rpmbuild'; then1011 if command_exists 'rpmbuild'; then
1012 if [ -f 'rpm.am' -o -d 'rpm' ]; then1012 if [ -f 'rpm.am' -o -d 'rpm' ]; then
1013 mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
1014 mkdir -p ~/rpmbuild/RPMS/{i386,i486,i586,i686,noarch,athlon}
1015
1013 run_configure_if_required1016 run_configure_if_required
1014 make_target 'rpm'1017 make_target 'rpm'
10151018
@@ -1507,6 +1510,9 @@
15071510
1508execute_job ()1511execute_job ()
1509{1512{
1513 # We should always have a target by this point
1514 assert MAKE_TARGET
1515
1510 determine_target_platform1516 determine_target_platform
15111517
1512 determine_vcs1518 determine_vcs
@@ -1518,11 +1524,15 @@
1518 return 11524 return 1
1519 fi1525 fi
15201526
1527<<<<<<< TREE
1521 if [ -z "$MAKE_TARGET" ]; then1528 if [ -z "$MAKE_TARGET" ]; then
1522 MAKE_TARGET="make_default"1529 MAKE_TARGET="make_default"
1523 fi1530 fi
15241531
1525 if $print_setup_opt -o $debug; then1532 if $print_setup_opt -o $debug; then
1533=======
1534 if $print_setup_opt -o $debug; then
1535>>>>>>> MERGE-SOURCE
1526 echo 1536 echo
1527 print_setup1537 print_setup
1528 echo 1538 echo
@@ -1541,15 +1551,21 @@
1541 PREFIX_ARG="--prefix=$PREFIX"1551 PREFIX_ARG="--prefix=$PREFIX"
1542 fi1552 fi
15431553
1544 # We should always have a target by this point1554 if $CLEAN_OPTION; then
1545 assert MAKE_TARGET1555 make_maintainer_clean
15461556 fi
1547 if $CLEAN_OPTION; then1557
1548 make_maintainer_clean1558<<<<<<< TREE
1549 fi1559 if $CLEAN_OPTION; then
15501560 make_maintainer_clean
1551 local MAKE_TARGET_ARRAY1561 fi
1552 MAKE_TARGET_ARRAY=( $MAKE_TARGET )1562
1563 local MAKE_TARGET_ARRAY
1564 MAKE_TARGET_ARRAY=( $MAKE_TARGET )
1565=======
1566 local MAKE_TARGET_ARRAY
1567 MAKE_TARGET_ARRAY=( $MAKE_TARGET )
1568>>>>>>> MERGE-SOURCE
15531569
1554 for target in "${MAKE_TARGET_ARRAY[@]}"1570 for target in "${MAKE_TARGET_ARRAY[@]}"
1555 do1571 do
@@ -1762,8 +1778,20 @@
1762 fi1778 fi
1763 fi1779 fi
17641780
1765 execute_job1781<<<<<<< TREE
1766 local ret=$?1782 execute_job
1783 local ret=$?
1784=======
1785 if [ -z "$MAKE_TARGET" ]; then
1786 MAKE_TARGET="make_default"
1787 fi
1788
1789 # We should always have a target by this point
1790 assert MAKE_TARGET
1791
1792 execute_job
1793 local ret=$?
1794>>>>>>> MERGE-SOURCE
17671795
1768 jobs -l1796 jobs -l
1769 wait1797 wait
17701798
=== modified file 'clients/generator.cc'
--- clients/generator.cc 2013-01-08 01:03:28 +0000
+++ clients/generator.cc 2013-10-11 06:45:05 +0000
@@ -22,6 +22,8 @@
2222
23#include "clients/generator.h"23#include "clients/generator.h"
2424
25#define KEY_BYTES 20
26
25/* Use this for string generation */27/* Use this for string generation */
26static const char ALPHANUMERICS[]=28static const char ALPHANUMERICS[]=
27 "0123456789ABCDEFGHIJKLMNOPQRSTWXYZabcdefghijklmnopqrstuvwxyz";29 "0123456789ABCDEFGHIJKLMNOPQRSTWXYZabcdefghijklmnopqrstuvwxyz";
@@ -75,13 +77,13 @@
7577
76 for (uint64_t x= 0; x < number_of; x++)78 for (uint64_t x= 0; x < number_of; x++)
77 {79 {
78 pairs[x].key= (char *)calloc(100, sizeof(char));80 pairs[x].key= (char *)calloc(KEY_BYTES, sizeof(char));
7981
80 if (pairs[x].key == NULL)82 if (pairs[x].key == NULL)
81 goto error;83 goto error;
8284
83 get_random_string(pairs[x].key, 100);85 get_random_string(pairs[x].key, KEY_BYTES);
84 pairs[x].key_length= 100;86 pairs[x].key_length= KEY_BYTES;
8587
86 if (value_length)88 if (value_length)
87 {89 {
8890
=== modified file 'clients/memcp.cc'
--- clients/memcp.cc 2013-06-11 12:31:47 +0000
+++ clients/memcp.cc 2013-10-11 06:45:05 +0000
@@ -1,5 +1,5 @@
1/* LibMemcached1/* LibMemcached
2 * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/2 * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/
3 * Copyright (C) 2006-2009 Brian Aker3 * Copyright (C) 2006-2009 Brian Aker
4 * All rights reserved.4 * All rights reserved.
5 *5 *
66
=== modified file 'clients/memslap.cc'
--- clients/memslap.cc 2013-04-03 13:14:23 +0000
+++ clients/memslap.cc 2013-10-11 06:45:05 +0000
@@ -66,6 +66,8 @@
66#define DEFAULT_EXECUTE_NUMBER 1000066#define DEFAULT_EXECUTE_NUMBER 10000
67#define DEFAULT_CONCURRENCY 167#define DEFAULT_CONCURRENCY 1
6868
69#define VALUE_BYTES 4096
70
69#define PROGRAM_NAME "memslap"71#define PROGRAM_NAME "memslap"
70#define PROGRAM_DESCRIPTION "Generates a load against a memcached custer of servers."72#define PROGRAM_DESCRIPTION "Generates a load against a memcached custer of servers."
7173
@@ -336,7 +338,7 @@
336338
337 if (opt_test == SET_TEST)339 if (opt_test == SET_TEST)
338 {340 {
339 context->execute_pairs= pairs_generate(opt_execute_number, 400);341 context->execute_pairs= pairs_generate(opt_execute_number, VALUE_BYTES);
340 context->execute_number= opt_execute_number;342 context->execute_number= opt_execute_number;
341 }343 }
342344
@@ -432,7 +434,7 @@
432 break;434 break;
433435
434 case OPT_DEBUG: /* --debug or -d */436 case OPT_DEBUG: /* --debug or -d */
435 opt_verbose = OPT_DEBUG;437 opt_verbose= OPT_DEBUG;
436 break;438 break;
437439
438 case OPT_VERSION: /* --version or -V */440 case OPT_VERSION: /* --version or -V */
@@ -566,7 +568,7 @@
566 /* We always used non-blocking IO for load since it is faster */568 /* We always used non-blocking IO for load since it is faster */
567 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);569 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
568570
569 pairs_st *pairs= pairs_generate(number_of, 400);571 pairs_st *pairs= pairs_generate(number_of, VALUE_BYTES);
570 *actual_loaded= execute_set(memc_clone, pairs, number_of);572 *actual_loaded= execute_set(memc_clone, pairs, number_of);
571573
572 memcached_free(memc_clone);574 memcached_free(memc_clone);
573575
=== modified file 'libmemcached/io.cc'
--- libmemcached/io.cc 2013-03-31 23:24:29 +0000
+++ libmemcached/io.cc 2013-10-11 06:45:05 +0000
@@ -99,7 +99,7 @@
99 case EWOULDBLOCK:99 case EWOULDBLOCK:
100#endif100#endif
101 case EAGAIN:101 case EAGAIN:
102#ifdef TARGET_OS_LINUX102#ifdef __linux
103 case ERESTART:103 case ERESTART:
104#endif104#endif
105 break; // No IO is fine, we can just move on105 break; // No IO is fine, we can just move on
@@ -265,7 +265,7 @@
265 assert_msg(active_fd == -1 , "poll() returned an unexpected value");265 assert_msg(active_fd == -1 , "poll() returned an unexpected value");
266 switch (local_errno)266 switch (local_errno)
267 {267 {
268#ifdef TARGET_OS_LINUX268#ifdef __linux
269 case ERESTART:269 case ERESTART:
270#endif270#endif
271 case EINTR:271 case EINTR:
@@ -430,7 +430,7 @@
430 case EWOULDBLOCK:430 case EWOULDBLOCK:
431#endif431#endif
432 case EAGAIN:432 case EAGAIN:
433#ifdef TARGET_OS_LINUX433#ifdef __linux
434 case ERESTART:434 case ERESTART:
435#endif435#endif
436 {436 {
@@ -568,7 +568,7 @@
568 case EWOULDBLOCK:568 case EWOULDBLOCK:
569#endif569#endif
570 case EAGAIN:570 case EAGAIN:
571#ifdef TARGET_OS_LINUX571#ifdef __linux
572 case ERESTART:572 case ERESTART:
573#endif573#endif
574 if (memcached_success(io_wait(instance, MEM_READ)))574 if (memcached_success(io_wait(instance, MEM_READ)))
575575
=== modified file 'libmemcached/string.cc'
--- libmemcached/string.cc 2013-01-23 21:28:45 +0000
+++ libmemcached/string.cc 2013-10-11 06:45:05 +0000
@@ -281,18 +281,20 @@
281{281{
282 char* value= NULL;282 char* value= NULL;
283283
284 if (memcached_string_length(self))284 assert_msg(self, "Invalid memcached_string_st");
285 if (self)
285 {286 {
286 assert_msg(self, "Invalid memcached_string_st");287 if (memcached_string_length(self))
287 // If we fail at adding the null, we copy and move on
288 if (memcached_success(memcached_string_append_null(self)))
289 {288 {
290 return memcached_string_c_copy(self);289 // If we fail at adding the null, we copy and move on
290 if (memcached_failed(memcached_string_append_null(self)))
291 {
292 return NULL;
293 }
294
295 value= self->string;
296 _init_string(self);
291 }297 }
292
293 value= self->string;
294
295 _init_string(self);
296 }298 }
297299
298 return value;300 return value;
299301
=== modified file 'libtest/cmdline.cc'
--- libtest/cmdline.cc 2013-06-12 07:11:22 +0000
+++ libtest/cmdline.cc 2013-10-11 06:45:05 +0000
@@ -359,7 +359,7 @@
359 int error;359 int error;
360 switch ((error= errno))360 switch ((error= errno))
361 {361 {
362#ifdef TARGET_OS_LINUX362#ifdef __linux
363 case ERESTART:363 case ERESTART:
364#endif364#endif
365 case EINTR:365 case EINTR:
366366
=== modified file 'libtest/core.cc'
--- libtest/core.cc 2012-12-09 11:40:11 +0000
+++ libtest/core.cc 2013-10-11 06:45:05 +0000
@@ -42,8 +42,8 @@
4242
43void create_core(void)43void create_core(void)
44{44{
45#if defined(TARGET_OS_OSX) && TARGET_OS_OSX45#if defined(__APPLE__) && __APPLE__
46 if (TARGET_OS_OSX)46 if (__APPLE__)
47 {47 {
48 return;48 return;
49 }49 }
5050
=== modified file 'libtest/cpu.cc'
--- libtest/cpu.cc 2013-06-12 07:11:22 +0000
+++ libtest/cpu.cc 2013-10-11 06:45:05 +0000
@@ -52,8 +52,13 @@
5252
53uint32_t number_of_cpus()53uint32_t number_of_cpus()
54{54{
55<<<<<<< TREE
55 uint32_t number_of_cpu= 1;56 uint32_t number_of_cpu= 1;
56#ifdef linux 57#ifdef linux
58=======
59 size_t number_of_cpu= 1;
60#if defined(__linux) && __linux
61>>>>>>> MERGE-SOURCE
57 number_of_cpu= sysconf(_SC_NPROCESSORS_ONLN);62 number_of_cpu= sysconf(_SC_NPROCESSORS_ONLN);
58#elif defined(HAVE_SYS_SYSCTL_H) && defined(CTL_HW) && defined(HW_NCPU) && defined(HW_AVAILCPU) && defined(HW_NCPU)63#elif defined(HAVE_SYS_SYSCTL_H) && defined(CTL_HW) && defined(HW_NCPU) && defined(HW_AVAILCPU) && defined(HW_NCPU)
59 int mib[4];64 int mib[4];
6065
=== modified file 'libtest/main.cc'
--- libtest/main.cc 2013-06-12 07:11:22 +0000
+++ libtest/main.cc 2013-10-11 06:45:05 +0000
@@ -2,7 +2,7 @@
2 *2 *
3 * Data Differential YATL (i.e. libtest) library3 * Data Differential YATL (i.e. libtest) library
4 *4 *
5 * Copyright (C) 2012 Data Differential, http://datadifferential.com/5 * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/
6 *6 *
7 * Redistribution and use in source and binary forms, with or without7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are8 * modification, are permitted provided that the following conditions are
@@ -45,6 +45,13 @@
45#include <fnmatch.h>45#include <fnmatch.h>
46#include <fstream>46#include <fstream>
47#include <iostream>47#include <iostream>
48<<<<<<< TREE
49=======
50#ifdef HAVE_STRINGS_H
51# include <strings.h>
52#endif
53#include <fstream>
54>>>>>>> MERGE-SOURCE
48#include <memory>55#include <memory>
49#include <sys/stat.h>56#include <sys/stat.h>
50#include <sys/time.h>57#include <sys/time.h>
@@ -113,7 +120,7 @@
113 Valgrind does not currently work reliably, or sometimes at all, on OSX120 Valgrind does not currently work reliably, or sometimes at all, on OSX
114 - Fri Jun 15 11:24:07 EDT 2012121 - Fri Jun 15 11:24:07 EDT 2012
115 */122 */
116#if defined(TARGET_OS_OSX) && TARGET_OS_OSX123#if defined(__APPLE__) && __APPLE__
117 if (valgrind_is_caller())124 if (valgrind_is_caller())
118 {125 {
119 return EXIT_SKIP;126 return EXIT_SKIP;
120127
=== modified file 'libtest/unittest.cc'
--- libtest/unittest.cc 2013-06-12 07:11:22 +0000
+++ libtest/unittest.cc 2013-10-11 06:45:05 +0000
@@ -657,7 +657,7 @@
657 const char *args[]= { "--fubar", 0 };657 const char *args[]= { "--fubar", 0 };
658#if defined(__APPLE__) && __APPLE__658#if defined(__APPLE__) && __APPLE__
659 ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));659 ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));
660#elif defined(TARGET_OS_FREEBSD) && TARGET_OS_FREEBSD660#elif defined(__FreeBSD__) && __FreeBSD__
661 ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));661 ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));
662#else662#else
663 ASSERT_EQ(Application::SUCCESS, true_app.run(args));663 ASSERT_EQ(Application::SUCCESS, true_app.run(args));
@@ -855,8 +855,8 @@
855static test_return_t gdb_wait_services_appliction_TEST(void *)855static test_return_t gdb_wait_services_appliction_TEST(void *)
856{856{
857 test_skip(true, false);857 test_skip(true, false);
858#if defined(TARGET_OS_OSX) && TARGET_OS_OSX858#if defined(__APPLE__) && __APPLE__
859 test_skip(0, TARGET_OS_OSX);859 test_skip(0, __APPLE__);
860#endif860#endif
861861
862 test_skip(0, access("/etc/services", R_OK ));862 test_skip(0, access("/etc/services", R_OK ));
@@ -879,8 +879,8 @@
879 test_skip(0, access("libtest/abort", X_OK ));879 test_skip(0, access("libtest/abort", X_OK ));
880 test_skip(true, false);880 test_skip(true, false);
881881
882#if defined(TARGET_OS_OSX) && TARGET_OS_OSX882#if defined(__APPLE__) && __APPLE__
883 test_skip(0, TARGET_OS_OSX);883 test_skip(0, __APPLE__);
884#endif884#endif
885885
886 libtest::Application abort_app("libtest/abort", true);886 libtest::Application abort_app("libtest/abort", true);
887887
=== modified file 'm4/ax_debug.m4'
--- m4/ax_debug.m4 2013-01-08 01:03:28 +0000
+++ m4/ax_debug.m4 2013-10-11 06:45:05 +0000
@@ -43,7 +43,7 @@
43# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE43# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.44# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4545
46#serial 546#serial 6
4747
48AC_DEFUN([AX_DEBUG],48AC_DEFUN([AX_DEBUG],
49 [AC_PREREQ([2.63])dnl49 [AC_PREREQ([2.63])dnl
@@ -52,7 +52,9 @@
52 [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],52 [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
53 [ax_enable_debug=yes53 [ax_enable_debug=yes
54 AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])54 AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])
55 AX_CHECK_LIBRARY([MCHECK],[mcheck.h],[mcheck],[AX_APPEND_LINK_FLAGS([-lmcheck])])],55 AX_CHECK_LIBRARY([MCHECK],[mcheck.h],[mcheck],[AX_APPEND_LINK_FLAGS([-lmcheck])])
56 AX_ADD_AM_MACRO([--debug],[AM_YFLAGS])
57 AX_ADD_AM_MACRO([-D_GLIBCXX_DEBUG],[AM_CPPFLAGS])],
56 [ax_enable_debug=no58 [ax_enable_debug=no
57 AC_SUBST([MCHECK])59 AC_SUBST([MCHECK])
58 AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])])60 AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])])
5961
=== modified file 'm4/ax_harden_compiler_flags.m4'
--- m4/ax_harden_compiler_flags.m4 2013-10-01 23:52:41 +0000
+++ m4/ax_harden_compiler_flags.m4 2013-10-11 06:45:05 +0000
@@ -53,6 +53,7 @@
53# -Wdeclaration-after-statement is counter to C9953# -Wdeclaration-after-statement is counter to C99
54# _APPEND_COMPILE_FLAGS_ERROR([-pedantic])54# _APPEND_COMPILE_FLAGS_ERROR([-pedantic])
5555
56<<<<<<< TREE
56#serial 1257#serial 12
5758
58AC_DEFUN([_SET_SANITIZE_FLAGS],59AC_DEFUN([_SET_SANITIZE_FLAGS],
@@ -86,6 +87,41 @@
86 ])87 ])
87 ])88 ])
88 ])89 ])
90=======
91#serial 13
92
93AC_DEFUN([_SET_SANITIZE_FLAGS],
94 [AS_IF([test "x$MINGW" != xyes],[
95 AS_IF([test "x$enable_shared" = "xyes"],
96 [AS_CASE([$ax_harden_sanitize],
97 [thread],[
98 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread])],
99 [address],[
100 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])],
101 [rest],[
102 _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
103 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
104 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
105 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
106 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
107 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
108 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
109 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
110 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
111 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
112 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
113 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
114 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
115 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
116 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
117 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
118 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
119 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
120 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])])
121 ])
122 ])
123 ])
124>>>>>>> MERGE-SOURCE
89125
90AC_DEFUN([_WARNINGS_AS_ERRORS],126AC_DEFUN([_WARNINGS_AS_ERRORS],
91 [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors],127 [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors],
92128
=== modified file 'm4/ax_memcached.m4'
--- m4/ax_memcached.m4 2013-04-29 15:24:05 +0000
+++ m4/ax_memcached.m4 2013-10-11 06:45:05 +0000
@@ -44,26 +44,15 @@
44# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE44# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.45# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4646
47#serial 447#serial 3
4848
49AC_DEFUN([AX_PROG_MEMCACHED],49AC_DEFUN([AX_PROG_MEMCACHED],
50 [AX_WITH_PROG([MEMCACHED_BINARY],[memcached],[unknown])50 [AX_WITH_PROG([MEMCACHED_BINARY],[memcached])
51 ax_memcached_success=51 AS_IF([test -f "$ac_cv_path_MEMCACHED_BINARY"],
52 AS_IF([test x"$MEMCACHED_BINARY" != xunknown],52 [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available])
53 [AS_IF([test -x "$MEMCACHED_BINARY"],53 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$ac_cv_path_MEMCACHED_BINARY",[Name of the memcached binary used in make test])
54 [ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`54 ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`
55 AS_IF([test -n "$ax_memcached_version"],55 AC_MSG_RESULT([memcached version "$ax_memcached_version"])
56 [ax_memcached_success='ok'56 AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])
57 AC_MSG_RESULT([memcached version "$ax_memcached_version"])57 ])
58 AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])])58 ])
59 ])
60 ])
61
62 AS_IF([test -n "$ax_memcached_success"],
63 [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available])
64 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$MEMCACHED_BINARY",[Name of the memcached binary used in make test])
65 ],
66 [AC_DEFINE([HAVE_MEMCACHED_BINARY], [0], [If Memcached binary is available])
67 MEMCACHED_BINARY=
68 ])
69 ])
7059
=== modified file 'm4/hiredis.m4'
--- m4/hiredis.m4 2012-09-05 05:20:56 +0000
+++ m4/hiredis.m4 2013-10-11 06:45:05 +0000
@@ -1,34 +1,26 @@
1dnl Copyright (C) 2011 Brian Aker (brian@tangent.org)1# Copyright (C) 2011 Brian Aker (brian@tangent.org)
22#
3AC_DEFUN([_SEARCH_LIBHIREDIS],[3# serial 2
4 AC_REQUIRE([AX_CHECK_LIBRARY])4
55AC_DEFUN([_SEARCH_HIREDIS],
6 AS_IF([test "x$ac_enable_hires" = "xyes"],[6 [AC_REQUIRE([AX_CHECK_LIBRARY])
7 AX_CHECK_LIBRARY([LIBHIREDIS], [hiredis/hiredis.h], [hiredis],7
8 [8 AS_IF([test "x$ac_enable_hiredis" = "xyes"],
9 LIBHIREDIS_LDFLAGS="-lhiredis"9 [hiredis_header="hiredis/hiredis.h"],
10 AC_DEFINE([HAVE_HIREDIS], [1], [If Hiredis available])10 [hiredis_header="does_not_exist"])
11 ],11
12 [12 AX_CHECK_LIBRARY([HIREDIS],[$hiredis_header],[hiredis],,
13 AC_DEFINE([HAVE_HIREDIS], [0], [If Hiredis is available])13 [AC_DEFINE([HAVE_HIREDIS],[0],[Define to 1 if HIREDIS is found])])
14 ac_enable_hires="no"14
15 ])15 AS_IF([test "x$ax_cv_have_HIREDIS" = xno],[ac_enable_hiredis="no"])
1616 ])
17 ],17
18 [18 AC_DEFUN([AX_ENABLE_LIBHIREDIS],
19 AC_DEFINE([HAVE_HIREDIS], [0], [If Hiredis is available])19 [AC_ARG_ENABLE([hiredis],
20 ])20 [AS_HELP_STRING([--disable-hiredis],
2121 [Build with hiredis support @<:@default=on@:>@])],
22 AM_CONDITIONAL(HAVE_HIREDIS, [test "x$ac_cv_lib_hiredis_main" = "xyes"])22 [ac_enable_hiredis="$enableval"],
23 ])23 [ac_enable_hiredis="yes"])
2424
25AC_DEFUN([AX_HAVE_LIBHIREDIS],[25 _SEARCH_HIREDIS
2626 ])
27 AC_ARG_ENABLE([hires],
28 [AS_HELP_STRING([--disable-hires],
29 [Build with hires support @<:@default=on@:>@])],
30 [ac_enable_hires="$enableval"],
31 [ac_enable_hires="yes"])
32
33 _SEARCH_LIBHIREDIS
34])
3527
=== modified file 'tests/libmemcached-1.0/plus.cpp'
--- tests/libmemcached-1.0/plus.cpp 2013-04-03 13:14:23 +0000
+++ tests/libmemcached-1.0/plus.cpp 2013-10-11 06:45:05 +0000
@@ -181,6 +181,13 @@
181 vector<char> return_value;181 vector<char> return_value;
182182
183 /* We need to empty the server before we continue the test */183 /* We need to empty the server before we continue the test */
184 bool flush_res= memc.flush();
185 if (flush_res == false)
186 {
187 std::string error_string;
188 ASSERT_TRUE(memc.error(error_string));
189 Error << error_string;
190 }
184 test_true(memc.flush());191 test_true(memc.flush());
185192
186 test_true(memc.mget(keys));193 test_true(memc.mget(keys));
187194
=== modified file 'tests/memcat.cc'
--- tests/memcat.cc 2013-01-28 22:51:05 +0000
+++ tests/memcat.cc 2013-10-11 06:45:05 +0000
@@ -64,10 +64,10 @@
64static test_return_t cat_test(void *)64static test_return_t cat_test(void *)
65{65{
66 char buffer[1024];66 char buffer[1024];
67 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));67 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
68 const char *args[]= { buffer, "foo", 0 };68 const char *args[]= { buffer, "foo", 0 };
6969
70 memcached_st *memc= memcached(buffer, strlen(buffer));70 memcached_st *memc= memcached(buffer, length);
71 test_true(memc);71 test_true(memc);
7272
73 test_compare(MEMCACHED_SUCCESS,73 test_compare(MEMCACHED_SUCCESS,
@@ -77,6 +77,7 @@
77 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));77 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
78 test_compare(MEMCACHED_SUCCESS, rc);78 test_compare(MEMCACHED_SUCCESS, rc);
7979
80 snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
80 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));81 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
8182
82 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));83 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
@@ -90,11 +91,11 @@
90static test_return_t NOT_FOUND_test(void *)91static test_return_t NOT_FOUND_test(void *)
91{92{
92 char buffer[1024];93 char buffer[1024];
93 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));94 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
94 const char *args[]= { buffer, "foo", 0 };95 const char *args[]= { buffer, "foo", 0 };
9596
96 memcached_st *memc= memcached(buffer, strlen(buffer));97 memcached_st *memc= memcached(buffer, length);
97 test_true(memc);98 ASSERT_TRUE(memc);
9899
99 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));100 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
100101
@@ -102,6 +103,7 @@
102 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));103 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
103 test_compare(MEMCACHED_NOTFOUND, rc);104 test_compare(MEMCACHED_NOTFOUND, rc);
104105
106 snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
105 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));107 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
106108
107 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));109 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
108110
=== modified file 'tests/memcp.cc'
--- tests/memcp.cc 2013-06-12 07:11:22 +0000
+++ tests/memcp.cc 2013-10-11 06:45:05 +0000
@@ -63,6 +63,7 @@
63 return TEST_SUCCESS;63 return TEST_SUCCESS;
64}64}
6565
66#if 0
66static test_return_t server_test(void *)67static test_return_t server_test(void *)
67{68{
68 int fd;69 int fd;
@@ -82,10 +83,13 @@
8283
83 return TEST_SUCCESS;84 return TEST_SUCCESS;
84}85}
86#endif
8587
86test_st memcp_tests[] ={88test_st memcp_tests[] ={
87 {"--help", true, help_test },89 {"--help", true, help_test },
90#if 0
88 {"--server_test", true, server_test },91 {"--server_test", true, server_test },
92#endif
89 {0, 0, 0}93 {0, 0, 0}
90};94};
9195
9296
=== modified file 'tests/memdump.cc'
--- tests/memdump.cc 2013-01-28 22:51:05 +0000
+++ tests/memdump.cc 2013-10-11 06:45:05 +0000
@@ -75,10 +75,10 @@
75static test_return_t FOUND_test(void *)75static test_return_t FOUND_test(void *)
76{76{
77 char buffer[1024];77 char buffer[1024];
78 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));78 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
79 const char *args[]= { buffer, 0 };79 const char *args[]= { buffer, 0 };
8080
81 memcached_st *memc= memcached(buffer, strlen(buffer));81 memcached_st *memc= memcached(buffer, length);
82 test_true(memc);82 test_true(memc);
8383
84 test_compare(MEMCACHED_SUCCESS,84 test_compare(MEMCACHED_SUCCESS,
@@ -91,6 +91,7 @@
91 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));91 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
92 test_compare(MEMCACHED_SUCCESS, rc);92 test_compare(MEMCACHED_SUCCESS, rc);
9393
94 length= snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
94 test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);95 test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);
9596
96 memcached_free(memc);97 memcached_free(memc);
9798
=== modified file 'tests/memexist.cc'
--- tests/memexist.cc 2013-01-28 22:51:05 +0000
+++ tests/memexist.cc 2013-10-11 06:45:05 +0000
@@ -64,10 +64,10 @@
64static test_return_t exist_test(void *)64static test_return_t exist_test(void *)
65{65{
66 char buffer[1024];66 char buffer[1024];
67 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));67 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
68 const char *args[]= { buffer, "foo", 0 };68 const char *args[]= { buffer, "foo", 0 };
6969
70 memcached_st *memc= memcached(buffer, strlen(buffer));70 memcached_st *memc= memcached(buffer, length);
71 test_true(memc);71 test_true(memc);
7272
73 test_compare(MEMCACHED_SUCCESS,73 test_compare(MEMCACHED_SUCCESS,
@@ -90,11 +90,11 @@
90static test_return_t NOT_FOUND_test(void *)90static test_return_t NOT_FOUND_test(void *)
91{91{
92 char buffer[1024];92 char buffer[1024];
93 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));93 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
94 const char *args[]= { buffer, "foo", 0 };94 const char *args[]= { buffer, "foo", 0 };
9595
96 memcached_st *memc= memcached(buffer, strlen(buffer));96 memcached_st *memc= memcached(buffer, length);
97 test_true(memc);97 ASSERT_TRUE(memc);
9898
99 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));99 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
100100
@@ -115,9 +115,9 @@
115static test_return_t check_version(void*)115static test_return_t check_version(void*)
116{116{
117 char buffer[1024];117 char buffer[1024];
118 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));118 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
119 memcached_st *memc= memcached(buffer, strlen(buffer));119 memcached_st *memc= memcached(buffer, length);
120 test_true(memc);120 ASSERT_TRUE(memc);
121 121
122 test_return_t result= TEST_SUCCESS;122 test_return_t result= TEST_SUCCESS;
123 if (libmemcached_util_version_check(memc, 1, 4, 8) == false)123 if (libmemcached_util_version_check(memc, 1, 4, 8) == false)
124124
=== modified file 'tests/memping.cc'
--- tests/memping.cc 2013-04-03 13:14:23 +0000
+++ tests/memping.cc 2013-10-11 06:45:05 +0000
@@ -64,7 +64,7 @@
64static test_return_t ping_TEST(void *)64static test_return_t ping_TEST(void *)
65{65{
66 char buffer[1024];66 char buffer[1024];
67 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));67 snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
68 const char *args[]= { buffer, 0 };68 const char *args[]= { buffer, 0 };
6969
70 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));70 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
@@ -75,7 +75,7 @@
75static test_return_t NOT_FOUND_TEST(void *)75static test_return_t NOT_FOUND_TEST(void *)
76{76{
77 char buffer[1024];77 char buffer[1024];
78 snprintf(buffer, sizeof(buffer), "--server=nonexist.libmemcached.org:%d", int(default_port()));78 snprintf(buffer, sizeof(buffer), "--servers=nonexist.libmemcached.org:%d", int(default_port()));
79 const char *args[]= { buffer, 0 };79 const char *args[]= { buffer, 0 };
8080
81 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));81 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
8282
=== modified file 'tests/memrm.cc'
--- tests/memrm.cc 2013-01-28 22:51:05 +0000
+++ tests/memrm.cc 2013-10-11 06:45:05 +0000
@@ -84,6 +84,8 @@
84 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));84 test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
85 test_compare(MEMCACHED_SUCCESS, rc);85 test_compare(MEMCACHED_SUCCESS, rc);
8686
87 char memrm_buffer[1024];
88 snprintf(memrm_buffer, sizeof(memrm_buffer), "--servers=localhost:%d", int(default_port()));
87 const char *args[]= { buffer, "foo", 0 };89 const char *args[]= { buffer, "foo", 0 };
88 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));90 test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
8991
@@ -121,7 +123,7 @@
121static test_return_t multiple_NOT_FOUND_TEST(void *)123static test_return_t multiple_NOT_FOUND_TEST(void *)
122{124{
123 char buffer[1024];125 char buffer[1024];
124 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));126 snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
125 const char *args[]= { buffer, "protocols", "foo", "mine", "bar", "dog", "cat", "foo", "mine",127 const char *args[]= { buffer, "protocols", "foo", "mine", "bar", "dog", "cat", "foo", "mine",
126 "eye", "for", "the", "to", "not", "know", "what", "I", "should", "be", "doing", 0 };128 "eye", "for", "the", "to", "not", "know", "what", "I", "should", "be", "doing", 0 };
127129
128130
=== modified file 'tests/memtouch.cc'
--- tests/memtouch.cc 2013-01-28 22:51:05 +0000
+++ tests/memtouch.cc 2013-10-11 06:45:05 +0000
@@ -65,9 +65,9 @@
65static test_return_t touch_test(void *)65static test_return_t touch_test(void *)
66{66{
67 char buffer[1024];67 char buffer[1024];
68 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));68 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
6969
70 memcached_st *memc= memcached(buffer, strlen(buffer));70 memcached_st *memc= memcached(buffer, length);
71 test_true(memc);71 test_true(memc);
7272
73 test_compare(MEMCACHED_SUCCESS,73 test_compare(MEMCACHED_SUCCESS,
@@ -89,15 +89,15 @@
89static test_return_t NOT_FOUND_test(void *)89static test_return_t NOT_FOUND_test(void *)
90{90{
91 char buffer[1024];91 char buffer[1024];
92 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));92 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
93 memcached_st *memc= memcached(buffer, strlen(buffer));93 memcached_st *memc= memcached(buffer, length);
94 test_true(memc);94 test_true(memc);
9595
96 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));96 test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
9797
98 test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));98 test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));
9999
100 snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));100 length= snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
101 const char *args[]= { "--expire=30", buffer, "foo", 0 };101 const char *args[]= { "--expire=30", buffer, "foo", 0 };
102 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));102 test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
103103
@@ -111,8 +111,8 @@
111static test_return_t check_version(void*)111static test_return_t check_version(void*)
112{112{
113 char buffer[1024];113 char buffer[1024];
114 snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));114 int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
115 memcached_st *memc= memcached(buffer, strlen(buffer));115 memcached_st *memc= memcached(buffer, length);
116 test_true(memc);116 test_true(memc);
117 117
118 test_return_t result= TEST_SUCCESS;118 test_return_t result= TEST_SUCCESS;

Subscribers

People subscribed via source and target branches

to all changes: