Break up more generate.
[m6w6/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_data", true, (test_callback_fn*)generate_data },
286 {"get_read", false, (test_callback_fn*)get_read },
287 {"delete_generate", false, (test_callback_fn*)delete_generate },
288 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
289 {0, 0, (test_callback_fn*)0}
290 };
291 // New start
292 test_st generate_mget_TESTS[] ={
293 {"generate_data", true, (test_callback_fn*)generate_data },
294 {"mget_read", false, (test_callback_fn*)mget_read },
295 {"mget_read_result", false, (test_callback_fn*)mget_read_result },
296 {"memcached_fetch_result() use internal result", false, (test_callback_fn*)mget_read_internal_result },
297 {"memcached_fetch_result() partial read", false, (test_callback_fn*)mget_read_partial_result },
298 {"mget_read_function", false, (test_callback_fn*)mget_read_function },
299 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
300 {0, 0, (test_callback_fn*)0}
301 };
302
303 test_st generate_large_TESTS[] ={
304 {"generate_large_pairs", true, (test_callback_fn*)generate_large_pairs },
305 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
306 {0, 0, (test_callback_fn*)0}
307 };
308
309 test_st consistent_tests[] ={
310 {"generate_data", true, (test_callback_fn*)generate_data },
311 {"get_read", 0, (test_callback_fn*)get_read_count },
312 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
313 {0, 0, (test_callback_fn*)0}
314 };
315
316 test_st consistent_weighted_tests[] ={
317 {"generate_data", true, (test_callback_fn*)generate_data_with_stats },
318 {"get_read", false, (test_callback_fn*)get_read_count },
319 {"cleanup", true, (test_callback_fn*)cleanup_pairs },
320 {0, 0, (test_callback_fn*)0}
321 };
322
323 test_st hsieh_availability[] ={
324 {"hsieh_avaibility_test", false, (test_callback_fn*)hsieh_avaibility_test},
325 {0, 0, (test_callback_fn*)0}
326 };
327
328 test_st murmur_availability[] ={
329 {"murmur_avaibility_test", false, (test_callback_fn*)murmur_avaibility_test},
330 {0, 0, (test_callback_fn*)0}
331 };
332
333 #if 0
334 test_st hash_sanity[] ={
335 {"hash sanity", 0, (test_callback_fn*)hash_sanity_test},
336 {0, 0, (test_callback_fn*)0}
337 };
338 #endif
339
340 test_st ketama_auto_eject_hosts[] ={
341 {"auto_eject_hosts", true, (test_callback_fn*)auto_eject_hosts },
342 {"output_ketama_weighted_keys", true, (test_callback_fn*)output_ketama_weighted_keys },
343 {0, 0, (test_callback_fn*)0}
344 };
345
346 test_st hash_tests[] ={
347 {"one_at_a_time_run", false, (test_callback_fn*)one_at_a_time_run },
348 {"md5", false, (test_callback_fn*)md5_run },
349 {"crc", false, (test_callback_fn*)crc_run },
350 {"fnv1_64", false, (test_callback_fn*)fnv1_64_run },
351 {"fnv1a_64", false, (test_callback_fn*)fnv1a_64_run },
352 {"fnv1_32", false, (test_callback_fn*)fnv1_32_run },
353 {"fnv1a_32", false, (test_callback_fn*)fnv1a_32_run },
354 {"hsieh", false, (test_callback_fn*)hsieh_run },
355 {"murmur", false, (test_callback_fn*)murmur_run },
356 {"jenkis", false, (test_callback_fn*)jenkins_run },
357 {"memcached_get_hashkit", false, (test_callback_fn*)memcached_get_hashkit_test },
358 {0, 0, (test_callback_fn*)0}
359 };
360
361 test_st error_conditions[] ={
362 {"memcached_get(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_MEMCACHED_ERRNO },
363 {"memcached_get(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_MEMCACHED_NOTFOUND },
364 {"memcached_get_by_key(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_ERRNO },
365 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
366 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
367 {"memcached_increment(MEMCACHED_NO_SERVERS)", false, (test_callback_fn*)memcached_increment_MEMCACHED_NO_SERVERS },
368 {0, 0, (test_callback_fn*)0}
369 };
370
371 test_st parser_tests[] ={
372 {"behavior", false, (test_callback_fn*)behavior_parser_test },
373 {"boolean_options", false, (test_callback_fn*)parser_boolean_options_test },
374 {"configure_file", false, (test_callback_fn*)memcached_create_with_options_with_filename },
375 {"distribtions", false, (test_callback_fn*)parser_distribution_test },
376 {"hash", false, (test_callback_fn*)parser_hash_test },
377 {"libmemcached_check_configuration", false, (test_callback_fn*)libmemcached_check_configuration_test },
378 {"libmemcached_check_configuration_with_filename", false, (test_callback_fn*)libmemcached_check_configuration_with_filename_test },
379 {"number_options", false, (test_callback_fn*)parser_number_options_test },
380 {"randomly generated options", false, (test_callback_fn*)random_statement_build_test },
381 {"namespace", false, (test_callback_fn*)parser_key_prefix_test },
382 {"server", false, (test_callback_fn*)server_test },
383 {"bad server strings", false, (test_callback_fn*)servers_bad_test },
384 {"server with weights", false, (test_callback_fn*)server_with_weight_test },
385 {"parsing servername, port, and weight", false, (test_callback_fn*)test_hostname_port_weight },
386 {"--socket=", false, (test_callback_fn*)test_parse_socket },
387 {"--namespace=", false, (test_callback_fn*)test_namespace_keyword },
388 {0, 0, (test_callback_fn*)0}
389 };
390
391 test_st virtual_bucket_tests[] ={
392 {"basic", false, (test_callback_fn*)virtual_back_map },
393 {0, 0, (test_callback_fn*)0}
394 };
395
396 test_st memcached_server_add_tests[] ={
397 {"memcached_server_add(\"\")", false, (test_callback_fn*)memcached_server_add_empty_test },
398 {"memcached_server_add(NULL)", false, (test_callback_fn*)memcached_server_add_null_test },
399 {0, 0, (test_callback_fn*)0}
400 };
401
402 test_st pool_TESTS[] ={
403 {"lp:962815", true, (test_callback_fn*)regression_bug_962815 },
404 {0, 0, (test_callback_fn*)0}
405 };
406
407 test_st memcached_set_encoding_key_TESTS[] ={
408 {"memcached_set_encoding_key()", true, (test_callback_fn*)memcached_set_encoding_key_TEST },
409 {"memcached_set_encoding_key() +set() + get()", true, (test_callback_fn*)memcached_set_encoding_key_set_get_TEST },
410 {"memcached_set_encoding_key() +add() + get()", true, (test_callback_fn*)memcached_set_encoding_key_add_get_TEST },
411 {"memcached_set_encoding_key() +replace() + get()", true, (test_callback_fn*)memcached_set_encoding_key_replace_get_TEST },
412 {"memcached_set_encoding_key() +prepend()", true, (test_callback_fn*)memcached_set_encoding_key_prepend_TEST },
413 {"memcached_set_encoding_key() +append()", true, (test_callback_fn*)memcached_set_encoding_key_append_TEST },
414 {"memcached_set_encoding_key() +increment()", true, (test_callback_fn*)memcached_set_encoding_key_increment_TEST },
415 {"memcached_set_encoding_key() +decrement()", true, (test_callback_fn*)memcached_set_encoding_key_increment_TEST },
416 {"memcached_set_encoding_key() +increment_with_initial()", true, (test_callback_fn*)memcached_set_encoding_key_increment_with_initial_TEST },
417 {"memcached_set_encoding_key() +decrement_with_initial()", true, (test_callback_fn*)memcached_set_encoding_key_decrement_with_initial_TEST },
418 {"memcached_set_encoding_key() +set() +get() +cloen()", true, (test_callback_fn*)memcached_set_encoding_key_set_get_clone_TEST },
419 {"memcached_set_encoding_key() +set() +get() increase value size", true, (test_callback_fn*)memcached_set_encoding_key_set_grow_key_TEST },
420 {0, 0, (test_callback_fn*)0}
421 };
422
423 test_st namespace_tests[] ={
424 {"basic tests", true, (test_callback_fn*)selection_of_namespace_tests },
425 {"increment", true, (test_callback_fn*)memcached_increment_namespace },
426 {0, 0, (test_callback_fn*)0}
427 };
428
429 collection_st collection[] ={
430 #if 0
431 {"hash_sanity", 0, 0, hash_sanity},
432 #endif
433 {"libmemcachedutil", 0, 0, libmemcachedutil_tests},
434 {"basic", 0, 0, basic_tests},
435 {"hsieh_availability", 0, 0, hsieh_availability},
436 {"murmur_availability", 0, 0, murmur_availability},
437 {"memcached_server_add", 0, 0, memcached_server_add_tests},
438 {"block", 0, 0, tests},
439 {"binary", (test_callback_fn*)pre_binary, 0, tests},
440 {"nonblock", (test_callback_fn*)pre_nonblock, 0, tests},
441 {"nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
442 {"settimer", (test_callback_fn*)pre_settimer, 0, tests},
443 {"md5", (test_callback_fn*)pre_md5, 0, tests},
444 {"crc", (test_callback_fn*)pre_crc, 0, tests},
445 {"hsieh", (test_callback_fn*)pre_hsieh, 0, tests},
446 {"jenkins", (test_callback_fn*)pre_jenkins, 0, tests},
447 {"fnv1_64", (test_callback_fn*)pre_hash_fnv1_64, 0, tests},
448 {"fnv1a_64", (test_callback_fn*)pre_hash_fnv1a_64, 0, tests},
449 {"fnv1_32", (test_callback_fn*)pre_hash_fnv1_32, 0, tests},
450 {"fnv1a_32", (test_callback_fn*)pre_hash_fnv1a_32, 0, tests},
451 {"ketama", (test_callback_fn*)pre_behavior_ketama, 0, tests},
452 {"ketama_auto_eject_hosts", (test_callback_fn*)pre_behavior_ketama, 0, ketama_auto_eject_hosts},
453 {"unix_socket", (test_callback_fn*)pre_unix_socket, 0, tests},
454 {"unix_socket_nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
455 {"gets", (test_callback_fn*)enable_cas, 0, tests},
456 {"consistent_crc", (test_callback_fn*)enable_consistent_crc, 0, tests},
457 {"consistent_hsieh", (test_callback_fn*)enable_consistent_hsieh, 0, tests},
458 #ifdef MEMCACHED_ENABLE_DEPRECATED
459 {"deprecated_memory_allocators", (test_callback_fn*)deprecated_set_memory_alloc, 0, tests},
460 #endif
461 {"memory_allocators", (test_callback_fn*)set_memory_alloc, 0, tests},
462 {"namespace", (test_callback_fn*)set_namespace, 0, tests},
463 {"namespace(BINARY)", (test_callback_fn*)set_namespace_and_binary, 0, tests},
464 {"specific namespace", 0, 0, namespace_tests},
465 {"specific namespace(BINARY)", (test_callback_fn*)pre_binary, 0, namespace_tests},
466 {"version_1_2_3", (test_callback_fn*)check_for_1_2_3, 0, version_1_2_3},
467 {"result", 0, 0, result_tests},
468 {"async", (test_callback_fn*)pre_nonblock, 0, async_tests},
469 {"async(BINARY)", (test_callback_fn*)pre_nonblock_binary, 0, async_tests},
470 {"Cal Haldenbrand's tests", 0, 0, haldenbrand_TESTS},
471 {"user written tests", 0, 0, user_tests},
472 {"generate", 0, 0, generate_tests},
473 {"generate MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", (test_callback_fn*)pre_buffer, 0, generate_tests},
474 {"mget generate MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", (test_callback_fn*)pre_buffer, 0, generate_mget_TESTS},
475 {"generate large", 0, 0, generate_large_TESTS},
476 {"generate_hsieh", (test_callback_fn*)pre_hsieh, 0, generate_tests},
477 {"generate_ketama", (test_callback_fn*)pre_behavior_ketama, 0, generate_tests},
478 {"generate_hsieh_consistent", (test_callback_fn*)enable_consistent_hsieh, 0, generate_tests},
479 {"generate_md5", (test_callback_fn*)pre_md5, 0, generate_tests},
480 {"generate_murmur", (test_callback_fn*)pre_murmur, 0, generate_tests},
481 {"generate_jenkins", (test_callback_fn*)pre_jenkins, 0, generate_tests},
482 {"generate_nonblock", (test_callback_fn*)pre_nonblock, 0, generate_tests},
483 {"mget generate_nonblock", (test_callback_fn*)pre_nonblock, 0, generate_mget_TESTS},
484 {"consistent_not", 0, 0, consistent_tests},
485 {"consistent_ketama", (test_callback_fn*)pre_behavior_ketama, 0, consistent_tests},
486 {"consistent_ketama_weighted", (test_callback_fn*)pre_behavior_ketama_weighted, 0, consistent_weighted_tests},
487 {"ketama_compat", 0, 0, ketama_compatibility},
488 {"test_hashes", 0, 0, hash_tests},
489 {"replication", (test_callback_fn*)pre_replication, 0, replication_tests},
490 {"replication_noblock", (test_callback_fn*)pre_replication_noblock, 0, replication_tests},
491 {"regression", 0, 0, regression_tests},
492 {"behaviors", 0, 0, behavior_tests},
493 {"regression_binary_vs_block", (test_callback_fn*)key_setup, (test_callback_fn*)key_teardown, regression_binary_vs_block},
494 {"error_conditions", 0, 0, error_conditions},
495 {"parser", 0, 0, parser_tests},
496 {"virtual buckets", 0, 0, virtual_bucket_tests},
497 {"memcached_server_get_last_disconnect", 0, 0, memcached_server_get_last_disconnect_tests},
498 {"touch", 0, 0, touch_tests},
499 {"touch", (test_callback_fn*)pre_binary, 0, touch_tests},
500 {"memcached_stat()", 0, 0, memcached_stat_tests},
501 {"memcached_pool_create()", 0, 0, pool_TESTS},
502 {"memcached_set_encoding_key()", 0, 0, memcached_set_encoding_key_TESTS},
503 {"kill()", 0, 0, kill_TESTS},
504 {0, 0, 0, 0}
505 };