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