jenkins-promote-staging-trunk-libmemcached-5
[awesomized/libmemcached] / tests / libmemcached-1.0 / all_tests.h
1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Libmemcached Client and Server
4 *
5 * Copyright (C) 2012 Data Differential, http://datadifferential.com/
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
22 * written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 */
37
38 #pragma once
39
40 #include <tests/libmemcached-1.0/memcached_get.h>
41
42
43 /* Clean the server before beginning testing */
44 test_st tests[] ={
45 {"util_version", true, (test_callback_fn*)util_version_test },
46 {"flush", false, (test_callback_fn*)flush_test },
47 {"init", false, (test_callback_fn*)init_test },
48 {"allocation", false, (test_callback_fn*)allocation_test },
49 {"server_list_null_test", false, (test_callback_fn*)server_list_null_test},
50 {"server_unsort", false, (test_callback_fn*)server_unsort_test},
51 {"server_sort", false, (test_callback_fn*)server_sort_test},
52 {"server_sort2", false, (test_callback_fn*)server_sort2_test},
53 {"memcached_server_remove", false, (test_callback_fn*)memcached_server_remove_test},
54 {"clone_test", false, (test_callback_fn*)clone_test },
55 {"connection_test", false, (test_callback_fn*)connection_test},
56 {"callback_test", false, (test_callback_fn*)callback_test},
57 {"userdata_test", false, (test_callback_fn*)userdata_test},
58 {"memcached_set()", false, (test_callback_fn*)set_test },
59 {"memcached_set() 2", false, (test_callback_fn*)set_test2 },
60 {"memcached_set() 3", false, (test_callback_fn*)set_test3 },
61 {"add", true, (test_callback_fn*)add_test },
62 {"memcached_fetch_result(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_fetch_result_NOT_FOUND },
63 {"replace", true, (test_callback_fn*)replace_test },
64 {"delete", true, (test_callback_fn*)delete_test },
65 {"memcached_get()", true, (test_callback_fn*)get_test },
66 {"get2", false, (test_callback_fn*)get_test2 },
67 {"get3", false, (test_callback_fn*)get_test3 },
68 {"get4", false, (test_callback_fn*)get_test4 },
69 {"partial mget", false, (test_callback_fn*)get_test5 },
70 {"stats_servername", false, (test_callback_fn*)stats_servername_test },
71 {"increment", false, (test_callback_fn*)increment_test },
72 {"increment_with_initial", true, (test_callback_fn*)increment_with_initial_test },
73 {"decrement", false, (test_callback_fn*)decrement_test },
74 {"decrement_with_initial", true, (test_callback_fn*)decrement_with_initial_test },
75 {"increment_by_key", false, (test_callback_fn*)increment_by_key_test },
76 {"increment_with_initial_by_key", true, (test_callback_fn*)increment_with_initial_by_key_test },
77 {"decrement_by_key", false, (test_callback_fn*)decrement_by_key_test },
78 {"decrement_with_initial_by_key", true, (test_callback_fn*)decrement_with_initial_by_key_test },
79 {"binary_increment_with_prefix", true, (test_callback_fn*)binary_increment_with_prefix_test },
80 {"quit", false, (test_callback_fn*)quit_test },
81 {"mget", true, (test_callback_fn*)mget_test },
82 {"mget_result", true, (test_callback_fn*)mget_result_test },
83 {"mget_result_alloc", true, (test_callback_fn*)mget_result_alloc_test },
84 {"mget_result_function", true, (test_callback_fn*)mget_result_function },
85 {"mget_execute", true, (test_callback_fn*)mget_execute },
86 {"mget_end", false, (test_callback_fn*)mget_end },
87 {"get_stats", false, (test_callback_fn*)get_stats },
88 {"add_host_test", false, (test_callback_fn*)add_host_test },
89 {"add_host_test_1", false, (test_callback_fn*)add_host_test1 },
90 {"get_stats_keys", false, (test_callback_fn*)get_stats_keys },
91 {"version_string_test", true, (test_callback_fn*)version_string_test},
92 {"memcached_mget() mixed memcached_get()", true, (test_callback_fn*)memcached_mget_mixed_memcached_get_TEST},
93 {"bad_key", true, (test_callback_fn*)bad_key_test },
94 {"memcached_server_cursor", true, (test_callback_fn*)memcached_server_cursor_test },
95 {"read_through", true, (test_callback_fn*)read_through },
96 {"delete_through", true, (test_callback_fn*)test_MEMCACHED_CALLBACK_DELETE_TRIGGER },
97 {"noreply", true, (test_callback_fn*)noreply_test},
98 {"analyzer", true, (test_callback_fn*)analyzer_test},
99 {"memcached_pool_st", true, (test_callback_fn*)connection_pool_test },
100 {"memcached_pool_st #2", true, (test_callback_fn*)connection_pool2_test },
101 #if 0
102 {"memcached_pool_st #3", true, (test_callback_fn*)connection_pool3_test },
103 #endif
104 {"memcached_pool_test", true, (test_callback_fn*)memcached_pool_test },
105 {"test_get_last_disconnect", true, (test_callback_fn*)test_get_last_disconnect},
106 {"verbosity", true, (test_callback_fn*)test_verbosity},
107 {"memcached_stat_execute", true, (test_callback_fn*)memcached_stat_execute_test},
108 {"memcached_exist(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_exist_NOTFOUND },
109 {"memcached_exist(MEMCACHED_SUCCESS)", true, (test_callback_fn*)memcached_exist_SUCCESS },
110 {"memcached_exist_by_key(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_exist_by_key_NOTFOUND },
111 {"memcached_exist_by_key(MEMCACHED_SUCCESS)", true, (test_callback_fn*)memcached_exist_by_key_SUCCESS },
112 {"memcached_touch", 0, (test_callback_fn*)test_memcached_touch},
113 {"memcached_touch_with_prefix", 0, (test_callback_fn*)test_memcached_touch_by_key},
114 #if 0
115 {"memcached_dump() no data", true, (test_callback_fn*)memcached_dump_TEST },
116 #endif
117 {"memcached_dump() with data", true, (test_callback_fn*)memcached_dump_TEST2 },
118 {0, 0, 0}
119 };
120
121 test_st touch_tests[] ={
122 {"memcached_touch", 0, (test_callback_fn*)test_memcached_touch},
123 {"memcached_touch_with_prefix", 0, (test_callback_fn*)test_memcached_touch_by_key},
124 {0, 0, 0}
125 };
126
127 test_st kill_TESTS[] ={
128 {"kill(HUP)", 0, (test_callback_fn*)kill_HUP_TEST},
129 {0, 0, 0}
130 };
131
132 test_st memcached_stat_tests[] ={
133 {"memcached_stat() INVALID ARG", 0, (test_callback_fn*)memcached_stat_TEST},
134 {"memcached_stat()", 0, (test_callback_fn*)memcached_stat_TEST2},
135 {0, 0, 0}
136 };
137
138 test_st behavior_tests[] ={
139 {"libmemcached_string_behavior()", false, (test_callback_fn*)libmemcached_string_behavior_test},
140 {"libmemcached_string_distribution()", false, (test_callback_fn*)libmemcached_string_distribution_test},
141 {"behavior_test", false, (test_callback_fn*)behavior_test},
142 {"MEMCACHED_BEHAVIOR_CORK", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_CORK_test},
143 {"MEMCACHED_BEHAVIOR_TCP_KEEPALIVE", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test},
144 {"MEMCACHED_BEHAVIOR_TCP_KEEPIDLE", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test},
145 {"MEMCACHED_BEHAVIOR_POLL_TIMEOUT", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_POLL_TIMEOUT_test},
146 {"MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY", false, (test_callback_fn*)test_MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY},
147 {0, 0, 0}
148 };
149
150 test_st libmemcachedutil_tests[] ={
151 {"libmemcached_util_ping()", true, (test_callback_fn*)ping_test },
152 {"libmemcached_util_getpid()", true, (test_callback_fn*)getpid_test },
153 {"libmemcached_util_getpid(MEMCACHED_CONNECTION_FAILURE)", true, (test_callback_fn*)getpid_connection_failure_test },
154 {0, 0, 0}
155 };
156
157 test_st basic_tests[] ={
158 {"init", true, (test_callback_fn*)basic_init_test},
159 {"clone", true, (test_callback_fn*)basic_clone_test},
160 {"reset", true, (test_callback_fn*)basic_reset_stack_test},
161 {"reset heap", true, (test_callback_fn*)basic_reset_heap_test},
162 {"reset stack clone", true, (test_callback_fn*)basic_reset_stack_clone_test},
163 {"reset heap clone", true, (test_callback_fn*)basic_reset_heap_clone_test},
164 {"memcached_return_t", false, (test_callback_fn*)memcached_return_t_TEST },
165 {0, 0, 0}
166 };
167
168 test_st regression_binary_vs_block[] ={
169 {"block add", true, (test_callback_fn*)block_add_regression},
170 {"binary add", true, (test_callback_fn*)binary_add_regression},
171 {0, 0, 0}
172 };
173
174 test_st async_tests[] ={
175 {"add", true, (test_callback_fn*)add_wrapper },
176 {0, 0, 0}
177 };
178
179 test_st memcached_server_get_last_disconnect_tests[] ={
180 {"memcached_server_get_last_disconnect()", false, (test_callback_fn*)test_multiple_get_last_disconnect},
181 {0, 0, (test_callback_fn*)0}
182 };
183
184
185 test_st result_tests[] ={
186 {"result static", false, (test_callback_fn*)result_static},
187 {"result alloc", false, (test_callback_fn*)result_alloc},
188 {0, 0, (test_callback_fn*)0}
189 };
190
191 test_st version_1_2_3[] ={
192 {"append", false, (test_callback_fn*)append_test },
193 {"prepend", false, (test_callback_fn*)prepend_test },
194 {"cas", false, (test_callback_fn*)cas_test },
195 {"cas2", false, (test_callback_fn*)cas2_test },
196 {"append_binary", false, (test_callback_fn*)append_binary_test },
197 {0, 0, (test_callback_fn*)0}
198 };
199
200 test_st haldenbrand_TESTS[] ={
201 {"memcached_set", false, (test_callback_fn*)haldenbrand_TEST1 },
202 {"memcached_get()", false, (test_callback_fn*)haldenbrand_TEST2 },
203 {"memcached_mget()", false, (test_callback_fn*)haldenbrand_TEST3 },
204 {0, 0, (test_callback_fn*)0}
205 };
206
207 test_st user_tests[] ={
208 {"user_supplied_bug4", true, (test_callback_fn*)user_supplied_bug4 },
209 {"user_supplied_bug5", true, (test_callback_fn*)user_supplied_bug5 },
210 {"user_supplied_bug6", true, (test_callback_fn*)user_supplied_bug6 },
211 {"user_supplied_bug7", true, (test_callback_fn*)user_supplied_bug7 },
212 {"user_supplied_bug8", true, (test_callback_fn*)user_supplied_bug8 },
213 {"user_supplied_bug9", true, (test_callback_fn*)user_supplied_bug9 },
214 {"user_supplied_bug10", true, (test_callback_fn*)user_supplied_bug10 },
215 {"user_supplied_bug11", true, (test_callback_fn*)user_supplied_bug11 },
216 {"user_supplied_bug12", true, (test_callback_fn*)user_supplied_bug12 },
217 {"user_supplied_bug13", true, (test_callback_fn*)user_supplied_bug13 },
218 {"user_supplied_bug14", true, (test_callback_fn*)user_supplied_bug14 },
219 {"user_supplied_bug15", true, (test_callback_fn*)user_supplied_bug15 },
220 {"user_supplied_bug16", true, (test_callback_fn*)user_supplied_bug16 },
221 #if !defined(__sun) && !defined(__OpenBSD__)
222 /*
223 ** It seems to be something weird with the character sets..
224 ** value_fetch is unable to parse the value line (iscntrl "fails"), so I
225 ** guess I need to find out how this is supposed to work.. Perhaps I need
226 ** to run the test in a specific locale (I tried zh_CN.UTF-8 without success,
227 ** so just disable the code for now...).
228 */
229 {"user_supplied_bug17", true, (test_callback_fn*)user_supplied_bug17 },
230 #endif
231 {"user_supplied_bug18", true, (test_callback_fn*)user_supplied_bug18 },
232 {"user_supplied_bug19", true, (test_callback_fn*)user_supplied_bug19 },
233 {"user_supplied_bug20", true, (test_callback_fn*)user_supplied_bug20 },
234 {"user_supplied_bug21", true, (test_callback_fn*)user_supplied_bug21 },
235 {"wrong_failure_counter_test", true, (test_callback_fn*)wrong_failure_counter_test},
236 {"wrong_failure_counter_two_test", true, (test_callback_fn*)wrong_failure_counter_two_test},
237 {0, 0, (test_callback_fn*)0}
238 };
239
240 test_st replication_tests[]= {
241 {"set", true, (test_callback_fn*)replication_set_test },
242 {"get", false, (test_callback_fn*)replication_get_test },
243 {"mget", false, (test_callback_fn*)replication_mget_test },
244 {"delete", true, (test_callback_fn*)replication_delete_test },
245 {"rand_mget", false, (test_callback_fn*)replication_randomize_mget_test },
246 {"miss", false, (test_callback_fn*)replication_miss_test },
247 {"fail", false, (test_callback_fn*)replication_randomize_mget_fail_test },
248 {0, 0, (test_callback_fn*)0}
249 };
250
251 /*
252 * The following test suite is used to verify that we don't introduce
253 * regression bugs. If you want more information about the bug / test,
254 * you should look in the bug report at
255 * http://bugs.launchpad.net/libmemcached
256 */
257 test_st regression_tests[]= {
258 {"lp:434484", true, (test_callback_fn*)regression_bug_434484 },
259 {"lp:434843", true, (test_callback_fn*)regression_bug_434843 },
260 {"lp:434843-buffered", true, (test_callback_fn*)regression_bug_434843_buffered },
261 {"lp:421108", true, (test_callback_fn*)regression_bug_421108 },
262 {"lp:442914", true, (test_callback_fn*)regression_bug_442914 },
263 {"lp:447342", true, (test_callback_fn*)regression_bug_447342 },
264 {"lp:463297", true, (test_callback_fn*)regression_bug_463297 },
265 {"lp:490486", true, (test_callback_fn*)regression_bug_490486 },
266 {"lp:583031", true, (test_callback_fn*)regression_bug_583031 },
267 {"lp:?", true, (test_callback_fn*)regression_bug_ },
268 {"lp:728286", true, (test_callback_fn*)regression_bug_728286 },
269 {"lp:581030", true, (test_callback_fn*)regression_bug_581030 },
270 {"lp:71231153 connect()", true, (test_callback_fn*)regression_bug_71231153_connect },
271 {"lp:71231153 poll()", true, (test_callback_fn*)regression_bug_71231153_poll },
272 {"lp:655423", true, (test_callback_fn*)regression_bug_655423 },
273 {"lp:490520", true, (test_callback_fn*)regression_bug_490520 },
274 {"lp:854604", true, (test_callback_fn*)regression_bug_854604 },
275 {0, false, (test_callback_fn*)0}
276 };
277
278 test_st ketama_compatibility[]= {
279 {"libmemcached", true, (test_callback_fn*)ketama_compatibility_libmemcached },
280 {"spymemcached", true, (test_callback_fn*)ketama_compatibility_spymemcached },
281 {0, 0, (test_callback_fn*)0}
282 };
283
284 test_st generate_tests[] ={
285 {"generate_pairs", true, (test_callback_fn*)generate_pairs },
286 {"generate_data", true, (test_callback_fn*)generate_data },
287 {"get_read", false, (test_callback_fn*)get_read },
288 {"delete_generate", false, (test_callback_fn*)delete_generate },
289 {"generate_buffer_data", true, (test_callback_fn*)generate_buffer_data },
290 {"delete_buffer", false, (test_callback_fn*)delete_buffer_generate},
291 {"generate_data", true, (test_callback_fn*)generate_data },
292 {"mget_read", false, (test_callback_fn*)mget_read },
293 {"mget_read_result", false, (test_callback_fn*)mget_read_result },
294 {"memcached_fetch_result() use internal result", false, (test_callback_fn*)mget_read_internal_result },
295 {"memcached_fetch_result() partial read", false, (test_callback_fn*)mget_read_partial_result },
296 {"mget_read_function", false, (test_callback_fn*)mget_read_function },
297 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
298 {"generate_large_pairs", true, (test_callback_fn*)generate_large_pairs },
299 {"generate_data", true, (test_callback_fn*)generate_data },
300 {"generate_buffer_data", true, (test_callback_fn*)generate_buffer_data },
301 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
302 {0, 0, (test_callback_fn*)0}
303 };
304
305 test_st consistent_tests[] ={
306 {"generate_pairs", true, (test_callback_fn*)generate_pairs },
307 {"generate_data", true, (test_callback_fn*)generate_data },
308 {"get_read", 0, (test_callback_fn*)get_read_count },
309 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
310 {0, 0, (test_callback_fn*)0}
311 };
312
313 test_st consistent_weighted_tests[] ={
314 {"generate_pairs", true, (test_callback_fn*)generate_pairs },
315 {"generate_data", true, (test_callback_fn*)generate_data_with_stats },
316 {"get_read", false, (test_callback_fn*)get_read_count },
317 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
318 {0, 0, (test_callback_fn*)0}
319 };
320
321 test_st hsieh_availability[] ={
322 {"hsieh_avaibility_test", false, (test_callback_fn*)hsieh_avaibility_test},
323 {0, 0, (test_callback_fn*)0}
324 };
325
326 test_st murmur_availability[] ={
327 {"murmur_avaibility_test", false, (test_callback_fn*)murmur_avaibility_test},
328 {0, 0, (test_callback_fn*)0}
329 };
330
331 #if 0
332 test_st hash_sanity[] ={
333 {"hash sanity", 0, (test_callback_fn*)hash_sanity_test},
334 {0, 0, (test_callback_fn*)0}
335 };
336 #endif
337
338 test_st ketama_auto_eject_hosts[] ={
339 {"auto_eject_hosts", true, (test_callback_fn*)auto_eject_hosts },
340 {"output_ketama_weighted_keys", true, (test_callback_fn*)output_ketama_weighted_keys },
341 {0, 0, (test_callback_fn*)0}
342 };
343
344 test_st hash_tests[] ={
345 {"one_at_a_time_run", false, (test_callback_fn*)one_at_a_time_run },
346 {"md5", false, (test_callback_fn*)md5_run },
347 {"crc", false, (test_callback_fn*)crc_run },
348 {"fnv1_64", false, (test_callback_fn*)fnv1_64_run },
349 {"fnv1a_64", false, (test_callback_fn*)fnv1a_64_run },
350 {"fnv1_32", false, (test_callback_fn*)fnv1_32_run },
351 {"fnv1a_32", false, (test_callback_fn*)fnv1a_32_run },
352 {"hsieh", false, (test_callback_fn*)hsieh_run },
353 {"murmur", false, (test_callback_fn*)murmur_run },
354 {"jenkis", false, (test_callback_fn*)jenkins_run },
355 {"memcached_get_hashkit", false, (test_callback_fn*)memcached_get_hashkit_test },
356 {0, 0, (test_callback_fn*)0}
357 };
358
359 test_st error_conditions[] ={
360 {"memcached_get(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_MEMCACHED_ERRNO },
361 {"memcached_get(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_MEMCACHED_NOTFOUND },
362 {"memcached_get_by_key(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_ERRNO },
363 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
364 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
365 {"memcached_increment(MEMCACHED_NO_SERVERS)", false, (test_callback_fn*)memcached_increment_MEMCACHED_NO_SERVERS },
366 {0, 0, (test_callback_fn*)0}
367 };
368
369 test_st parser_tests[] ={
370 {"behavior", false, (test_callback_fn*)behavior_parser_test },
371 {"boolean_options", false, (test_callback_fn*)parser_boolean_options_test },
372 {"configure_file", false, (test_callback_fn*)memcached_create_with_options_with_filename },
373 {"distribtions", false, (test_callback_fn*)parser_distribution_test },
374 {"hash", false, (test_callback_fn*)parser_hash_test },
375 {"libmemcached_check_configuration", false, (test_callback_fn*)libmemcached_check_configuration_test },
376 {"libmemcached_check_configuration_with_filename", false, (test_callback_fn*)libmemcached_check_configuration_with_filename_test },
377 {"number_options", false, (test_callback_fn*)parser_number_options_test },
378 {"randomly generated options", false, (test_callback_fn*)random_statement_build_test },
379 {"namespace", false, (test_callback_fn*)parser_key_prefix_test },
380 {"server", false, (test_callback_fn*)server_test },
381 {"bad server strings", false, (test_callback_fn*)servers_bad_test },
382 {"server with weights", false, (test_callback_fn*)server_with_weight_test },
383 {"parsing servername, port, and weight", false, (test_callback_fn*)test_hostname_port_weight },
384 {"--socket=", false, (test_callback_fn*)test_parse_socket },
385 {"--namespace=", false, (test_callback_fn*)test_namespace_keyword },
386 {0, 0, (test_callback_fn*)0}
387 };
388
389 test_st virtual_bucket_tests[] ={
390 {"basic", false, (test_callback_fn*)virtual_back_map },
391 {0, 0, (test_callback_fn*)0}
392 };
393
394 test_st memcached_server_add_tests[] ={
395 {"memcached_server_add(\"\")", false, (test_callback_fn*)memcached_server_add_empty_test },
396 {"memcached_server_add(NULL)", false, (test_callback_fn*)memcached_server_add_null_test },
397 {0, 0, (test_callback_fn*)0}
398 };
399
400 test_st pool_TESTS[] ={
401 {"lp:962815", true, (test_callback_fn*)regression_bug_962815 },
402 {0, 0, (test_callback_fn*)0}
403 };
404
405 test_st namespace_tests[] ={
406 {"basic tests", true, (test_callback_fn*)selection_of_namespace_tests },
407 {"increment", true, (test_callback_fn*)memcached_increment_namespace },
408 {0, 0, (test_callback_fn*)0}
409 };
410
411 collection_st collection[] ={
412 #if 0
413 {"hash_sanity", 0, 0, hash_sanity},
414 #endif
415 {"libmemcachedutil", 0, 0, libmemcachedutil_tests},
416 {"basic", 0, 0, basic_tests},
417 {"hsieh_availability", 0, 0, hsieh_availability},
418 {"murmur_availability", 0, 0, murmur_availability},
419 {"memcached_server_add", 0, 0, memcached_server_add_tests},
420 {"block", 0, 0, tests},
421 {"binary", (test_callback_fn*)pre_binary, 0, tests},
422 {"nonblock", (test_callback_fn*)pre_nonblock, 0, tests},
423 {"nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
424 {"settimer", (test_callback_fn*)pre_settimer, 0, tests},
425 {"md5", (test_callback_fn*)pre_md5, 0, tests},
426 {"crc", (test_callback_fn*)pre_crc, 0, tests},
427 {"hsieh", (test_callback_fn*)pre_hsieh, 0, tests},
428 {"jenkins", (test_callback_fn*)pre_jenkins, 0, tests},
429 {"fnv1_64", (test_callback_fn*)pre_hash_fnv1_64, 0, tests},
430 {"fnv1a_64", (test_callback_fn*)pre_hash_fnv1a_64, 0, tests},
431 {"fnv1_32", (test_callback_fn*)pre_hash_fnv1_32, 0, tests},
432 {"fnv1a_32", (test_callback_fn*)pre_hash_fnv1a_32, 0, tests},
433 {"ketama", (test_callback_fn*)pre_behavior_ketama, 0, tests},
434 {"ketama_auto_eject_hosts", (test_callback_fn*)pre_behavior_ketama, 0, ketama_auto_eject_hosts},
435 {"unix_socket", (test_callback_fn*)pre_unix_socket, 0, tests},
436 {"unix_socket_nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
437 {"gets", (test_callback_fn*)enable_cas, 0, tests},
438 {"consistent_crc", (test_callback_fn*)enable_consistent_crc, 0, tests},
439 {"consistent_hsieh", (test_callback_fn*)enable_consistent_hsieh, 0, tests},
440 #ifdef MEMCACHED_ENABLE_DEPRECATED
441 {"deprecated_memory_allocators", (test_callback_fn*)deprecated_set_memory_alloc, 0, tests},
442 #endif
443 {"memory_allocators", (test_callback_fn*)set_memory_alloc, 0, tests},
444 {"namespace", (test_callback_fn*)set_namespace, 0, tests},
445 {"namespace(BINARY)", (test_callback_fn*)set_namespace_and_binary, 0, tests},
446 {"specific namespace", 0, 0, namespace_tests},
447 {"specific namespace(BINARY)", (test_callback_fn*)pre_binary, 0, namespace_tests},
448 {"version_1_2_3", (test_callback_fn*)check_for_1_2_3, 0, version_1_2_3},
449 {"result", 0, 0, result_tests},
450 {"async", (test_callback_fn*)pre_nonblock, 0, async_tests},
451 {"async(BINARY)", (test_callback_fn*)pre_nonblock_binary, 0, async_tests},
452 {"Cal Haldenbrand's tests", 0, 0, haldenbrand_TESTS},
453 {"user written tests", 0, 0, user_tests},
454 {"generate", 0, 0, generate_tests},
455 {"generate_hsieh", (test_callback_fn*)pre_hsieh, 0, generate_tests},
456 {"generate_ketama", (test_callback_fn*)pre_behavior_ketama, 0, generate_tests},
457 {"generate_hsieh_consistent", (test_callback_fn*)enable_consistent_hsieh, 0, generate_tests},
458 {"generate_md5", (test_callback_fn*)pre_md5, 0, generate_tests},
459 {"generate_murmur", (test_callback_fn*)pre_murmur, 0, generate_tests},
460 {"generate_jenkins", (test_callback_fn*)pre_jenkins, 0, generate_tests},
461 {"generate_nonblock", (test_callback_fn*)pre_nonblock, 0, generate_tests},
462 // Too slow
463 {"generate_corked", (test_callback_fn*)pre_cork, 0, generate_tests},
464 {"generate_corked_and_nonblock", (test_callback_fn*)pre_cork_and_nonblock, 0, generate_tests},
465 {"consistent_not", 0, 0, consistent_tests},
466 {"consistent_ketama", (test_callback_fn*)pre_behavior_ketama, 0, consistent_tests},
467 {"consistent_ketama_weighted", (test_callback_fn*)pre_behavior_ketama_weighted, 0, consistent_weighted_tests},
468 {"ketama_compat", 0, 0, ketama_compatibility},
469 {"test_hashes", 0, 0, hash_tests},
470 {"replication", (test_callback_fn*)pre_replication, 0, replication_tests},
471 {"replication_noblock", (test_callback_fn*)pre_replication_noblock, 0, replication_tests},
472 {"regression", 0, 0, regression_tests},
473 {"behaviors", 0, 0, behavior_tests},
474 {"regression_binary_vs_block", (test_callback_fn*)key_setup, (test_callback_fn*)key_teardown, regression_binary_vs_block},
475 {"error_conditions", 0, 0, error_conditions},
476 {"parser", 0, 0, parser_tests},
477 {"virtual buckets", 0, 0, virtual_bucket_tests},
478 {"memcached_server_get_last_disconnect", 0, 0, memcached_server_get_last_disconnect_tests},
479 {"touch", 0, 0, touch_tests},
480 {"touch", (test_callback_fn*)pre_binary, 0, touch_tests},
481 {"memcached_stat()", 0, 0, memcached_stat_tests},
482 {"memcached_pool_create()", 0, 0, pool_TESTS},
483 {"kill()", 0, 0, kill_TESTS},
484 {0, 0, 0, 0}
485 };