~clint-fewbar/ubuntu/precise/gearmand/drop-unneeded-patches

« back to all changes in this revision

Viewing changes to debian/patches/workaround_duplicate_address_in_tests.patch

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2009-08-11 10:06:22 UTC
  • mto: (1.2.3 upstream) (6.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20090811100622-6ig4iknanc73olum
ImportĀ upstreamĀ versionĀ 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
Forwarded: no
8
 
 
9
 
--- gearmand.orig/libtest/blobslap_worker.cc
10
 
+++ gearmand/libtest/blobslap_worker.cc
11
 
@@ -48,7 +48,7 @@
12
 
 private:
13
 
 public:
14
 
   BlobslapWorker(in_port_t port_arg) :
15
 
-    Server("localhost", port_arg)
16
 
+    Server("127.0.0.1", port_arg)
17
 
   { 
18
 
     set_pid_file();
19
 
   }
20
 
--- gearmand.orig/libtest/gearmand.cc
21
 
+++ gearmand/libtest/gearmand.cc
22
 
@@ -206,7 +206,7 @@
23
 
     arg_buffer << " -u root ";
24
 
   }
25
 
 
26
 
-  arg_buffer << " --listen=localhost ";
27
 
+  arg_buffer << " --listen=127.0.0.1 ";
28
 
 
29
 
   for (int x= 1 ; x < argc ; x++)
30
 
   {
31
 
--- gearmand.orig/libtest/memcached.cc
32
 
+++ gearmand/libtest/memcached.cc
33
 
@@ -298,7 +298,7 @@
34
 
     arg_buffer << " -u root ";
35
 
   }
36
 
 
37
 
-  arg_buffer << " -l localhost ";
38
 
+  arg_buffer << " -l 127.0.0.1 ";
39
 
   arg_buffer << " -m 128 ";
40
 
   arg_buffer << " -M ";
41
 
 
42
 
--- gearmand.orig/libtest/server_container.cc
43
 
+++ gearmand/libtest/server_container.cc
44
 
@@ -172,7 +172,7 @@
45
 
     {
46
 
       if (HAVE_LIBGEARMAN)
47
 
       {
48
 
-        server= build_gearmand("localhost", try_port);
49
 
+        server= build_gearmand("127.0.0.1", try_port);
50
 
       }
51
 
       else
52
 
       {
53
 
@@ -208,7 +208,7 @@
54
 
     {
55
 
       if (HAVE_LIBMEMCACHED)
56
 
       {
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());
59
 
       }
60
 
       else
61
 
       {
62
 
@@ -226,7 +226,7 @@
63
 
     {
64
 
       if (HAVE_LIBMEMCACHED)
65
 
       {
66
 
-        server= build_memcached("localhost", try_port);
67
 
+        server= build_memcached("127.0.0.1", try_port);
68
 
       }
69
 
       else
70
 
       {
71
 
@@ -311,7 +311,7 @@
72
 
     {
73
 
       if (HAVE_LIBMEMCACHED)
74
 
       {
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());
77
 
       }
78
 
       else
79
 
       {
80
 
@@ -329,7 +329,7 @@
81
 
     {
82
 
       if (HAVE_LIBMEMCACHED)
83
 
       {
84
 
-        server= build_memcached_socket("localhost", try_port);
85
 
+        server= build_memcached_socket("127.0.0.1", try_port);
86
 
       }
87
 
       else
88
 
       {
89
 
--- gearmand.orig/tests/drizzle_test.cc
90
 
+++ gearmand/tests/drizzle_test.cc
91
 
@@ -75,7 +75,7 @@
92
 
 static test_return_t gearmand_basic_option_test(void *)
93
 
 {
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
102
 
@@ -61,7 +61,7 @@
103
 
 
104
 
 static test_return_t GET_TEST(void *)
105
 
 {
106
 
-  libtest::http::GET get("http://localhost:8090/");
107
 
+  libtest::http::GET get("http://127.0.0.1:8090/");
108
 
 
109
 
   test_compare(false, get.execute());
110
 
 
111
 
@@ -70,7 +70,7 @@
112
 
 
113
 
 static test_return_t HEAD_TEST(void *)
114
 
 {
115
 
-  libtest::http::HEAD head("http://localhost:8090/");
116
 
+  libtest::http::HEAD head("http://127.0.0.1:8090/");
117
 
 
118
 
   test_compare(false, head.execute());
119
 
 
120
 
--- gearmand.orig/tests/libgearman-1.0/client_test.cc
121
 
+++ gearmand/tests/libgearman-1.0/client_test.cc
122
 
@@ -293,7 +293,7 @@
123
 
 
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);
128
 
 
129
 
   client= gearman_client_clone(NULL, from_with_host);
130
 
   test_truth(client);
131
 
@@ -800,7 +800,7 @@
132
 
   test_truth(client_ptr);
133
 
 
134
 
   gearman_return_t rc;
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));
138
 
 
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
142
 
@@ -32,7 +32,7 @@
143
 
 {
144
 
   const char *args[]= { "--check-args",
145
 
     "--queue=libmemcached",
146
 
-    "--libmemcached-servers=localhost:12555", 
147
 
+    "--libmemcached-servers=127.0.0.1:12555", 
148
 
     0 };
149
 
 
150
 
   test_compare(EXIT_SUCCESS, exec_cmdline(gearmand_binary(), args, true));
151
 
@@ -43,7 +43,7 @@
152
 
 static test_return_t collection_init(void *object)
153
 
 {
154
 
   const char *argv[]= { "test_gearmand", 
155
 
-    "--libmemcached-servers=localhost:12555", 
156
 
+    "--libmemcached-servers=127.0.0.1:12555", 
157
 
     "--queue-type=libmemcached",
158
 
     0 };
159
 
 
160
 
--- gearmand.orig/tests/redis.cc
161
 
+++ gearmand/tests/redis.cc
162
 
@@ -33,7 +33,7 @@
163
 
 static test_return_t gearmand_basic_option_test(void *)
164
 
 {
165
 
   const char *args[]= { "--check-args", 
166
 
-    "--redis-server=localhost",
167
 
+    "--redis-server=127.0.0.1",
168
 
     "--redis-port=6379",
169
 
     0 };
170