1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 * Libmemcached Client and Server
5 * Copyright (C) 2012 Data Differential, http://datadifferential.com/
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
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
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
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.
41 /* Clean the server before beginning testing */
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
},
100 {"memcached_pool_st #3", true, (test_callback_fn
*)connection_pool3_test
},
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
},
113 {"memcached_dump() no data", true, (test_callback_fn
*)memcached_dump_TEST
},
115 {"memcached_dump() with data", true, (test_callback_fn
*)memcached_dump_TEST2
},
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
},
125 test_st kill_TESTS
[] ={
126 {"kill(HUP)", 0, (test_callback_fn
*)kill_HUP_TEST
},
130 test_st memcached_stat_tests
[] ={
131 {"memcached_stat() INVALID ARG", 0, (test_callback_fn
*)memcached_stat_TEST
},
132 {"memcached_stat()", 0, (test_callback_fn
*)memcached_stat_TEST2
},
136 test_st behavior_tests
[] ={
137 {"libmemcached_string_behavior()", false, (test_callback_fn
*)libmemcached_string_behavior_test
},
138 {"libmemcached_string_distribution()", false, (test_callback_fn
*)libmemcached_string_distribution_test
},
139 {"behavior_test", false, (test_callback_fn
*)behavior_test
},
140 {"MEMCACHED_BEHAVIOR_CORK", false, (test_callback_fn
*)MEMCACHED_BEHAVIOR_CORK_test
},
141 {"MEMCACHED_BEHAVIOR_TCP_KEEPALIVE", false, (test_callback_fn
*)MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test
},
142 {"MEMCACHED_BEHAVIOR_TCP_KEEPIDLE", false, (test_callback_fn
*)MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test
},
143 {"MEMCACHED_BEHAVIOR_POLL_TIMEOUT", false, (test_callback_fn
*)MEMCACHED_BEHAVIOR_POLL_TIMEOUT_test
},
144 {"MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY", false, (test_callback_fn
*)test_MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY
},
148 test_st libmemcachedutil_tests
[] ={
149 {"libmemcached_util_ping()", true, (test_callback_fn
*)ping_test
},
150 {"libmemcached_util_getpid()", true, (test_callback_fn
*)getpid_test
},
151 {"libmemcached_util_getpid(MEMCACHED_CONNECTION_FAILURE)", true, (test_callback_fn
*)getpid_connection_failure_test
},
155 test_st basic_tests
[] ={
156 {"init", true, (test_callback_fn
*)basic_init_test
},
157 {"clone", true, (test_callback_fn
*)basic_clone_test
},
158 {"reset", true, (test_callback_fn
*)basic_reset_stack_test
},
159 {"reset heap", true, (test_callback_fn
*)basic_reset_heap_test
},
160 {"reset stack clone", true, (test_callback_fn
*)basic_reset_stack_clone_test
},
161 {"reset heap clone", true, (test_callback_fn
*)basic_reset_heap_clone_test
},
162 {"memcached_return_t", false, (test_callback_fn
*)memcached_return_t_TEST
},
166 test_st regression_binary_vs_block
[] ={
167 {"block add", true, (test_callback_fn
*)block_add_regression
},
168 {"binary add", true, (test_callback_fn
*)binary_add_regression
},
172 test_st async_tests
[] ={
173 {"add", true, (test_callback_fn
*)add_wrapper
},
177 test_st memcached_server_get_last_disconnect_tests
[] ={
178 {"memcached_server_get_last_disconnect()", false, (test_callback_fn
*)test_multiple_get_last_disconnect
},
179 {0, 0, (test_callback_fn
*)0}
183 test_st result_tests
[] ={
184 {"result static", false, (test_callback_fn
*)result_static
},
185 {"result alloc", false, (test_callback_fn
*)result_alloc
},
186 {0, 0, (test_callback_fn
*)0}
189 test_st version_1_2_3
[] ={
190 {"append", false, (test_callback_fn
*)append_test
},
191 {"prepend", false, (test_callback_fn
*)prepend_test
},
192 {"cas", false, (test_callback_fn
*)cas_test
},
193 {"cas2", false, (test_callback_fn
*)cas2_test
},
194 {"append_binary", false, (test_callback_fn
*)append_binary_test
},
195 {0, 0, (test_callback_fn
*)0}
198 test_st haldenbrand_TESTS
[] ={
199 {"memcached_set", false, (test_callback_fn
*)haldenbrand_TEST1
},
200 {"memcached_get()", false, (test_callback_fn
*)haldenbrand_TEST2
},
201 {"memcached_mget()", false, (test_callback_fn
*)haldenbrand_TEST3
},
202 {0, 0, (test_callback_fn
*)0}
205 test_st user_tests
[] ={
206 {"user_supplied_bug4", true, (test_callback_fn
*)user_supplied_bug4
},
207 {"user_supplied_bug5", true, (test_callback_fn
*)user_supplied_bug5
},
208 {"user_supplied_bug6", true, (test_callback_fn
*)user_supplied_bug6
},
209 {"user_supplied_bug7", true, (test_callback_fn
*)user_supplied_bug7
},
210 {"user_supplied_bug8", true, (test_callback_fn
*)user_supplied_bug8
},
211 {"user_supplied_bug9", true, (test_callback_fn
*)user_supplied_bug9
},
212 {"user_supplied_bug10", true, (test_callback_fn
*)user_supplied_bug10
},
213 {"user_supplied_bug11", true, (test_callback_fn
*)user_supplied_bug11
},
214 {"user_supplied_bug12", true, (test_callback_fn
*)user_supplied_bug12
},
215 {"user_supplied_bug13", true, (test_callback_fn
*)user_supplied_bug13
},
216 {"user_supplied_bug14", true, (test_callback_fn
*)user_supplied_bug14
},
217 {"user_supplied_bug15", true, (test_callback_fn
*)user_supplied_bug15
},
218 {"user_supplied_bug16", true, (test_callback_fn
*)user_supplied_bug16
},
219 #if !defined(__sun) && !defined(__OpenBSD__)
221 ** It seems to be something weird with the character sets..
222 ** value_fetch is unable to parse the value line (iscntrl "fails"), so I
223 ** guess I need to find out how this is supposed to work.. Perhaps I need
224 ** to run the test in a specific locale (I tried zh_CN.UTF-8 without success,
225 ** so just disable the code for now...).
227 {"user_supplied_bug17", true, (test_callback_fn
*)user_supplied_bug17
},
229 {"user_supplied_bug18", true, (test_callback_fn
*)user_supplied_bug18
},
230 {"user_supplied_bug19", true, (test_callback_fn
*)user_supplied_bug19
},
231 {"user_supplied_bug20", true, (test_callback_fn
*)user_supplied_bug20
},
232 {"user_supplied_bug21", true, (test_callback_fn
*)user_supplied_bug21
},
233 {"wrong_failure_counter_test", true, (test_callback_fn
*)wrong_failure_counter_test
},
234 {"wrong_failure_counter_two_test", true, (test_callback_fn
*)wrong_failure_counter_two_test
},
235 {0, 0, (test_callback_fn
*)0}
238 test_st replication_tests
[]= {
239 {"set", true, (test_callback_fn
*)replication_set_test
},
240 {"get", false, (test_callback_fn
*)replication_get_test
},
241 {"mget", false, (test_callback_fn
*)replication_mget_test
},
242 {"delete", true, (test_callback_fn
*)replication_delete_test
},
243 {"rand_mget", false, (test_callback_fn
*)replication_randomize_mget_test
},
244 {"miss", false, (test_callback_fn
*)replication_miss_test
},
245 {"fail", false, (test_callback_fn
*)replication_randomize_mget_fail_test
},
246 {0, 0, (test_callback_fn
*)0}
250 * The following test suite is used to verify that we don't introduce
251 * regression bugs. If you want more information about the bug / test,
252 * you should look in the bug report at
253 * http://bugs.launchpad.net/libmemcached
255 test_st regression_tests
[]= {
256 {"lp:434484", true, (test_callback_fn
*)regression_bug_434484
},
257 {"lp:434843", true, (test_callback_fn
*)regression_bug_434843
},
258 {"lp:434843-buffered", true, (test_callback_fn
*)regression_bug_434843_buffered
},
259 {"lp:421108", true, (test_callback_fn
*)regression_bug_421108
},
260 {"lp:442914", true, (test_callback_fn
*)regression_bug_442914
},
261 {"lp:447342", true, (test_callback_fn
*)regression_bug_447342
},
262 {"lp:463297", true, (test_callback_fn
*)regression_bug_463297
},
263 {"lp:490486", true, (test_callback_fn
*)regression_bug_490486
},
264 {"lp:583031", true, (test_callback_fn
*)regression_bug_583031
},
265 {"lp:?", true, (test_callback_fn
*)regression_bug_
},
266 {"lp:728286", true, (test_callback_fn
*)regression_bug_728286
},
267 {"lp:581030", true, (test_callback_fn
*)regression_bug_581030
},
268 {"lp:71231153 connect()", true, (test_callback_fn
*)regression_bug_71231153_connect
},
269 {"lp:71231153 poll()", true, (test_callback_fn
*)regression_bug_71231153_poll
},
270 {"lp:655423", true, (test_callback_fn
*)regression_bug_655423
},
271 {"lp:490520", true, (test_callback_fn
*)regression_bug_490520
},
272 {"lp:854604", true, (test_callback_fn
*)regression_bug_854604
},
273 {0, false, (test_callback_fn
*)0}
276 test_st ketama_compatibility
[]= {
277 {"libmemcached", true, (test_callback_fn
*)ketama_compatibility_libmemcached
},
278 {"spymemcached", true, (test_callback_fn
*)ketama_compatibility_spymemcached
},
279 {0, 0, (test_callback_fn
*)0}
282 test_st generate_tests
[] ={
283 {"generate_pairs", true, (test_callback_fn
*)generate_pairs
},
284 {"generate_data", true, (test_callback_fn
*)generate_data
},
285 {"get_read", false, (test_callback_fn
*)get_read
},
286 {"delete_generate", false, (test_callback_fn
*)delete_generate
},
287 {"generate_buffer_data", true, (test_callback_fn
*)generate_buffer_data
},
288 {"delete_buffer", false, (test_callback_fn
*)delete_buffer_generate
},
289 {"generate_data", true, (test_callback_fn
*)generate_data
},
290 {"mget_read", false, (test_callback_fn
*)mget_read
},
291 {"mget_read_result", false, (test_callback_fn
*)mget_read_result
},
292 {"memcached_fetch_result() use internal result", false, (test_callback_fn
*)mget_read_internal_result
},
293 {"memcached_fetch_result() partial read", false, (test_callback_fn
*)mget_read_partial_result
},
294 {"mget_read_function", false, (test_callback_fn
*)mget_read_function
},
295 {"cleanup", true, (test_callback_fn
*)cleanup_pairs
},
296 {"generate_large_pairs", true, (test_callback_fn
*)generate_large_pairs
},
297 {"generate_data", true, (test_callback_fn
*)generate_data
},
298 {"generate_buffer_data", true, (test_callback_fn
*)generate_buffer_data
},
299 {"cleanup", true, (test_callback_fn
*)cleanup_pairs
},
300 {0, 0, (test_callback_fn
*)0}
303 test_st consistent_tests
[] ={
304 {"generate_pairs", true, (test_callback_fn
*)generate_pairs
},
305 {"generate_data", true, (test_callback_fn
*)generate_data
},
306 {"get_read", 0, (test_callback_fn
*)get_read_count
},
307 {"cleanup", true, (test_callback_fn
*)cleanup_pairs
},
308 {0, 0, (test_callback_fn
*)0}
311 test_st consistent_weighted_tests
[] ={
312 {"generate_pairs", true, (test_callback_fn
*)generate_pairs
},
313 {"generate_data", true, (test_callback_fn
*)generate_data_with_stats
},
314 {"get_read", false, (test_callback_fn
*)get_read_count
},
315 {"cleanup", true, (test_callback_fn
*)cleanup_pairs
},
316 {0, 0, (test_callback_fn
*)0}
319 test_st hsieh_availability
[] ={
320 {"hsieh_avaibility_test", false, (test_callback_fn
*)hsieh_avaibility_test
},
321 {0, 0, (test_callback_fn
*)0}
324 test_st murmur_availability
[] ={
325 {"murmur_avaibility_test", false, (test_callback_fn
*)murmur_avaibility_test
},
326 {0, 0, (test_callback_fn
*)0}
330 test_st hash_sanity
[] ={
331 {"hash sanity", 0, (test_callback_fn
*)hash_sanity_test
},
332 {0, 0, (test_callback_fn
*)0}
336 test_st ketama_auto_eject_hosts
[] ={
337 {"auto_eject_hosts", true, (test_callback_fn
*)auto_eject_hosts
},
338 {"output_ketama_weighted_keys", true, (test_callback_fn
*)output_ketama_weighted_keys
},
339 {0, 0, (test_callback_fn
*)0}
342 test_st hash_tests
[] ={
343 {"one_at_a_time_run", false, (test_callback_fn
*)one_at_a_time_run
},
344 {"md5", false, (test_callback_fn
*)md5_run
},
345 {"crc", false, (test_callback_fn
*)crc_run
},
346 {"fnv1_64", false, (test_callback_fn
*)fnv1_64_run
},
347 {"fnv1a_64", false, (test_callback_fn
*)fnv1a_64_run
},
348 {"fnv1_32", false, (test_callback_fn
*)fnv1_32_run
},
349 {"fnv1a_32", false, (test_callback_fn
*)fnv1a_32_run
},
350 {"hsieh", false, (test_callback_fn
*)hsieh_run
},
351 {"murmur", false, (test_callback_fn
*)murmur_run
},
352 {"jenkis", false, (test_callback_fn
*)jenkins_run
},
353 {"memcached_get_hashkit", false, (test_callback_fn
*)memcached_get_hashkit_test
},
354 {0, 0, (test_callback_fn
*)0}
357 test_st error_conditions
[] ={
358 {"memcached_get(MEMCACHED_ERRNO)", false, (test_callback_fn
*)memcached_get_MEMCACHED_ERRNO
},
359 {"memcached_get(MEMCACHED_NOTFOUND)", false, (test_callback_fn
*)memcached_get_MEMCACHED_NOTFOUND
},
360 {"memcached_get_by_key(MEMCACHED_ERRNO)", false, (test_callback_fn
*)memcached_get_by_key_MEMCACHED_ERRNO
},
361 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn
*)memcached_get_by_key_MEMCACHED_NOTFOUND
},
362 {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn
*)memcached_get_by_key_MEMCACHED_NOTFOUND
},
363 {"memcached_increment(MEMCACHED_NO_SERVERS)", false, (test_callback_fn
*)memcached_increment_MEMCACHED_NO_SERVERS
},
364 {0, 0, (test_callback_fn
*)0}
367 test_st parser_tests
[] ={
368 {"behavior", false, (test_callback_fn
*)behavior_parser_test
},
369 {"boolean_options", false, (test_callback_fn
*)parser_boolean_options_test
},
370 {"configure_file", false, (test_callback_fn
*)memcached_create_with_options_with_filename
},
371 {"distribtions", false, (test_callback_fn
*)parser_distribution_test
},
372 {"hash", false, (test_callback_fn
*)parser_hash_test
},
373 {"libmemcached_check_configuration", false, (test_callback_fn
*)libmemcached_check_configuration_test
},
374 {"libmemcached_check_configuration_with_filename", false, (test_callback_fn
*)libmemcached_check_configuration_with_filename_test
},
375 {"number_options", false, (test_callback_fn
*)parser_number_options_test
},
376 {"randomly generated options", false, (test_callback_fn
*)random_statement_build_test
},
377 {"namespace", false, (test_callback_fn
*)parser_key_prefix_test
},
378 {"server", false, (test_callback_fn
*)server_test
},
379 {"bad server strings", false, (test_callback_fn
*)servers_bad_test
},
380 {"server with weights", false, (test_callback_fn
*)server_with_weight_test
},
381 {"parsing servername, port, and weight", false, (test_callback_fn
*)test_hostname_port_weight
},
382 {"--socket=", false, (test_callback_fn
*)test_parse_socket
},
383 {"--namespace=", false, (test_callback_fn
*)test_namespace_keyword
},
384 {0, 0, (test_callback_fn
*)0}
387 test_st virtual_bucket_tests
[] ={
388 {"basic", false, (test_callback_fn
*)virtual_back_map
},
389 {0, 0, (test_callback_fn
*)0}
392 test_st memcached_server_add_tests
[] ={
393 {"memcached_server_add(\"\")", false, (test_callback_fn
*)memcached_server_add_empty_test
},
394 {"memcached_server_add(NULL)", false, (test_callback_fn
*)memcached_server_add_null_test
},
395 {0, 0, (test_callback_fn
*)0}
398 test_st namespace_tests
[] ={
399 {"basic tests", true, (test_callback_fn
*)selection_of_namespace_tests
},
400 {"increment", true, (test_callback_fn
*)memcached_increment_namespace
},
401 {0, 0, (test_callback_fn
*)0}
404 collection_st collection
[] ={
406 {"hash_sanity", 0, 0, hash_sanity
},
408 {"libmemcachedutil", 0, 0, libmemcachedutil_tests
},
409 {"basic", 0, 0, basic_tests
},
410 {"hsieh_availability", 0, 0, hsieh_availability
},
411 {"murmur_availability", 0, 0, murmur_availability
},
412 {"memcached_server_add", 0, 0, memcached_server_add_tests
},
413 {"block", 0, 0, tests
},
414 {"binary", (test_callback_fn
*)pre_binary
, 0, tests
},
415 {"nonblock", (test_callback_fn
*)pre_nonblock
, 0, tests
},
416 {"nodelay", (test_callback_fn
*)pre_nodelay
, 0, tests
},
417 {"settimer", (test_callback_fn
*)pre_settimer
, 0, tests
},
418 {"md5", (test_callback_fn
*)pre_md5
, 0, tests
},
419 {"crc", (test_callback_fn
*)pre_crc
, 0, tests
},
420 {"hsieh", (test_callback_fn
*)pre_hsieh
, 0, tests
},
421 {"jenkins", (test_callback_fn
*)pre_jenkins
, 0, tests
},
422 {"fnv1_64", (test_callback_fn
*)pre_hash_fnv1_64
, 0, tests
},
423 {"fnv1a_64", (test_callback_fn
*)pre_hash_fnv1a_64
, 0, tests
},
424 {"fnv1_32", (test_callback_fn
*)pre_hash_fnv1_32
, 0, tests
},
425 {"fnv1a_32", (test_callback_fn
*)pre_hash_fnv1a_32
, 0, tests
},
426 {"ketama", (test_callback_fn
*)pre_behavior_ketama
, 0, tests
},
427 {"ketama_auto_eject_hosts", (test_callback_fn
*)pre_behavior_ketama
, 0, ketama_auto_eject_hosts
},
428 {"unix_socket", (test_callback_fn
*)pre_unix_socket
, 0, tests
},
429 {"unix_socket_nodelay", (test_callback_fn
*)pre_nodelay
, 0, tests
},
430 {"gets", (test_callback_fn
*)enable_cas
, 0, tests
},
431 {"consistent_crc", (test_callback_fn
*)enable_consistent_crc
, 0, tests
},
432 {"consistent_hsieh", (test_callback_fn
*)enable_consistent_hsieh
, 0, tests
},
433 #ifdef MEMCACHED_ENABLE_DEPRECATED
434 {"deprecated_memory_allocators", (test_callback_fn
*)deprecated_set_memory_alloc
, 0, tests
},
436 {"memory_allocators", (test_callback_fn
*)set_memory_alloc
, 0, tests
},
437 {"namespace", (test_callback_fn
*)set_namespace
, 0, tests
},
438 {"namespace(BINARY)", (test_callback_fn
*)set_namespace_and_binary
, 0, tests
},
439 {"specific namespace", 0, 0, namespace_tests
},
440 {"specific namespace(BINARY)", (test_callback_fn
*)pre_binary
, 0, namespace_tests
},
441 {"version_1_2_3", (test_callback_fn
*)check_for_1_2_3
, 0, version_1_2_3
},
442 {"result", 0, 0, result_tests
},
443 {"async", (test_callback_fn
*)pre_nonblock
, 0, async_tests
},
444 {"async(BINARY)", (test_callback_fn
*)pre_nonblock_binary
, 0, async_tests
},
445 {"Cal Haldenbrand's tests", 0, 0, haldenbrand_TESTS
},
446 {"user written tests", 0, 0, user_tests
},
447 {"generate", 0, 0, generate_tests
},
448 {"generate_hsieh", (test_callback_fn
*)pre_hsieh
, 0, generate_tests
},
449 {"generate_ketama", (test_callback_fn
*)pre_behavior_ketama
, 0, generate_tests
},
450 {"generate_hsieh_consistent", (test_callback_fn
*)enable_consistent_hsieh
, 0, generate_tests
},
451 {"generate_md5", (test_callback_fn
*)pre_md5
, 0, generate_tests
},
452 {"generate_murmur", (test_callback_fn
*)pre_murmur
, 0, generate_tests
},
453 {"generate_jenkins", (test_callback_fn
*)pre_jenkins
, 0, generate_tests
},
454 {"generate_nonblock", (test_callback_fn
*)pre_nonblock
, 0, generate_tests
},
456 {"generate_corked", (test_callback_fn
*)pre_cork
, 0, generate_tests
},
457 {"generate_corked_and_nonblock", (test_callback_fn
*)pre_cork_and_nonblock
, 0, generate_tests
},
458 {"consistent_not", 0, 0, consistent_tests
},
459 {"consistent_ketama", (test_callback_fn
*)pre_behavior_ketama
, 0, consistent_tests
},
460 {"consistent_ketama_weighted", (test_callback_fn
*)pre_behavior_ketama_weighted
, 0, consistent_weighted_tests
},
461 {"ketama_compat", 0, 0, ketama_compatibility
},
462 {"test_hashes", 0, 0, hash_tests
},
463 {"replication", (test_callback_fn
*)pre_replication
, 0, replication_tests
},
464 {"replication_noblock", (test_callback_fn
*)pre_replication_noblock
, 0, replication_tests
},
465 {"regression", 0, 0, regression_tests
},
466 {"behaviors", 0, 0, behavior_tests
},
467 {"regression_binary_vs_block", (test_callback_fn
*)key_setup
, (test_callback_fn
*)key_teardown
, regression_binary_vs_block
},
468 {"error_conditions", 0, 0, error_conditions
},
469 {"parser", 0, 0, parser_tests
},
470 {"virtual buckets", 0, 0, virtual_bucket_tests
},
471 {"memcached_server_get_last_disconnect", 0, 0, memcached_server_get_last_disconnect_tests
},
472 {"touch", 0, 0, touch_tests
},
473 {"touch", (test_callback_fn
*)pre_binary
, 0, touch_tests
},
474 {"memcached_stat()", 0, 0, memcached_stat_tests
},
475 {"kill()", 0, 0, kill_TESTS
},