Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lavabit/magma.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadar Levison <ladar@lavabit.com>2019-01-25 01:06:01 +0300
committerLadar Levison <ladar@lavabit.com>2019-01-25 01:06:01 +0300
commit0df0a3a68e616c480e749505cf8ff20abb430ab2 (patch)
treebc7c5b5c05b43a779290296ec4a20de606628519
parent49ae15a8d9639a73438a0b00b2607b7b8b8dfb4c (diff)
Possible fix for the unit test failures resulting from UDP and IPv6 issues.
-rwxr-xr-xdev/scripts/builders/build.lib.sh3
-rw-r--r--lib/patches/memcached/1.0.18_fix_ipv6_and_udp_test_failures.patch45
2 files changed, 48 insertions, 0 deletions
diff --git a/dev/scripts/builders/build.lib.sh b/dev/scripts/builders/build.lib.sh
index bc68aefb..9d10f29a 100755
--- a/dev/scripts/builders/build.lib.sh
+++ b/dev/scripts/builders/build.lib.sh
@@ -2123,6 +2123,9 @@ memcached() {
# Disable portable instruction executables so profiling capable builds work properly. Technically this is only
# needed so "-pg" can be used, even though the "-pg" flag isn't enabled by default.
cat "$M_PATCHES/memcached/"configure_1.0.18.patch | patch -p1 --verbose &>> "$M_LOGS/memcached.txt"; error
+ # On some IPv6 systems localhost resolves to ::1 which results in the memcached binary getting port binding failures,
+ # and without a server to test against, the unit tests will fail.
+ cat "$M_PATCHES/memcached/"1.0.18_fix_ipv6_and_udp_test_failures.patch | patch -p1 --verbose &>> "$M_LOGS/memcached.txt"; error
fi
;;
memcached-build)
diff --git a/lib/patches/memcached/1.0.18_fix_ipv6_and_udp_test_failures.patch b/lib/patches/memcached/1.0.18_fix_ipv6_and_udp_test_failures.patch
new file mode 100644
index 00000000..12b3b40e
--- /dev/null
+++ b/lib/patches/memcached/1.0.18_fix_ipv6_and_udp_test_failures.patch
@@ -0,0 +1,45 @@
+diff --git a/libtest/gearmand.cc b/libtest/gearmand.cc
+index 852cf19..866d3e6 100644
+--- a/libtest/gearmand.cc
++++ b/libtest/gearmand.cc
+@@ -139,7 +139,7 @@ bool Gearmand::build()
+ add_option("-u", "root");
+ }
+
+- add_option("--listen=localhost");
++ add_option("--listen=127.0.0.1");
+
+ return true;
+ }
+diff --git a/libtest/memcached.cc b/libtest/memcached.cc
+index 15fcbff..0127356 100644
+--- a/libtest/memcached.cc
++++ b/libtest/memcached.cc
+@@ -71,7 +71,7 @@ public:
+ const bool is_socket_arg,
+ const std::string& username_arg,
+ const std::string& password_arg) :
+- libtest::Server(host_arg, port_arg,
++ libtest::Server(host_arg, port_arg,
+ memcached_binary(), false, is_socket_arg),
+ _username(username_arg),
+ _password(password_arg)
+@@ -156,7 +156,8 @@ public:
+ {
+ char buffer[30];
+ snprintf(buffer, sizeof(buffer), "%d", int(arg));
+- app.add_option("-p", buffer);
++ app.add_option("-p", buffer);
++ app.add_option("-U", buffer);
+ }
+
+ bool has_port_option() const
+@@ -201,7 +202,7 @@ bool Memcached::build()
+ add_option("-u", "root");
+ }
+
+- add_option("-l", "localhost");
++ add_option("-l", "127.0.0.1");
+ #ifdef __APPLE__
+ #else
+ add_option("-m", "128");