Merge lp:~piotr-sikora/libmemcached/openbsd-fixes into lp:~tangent-org/libmemcached/trunk
- openbsd-fixes
- Merge into trunk
Proposed by
Piotr Sikora
Status: | Merged |
---|---|
Merged at revision: | 885 |
Proposed branch: | lp:~piotr-sikora/libmemcached/openbsd-fixes |
Merge into: | lp:~tangent-org/libmemcached/trunk |
Diff against target: |
163 lines (+19/-19) 3 files modified
tests/include.am (+15/-15) tests/mem_functions.c (+2/-2) tests/server.c (+2/-2) |
To merge this branch: | bzr merge lp:~piotr-sikora/libmemcached/openbsd-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Libmemcached-developers | Pending | ||
Review via email: mp+30799@code.launchpad.net |
Commit message
Description of the change
OpenBSD fixes.
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
1 | === modified file 'tests/include.am' | |||
2 | --- tests/include.am 2010-06-30 19:44:33 +0000 | |||
3 | +++ tests/include.am 2010-07-23 16:43:40 +0000 | |||
4 | @@ -92,20 +92,20 @@ | |||
5 | 92 | test: check | 92 | test: check |
6 | 93 | 93 | ||
7 | 94 | check-local: test-docs test-mem test-hash memcapable | 94 | check-local: test-docs test-mem test-hash memcapable |
9 | 95 | echo "Tests completed" | 95 | @echo "Tests completed" |
10 | 96 | 96 | ||
11 | 97 | test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat | 97 | test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat |
13 | 98 | echo "Tests completed" | 98 | @echo "Tests completed" |
14 | 99 | 99 | ||
15 | 100 | memcapable: clients/memcapable | 100 | memcapable: clients/memcapable |
17 | 101 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 101 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
18 | 102 | @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands" | 102 | @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands" |
19 | 103 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 103 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
20 | 104 | @rm tests/Xumemc.pid | 104 | @rm tests/Xumemc.pid |
21 | 105 | 105 | ||
22 | 106 | test-memcat: clients/memcat clients/memcp | 106 | test-memcat: clients/memcat clients/memcp |
23 | 107 | @echo "Testing memcat" | 107 | @echo "Testing memcat" |
25 | 108 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 108 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
26 | 109 | @clients/memcp --servers="localhost:12555" `pwd`/clients/memcp | 109 | @clients/memcp --servers="localhost:12555" `pwd`/clients/memcp |
27 | 110 | @clients/memcat --servers="localhost:12555" memcp > `pwd`/tests/scratch | 110 | @clients/memcat --servers="localhost:12555" memcp > `pwd`/tests/scratch |
28 | 111 | @clients/memcat --servers="localhost:12555" --file=`pwd`/tests/scratch2 memcp | 111 | @clients/memcat --servers="localhost:12555" --file=`pwd`/tests/scratch2 memcp |
29 | @@ -117,7 +117,7 @@ | |||
30 | 117 | 117 | ||
31 | 118 | valgrind-memcat: clients/memcat clients/memcp | 118 | valgrind-memcat: clients/memcat clients/memcp |
32 | 119 | @echo "Testing memcat" | 119 | @echo "Testing memcat" |
34 | 120 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 120 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
35 | 121 | @clients/memcp --servers="localhost:12555" clients/memcp | 121 | @clients/memcp --servers="localhost:12555" clients/memcp |
36 | 122 | @$(VALGRIND_COMMAND) clients/memcat --servers="localhost:12555" memcp > tests/scratch | 122 | @$(VALGRIND_COMMAND) clients/memcat --servers="localhost:12555" memcp > tests/scratch |
37 | 123 | # @diff clients/memcp tests/scratch | 123 | # @diff clients/memcp tests/scratch |
38 | @@ -127,21 +127,21 @@ | |||
39 | 127 | 127 | ||
40 | 128 | test-memcp: clients/memcp | 128 | test-memcp: clients/memcp |
41 | 129 | @echo "Testing memcp" | 129 | @echo "Testing memcp" |
43 | 130 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 130 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
44 | 131 | @clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat | 131 | @clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat |
45 | 132 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 132 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
46 | 133 | @rm tests/Xumemc.pid | 133 | @rm tests/Xumemc.pid |
47 | 134 | 134 | ||
48 | 135 | valgrind-memcp: clients/memcat clients/memcp | 135 | valgrind-memcp: clients/memcat clients/memcp |
49 | 136 | @echo "Testing memcp" | 136 | @echo "Testing memcp" |
51 | 137 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 137 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
52 | 138 | @$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat | 138 | @$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat |
53 | 139 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 139 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
54 | 140 | @rm tests/Xumemc.pid | 140 | @rm tests/Xumemc.pid |
55 | 141 | 141 | ||
56 | 142 | test-memrm: clients/memrm clients/memcp | 142 | test-memrm: clients/memrm clients/memcp |
57 | 143 | @echo "Testing memrm" | 143 | @echo "Testing memrm" |
59 | 144 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 144 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
60 | 145 | @clients/memcp --servers="localhost:12555" clients/memcat | 145 | @clients/memcp --servers="localhost:12555" clients/memcat |
61 | 146 | @clients/memrm --servers="localhost:12555" memcat | 146 | @clients/memrm --servers="localhost:12555" memcat |
62 | 147 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 147 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
63 | @@ -149,7 +149,7 @@ | |||
64 | 149 | 149 | ||
65 | 150 | valgrind-memrm: clients/memcat clients/memcp | 150 | valgrind-memrm: clients/memcat clients/memcp |
66 | 151 | @echo "Testing memrm" | 151 | @echo "Testing memrm" |
68 | 152 | @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 | 152 | @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
69 | 153 | @clients/memcp --servers="localhost:12555" clients/memcat | 153 | @clients/memcp --servers="localhost:12555" clients/memcat |
70 | 154 | @$(VALGRIND_COMMAND) clients/memrm --servers="localhost:12555" memcat | 154 | @$(VALGRIND_COMMAND) clients/memrm --servers="localhost:12555" memcat |
71 | 155 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 155 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
72 | @@ -157,21 +157,21 @@ | |||
73 | 157 | 157 | ||
74 | 158 | test-memflush: clients/memflush | 158 | test-memflush: clients/memflush |
75 | 159 | @echo "Testing memflush" | 159 | @echo "Testing memflush" |
77 | 160 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 160 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
78 | 161 | @clients/memflush --servers="localhost:12555" | 161 | @clients/memflush --servers="localhost:12555" |
79 | 162 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 162 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
80 | 163 | @rm tests/Xumemc.pid | 163 | @rm tests/Xumemc.pid |
81 | 164 | 164 | ||
82 | 165 | valgrind-memflush: clients/memflush | 165 | valgrind-memflush: clients/memflush |
83 | 166 | @echo "Testing memflush" | 166 | @echo "Testing memflush" |
85 | 167 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 167 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
86 | 168 | @$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555" | 168 | @$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555" |
87 | 169 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 169 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
88 | 170 | @rm tests/Xumemc.pid | 170 | @rm tests/Xumemc.pid |
89 | 171 | 171 | ||
90 | 172 | test-memdump: clients/memdump clients/memcp | 172 | test-memdump: clients/memdump clients/memcp |
91 | 173 | @echo "Testing memdump" | 173 | @echo "Testing memdump" |
93 | 174 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 174 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
94 | 175 | @clients/memcp --servers="localhost:12555" clients/memcat | 175 | @clients/memcp --servers="localhost:12555" clients/memcat |
95 | 176 | @clients/memdump --servers="localhost:12555" > /dev/null | 176 | @clients/memdump --servers="localhost:12555" > /dev/null |
96 | 177 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 177 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
97 | @@ -179,7 +179,7 @@ | |||
98 | 179 | 179 | ||
99 | 180 | valgrind-memdump: clients/memcat clients/memcp | 180 | valgrind-memdump: clients/memcat clients/memcp |
100 | 181 | @echo "Testing memdump" | 181 | @echo "Testing memdump" |
102 | 182 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 182 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
103 | 183 | @clients/memcp --servers="localhost:12555" clients/memcat | 183 | @clients/memcp --servers="localhost:12555" clients/memcat |
104 | 184 | @$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null | 184 | @$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null |
105 | 185 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 185 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
106 | @@ -187,14 +187,14 @@ | |||
107 | 187 | 187 | ||
108 | 188 | test-memstat: clients/memstat | 188 | test-memstat: clients/memstat |
109 | 189 | @echo "Testing memstat" | 189 | @echo "Testing memstat" |
111 | 190 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 190 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
112 | 191 | @clients/memstat --servers="localhost:12555" > /dev/null | 191 | @clients/memstat --servers="localhost:12555" > /dev/null |
113 | 192 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 192 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
114 | 193 | @rm tests/Xumemc.pid | 193 | @rm tests/Xumemc.pid |
115 | 194 | 194 | ||
116 | 195 | valgrind-memstat: clients/memstat | 195 | valgrind-memstat: clients/memstat |
117 | 196 | @echo "Testing memstat" | 196 | @echo "Testing memstat" |
119 | 197 | @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555 | 197 | @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555 |
120 | 198 | @$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null | 198 | @$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null |
121 | 199 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" | 199 | @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" |
122 | 200 | @rm tests/Xumemc.pid | 200 | @rm tests/Xumemc.pid |
123 | 201 | 201 | ||
124 | === modified file 'tests/mem_functions.c' | |||
125 | --- tests/mem_functions.c 2010-07-20 04:45:48 +0000 | |||
126 | +++ tests/mem_functions.c 2010-07-23 16:43:40 +0000 | |||
127 | @@ -2781,7 +2781,7 @@ | |||
128 | 2781 | return TEST_SUCCESS; | 2781 | return TEST_SUCCESS; |
129 | 2782 | } | 2782 | } |
130 | 2783 | 2783 | ||
132 | 2784 | #ifndef __sun | 2784 | #if !defined(__sun) && !defined(__OpenBSD__) |
133 | 2785 | /* Check the validity of chinese key*/ | 2785 | /* Check the validity of chinese key*/ |
134 | 2786 | static test_return_t user_supplied_bug17(memcached_st *memc) | 2786 | static test_return_t user_supplied_bug17(memcached_st *memc) |
135 | 2787 | { | 2787 | { |
136 | @@ -6216,7 +6216,7 @@ | |||
137 | 6216 | {"user_supplied_bug14", 1, (test_callback_fn)user_supplied_bug14 }, | 6216 | {"user_supplied_bug14", 1, (test_callback_fn)user_supplied_bug14 }, |
138 | 6217 | {"user_supplied_bug15", 1, (test_callback_fn)user_supplied_bug15 }, | 6217 | {"user_supplied_bug15", 1, (test_callback_fn)user_supplied_bug15 }, |
139 | 6218 | {"user_supplied_bug16", 1, (test_callback_fn)user_supplied_bug16 }, | 6218 | {"user_supplied_bug16", 1, (test_callback_fn)user_supplied_bug16 }, |
141 | 6219 | #ifndef __sun | 6219 | #if !defined(__sun) && !defined(__OpenBSD__) |
142 | 6220 | /* | 6220 | /* |
143 | 6221 | ** It seems to be something weird with the character sets.. | 6221 | ** It seems to be something weird with the character sets.. |
144 | 6222 | ** value_fetch is unable to parse the value line (iscntrl "fails"), so I | 6222 | ** value_fetch is unable to parse the value line (iscntrl "fails"), so I |
145 | 6223 | 6223 | ||
146 | === modified file 'tests/server.c' | |||
147 | --- tests/server.c 2010-07-16 19:24:58 +0000 | |||
148 | +++ tests/server.c 2010-07-23 16:43:40 +0000 | |||
149 | @@ -73,12 +73,12 @@ | |||
150 | 73 | 73 | ||
151 | 74 | if (x == 0) | 74 | if (x == 0) |
152 | 75 | { | 75 | { |
154 | 76 | sprintf(buffer, "%s -d -P /tmp/%umemc.pid -t 1 -p %u -U %u -m 128", | 76 | sprintf(buffer, "%s -d -u root -P /tmp/%umemc.pid -t 1 -p %u -U %u -m 128", |
155 | 77 | MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE); | 77 | MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE); |
156 | 78 | } | 78 | } |
157 | 79 | else | 79 | else |
158 | 80 | { | 80 | { |
160 | 81 | sprintf(buffer, "%s -d -P /tmp/%umemc.pid -t 1 -p %u -U %u", | 81 | sprintf(buffer, "%s -d -u root -P /tmp/%umemc.pid -t 1 -p %u -U %u", |
161 | 82 | MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE); | 82 | MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE); |
162 | 83 | } | 83 | } |
163 | 84 | if (libmemcached_util_ping("localhost", (in_port_t)(x + TEST_PORT_BASE), NULL)) | 84 | if (libmemcached_util_ping("localhost", (in_port_t)(x + TEST_PORT_BASE), NULL)) |