1
Description: Test against '127.0.0.1' instead of 'localhost', to work around a
2
bug in gearmand which do not handle the case where a hostname resolves to
3
multiple equal IP addresses.
4
Bug: https://bugs.launchpad.net/gearmand/+bug/918055
5
Author: Stig Sandbeck Mathisen <ssm@debian.org>
6
Last-Update: 2012-01-21
9
--- gearmand.orig/libtest/blobslap_worker.cc
10
+++ gearmand/libtest/blobslap_worker.cc
14
BlobslapWorker(in_port_t port_arg) :
15
- Server("localhost", port_arg)
16
+ Server("127.0.0.1", port_arg)
20
--- gearmand.orig/libtest/gearmand.cc
21
+++ gearmand/libtest/gearmand.cc
23
arg_buffer << " -u root ";
26
- arg_buffer << " --listen=localhost ";
27
+ arg_buffer << " --listen=127.0.0.1 ";
29
for (int x= 1 ; x < argc ; x++)
31
--- gearmand.orig/libtest/memcached.cc
32
+++ gearmand/libtest/memcached.cc
34
arg_buffer << " -u root ";
37
- arg_buffer << " -l localhost ";
38
+ arg_buffer << " -l 127.0.0.1 ";
39
arg_buffer << " -m 128 ";
42
--- gearmand.orig/libtest/server_container.cc
43
+++ gearmand/libtest/server_container.cc
48
- server= build_gearmand("localhost", try_port);
49
+ server= build_gearmand("127.0.0.1", try_port);
55
if (HAVE_LIBMEMCACHED)
57
- server= build_memcached_sasl("localhost", try_port, construct.username(), construct.password());
58
+ server= build_memcached_sasl("127.0.0.1", try_port, construct.username(), construct.password());
64
if (HAVE_LIBMEMCACHED)
66
- server= build_memcached("localhost", try_port);
67
+ server= build_memcached("127.0.0.1", try_port);
73
if (HAVE_LIBMEMCACHED)
75
- server= build_memcached_sasl_socket("localhost", try_port, username(), password());
76
+ server= build_memcached_sasl_socket("127.0.0.1", try_port, username(), password());
82
if (HAVE_LIBMEMCACHED)
84
- server= build_memcached_socket("localhost", try_port);
85
+ server= build_memcached_socket("127.0.0.1", try_port);
89
--- gearmand.orig/tests/drizzle_test.cc
90
+++ gearmand/tests/drizzle_test.cc
92
static test_return_t gearmand_basic_option_test(void *)
94
const char *args[]= { "--check-args",
95
- "--libdrizzle-host=localhost",
96
+ "--libdrizzle-host=127.0.0.1",
97
"--libdrizzle-port=90",
98
"--libdrizzle-uds=tmp/foo.socket",
99
"--libdrizzle-user=root",
100
--- gearmand.orig/tests/httpd_test.cc
101
+++ gearmand/tests/httpd_test.cc
104
static test_return_t GET_TEST(void *)
106
- libtest::http::GET get("http://localhost:8090/");
107
+ libtest::http::GET get("http://127.0.0.1:8090/");
109
test_compare(false, get.execute());
113
static test_return_t HEAD_TEST(void *)
115
- libtest::http::HEAD head("http://localhost:8090/");
116
+ libtest::http::HEAD head("http://127.0.0.1:8090/");
118
test_compare(false, head.execute());
120
--- gearmand.orig/tests/libgearman-1.0/client_test.cc
121
+++ gearmand/tests/libgearman-1.0/client_test.cc
124
from_with_host= gearman_client_create(NULL);
125
test_truth(from_with_host);
126
- gearman_client_add_server(from_with_host, "localhost", 12345);
127
+ gearman_client_add_server(from_with_host, "127.0.0.1", 12345);
129
client= gearman_client_clone(NULL, from_with_host);
132
test_truth(client_ptr);
135
- rc= gearman_client_add_servers(&client, "localhost:4730,localhost");
136
+ rc= gearman_client_add_servers(&client, "127.0.0.1:4730,localhost");
137
test_compare_got(GEARMAN_SUCCESS, rc, gearman_strerror(rc));
139
rc= gearman_client_add_servers(&client, "old_jobserver:7003,broken:12345");
140
--- gearmand.orig/tests/memcached_test.cc
141
+++ gearmand/tests/memcached_test.cc
144
const char *args[]= { "--check-args",
145
"--queue=libmemcached",
146
- "--libmemcached-servers=localhost:12555",
147
+ "--libmemcached-servers=127.0.0.1:12555",
150
test_compare(EXIT_SUCCESS, exec_cmdline(gearmand_binary(), args, true));
152
static test_return_t collection_init(void *object)
154
const char *argv[]= { "test_gearmand",
155
- "--libmemcached-servers=localhost:12555",
156
+ "--libmemcached-servers=127.0.0.1:12555",
157
"--queue-type=libmemcached",
160
--- gearmand.orig/tests/redis.cc
161
+++ gearmand/tests/redis.cc
163
static test_return_t gearmand_basic_option_test(void *)
165
const char *args[]= { "--check-args",
166
- "--redis-server=localhost",
167
+ "--redis-server=127.0.0.1",