From: Brian Aker Date: Sat, 31 Dec 2011 00:19:34 +0000 (-0800) Subject: Update logic around UDP. X-Git-Tag: 1.0.3~3^2~1^2~7 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=70f02eac18862c95ebe45e1b410904910281be6c;p=awesomized%2Flibmemcached Update logic around UDP. --- diff --git a/clients/execute.cc b/clients/execute.cc index 6d82df6f..b2769545 100644 --- a/clients/execute.cc +++ b/clients/execute.cc @@ -15,7 +15,7 @@ */ #include -#include "execute.h" +#include "clients/execute.h" unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of) { @@ -29,9 +29,13 @@ unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int numbe 0, 0); if (rc != MEMCACHED_SUCCESS and rc != MEMCACHED_BUFFERED) { - fprintf(stderr, "Failure on insert (%s) of %.*s\n", + fprintf(stderr, "%s:%d Failure on insert (%s) of %.*s\n", + __FILE__, __LINE__, memcached_last_error_message(memc), (unsigned int)pairs[x].key_length, pairs[x].key); + + // We will try to reconnect and see if that fixes the issue + memcached_quit(memc); } else { @@ -55,19 +59,18 @@ unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int numbe for (retrieved= 0,x= 0; x < number_of; x++) { - char *value; size_t value_length; uint32_t flags; - unsigned int fetch_key; - fetch_key= (unsigned int)((unsigned int)random() % number_of); + unsigned int fetch_key= (unsigned int)((unsigned int)random() % number_of); - value= memcached_get(memc, pairs[fetch_key].key, pairs[fetch_key].key_length, - &value_length, &flags, &rc); + char *value= memcached_get(memc, pairs[fetch_key].key, pairs[fetch_key].key_length, + &value_length, &flags, &rc); if (rc != MEMCACHED_SUCCESS) { - fprintf(stderr, "Failure on read(%s) of %.*s\n", + fprintf(stderr, "%s:%d Failure on read(%s) of %.*s\n", + __FILE__, __LINE__, memcached_last_error_message(memc), (unsigned int)pairs[fetch_key].key_length, pairs[fetch_key].key); } @@ -122,7 +125,8 @@ unsigned int execute_mget(memcached_st *memc, rc= memcached_fetch_execute(memc, callbacks, (void *)&retrieved, 1); if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_NOTFOUND && rc != MEMCACHED_END) { - fprintf(stderr, "Failed to execute mget: %s\n", + fprintf(stderr, "%s:%d Failed to execute mget: %s\n", + __FILE__, __LINE__, memcached_strerror(memc, rc)); memcached_quit(memc); return 0; @@ -130,7 +134,8 @@ unsigned int execute_mget(memcached_st *memc, } else { - fprintf(stderr, "Failed to execute mget: %s\n", + fprintf(stderr, "%s:%d Failed to execute mget: %s\n", + __FILE__, __LINE__, memcached_strerror(memc, rc)); memcached_quit(memc); return 0; diff --git a/libmemcached/auto.cc b/libmemcached/auto.cc index 174f2623..256a849a 100644 --- a/libmemcached/auto.cc +++ b/libmemcached/auto.cc @@ -170,7 +170,7 @@ memcached_return_t memcached_increment_by_key(memcached_st *ptr, value= &local_value; } - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } @@ -222,7 +222,7 @@ memcached_return_t memcached_decrement_by_key(memcached_st *ptr, } memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } @@ -287,7 +287,7 @@ memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr, } memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } @@ -351,7 +351,7 @@ memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr, } memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/delete.cc b/libmemcached/delete.cc index b37f2688..99f3970b 100644 --- a/libmemcached/delete.cc +++ b/libmemcached/delete.cc @@ -165,7 +165,7 @@ memcached_return_t memcached_delete_by_key(memcached_st *ptr, LIBMEMCACHED_MEMCACHED_DELETE_START(); memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/dump.cc b/libmemcached/dump.cc index 603c5560..6e187478 100644 --- a/libmemcached/dump.cc +++ b/libmemcached/dump.cc @@ -142,7 +142,7 @@ error: memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks) { memcached_return_t rc; - if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/exist.cc b/libmemcached/exist.cc index ff0c1b42..e9e6208b 100644 --- a/libmemcached/exist.cc +++ b/libmemcached/exist.cc @@ -129,17 +129,16 @@ memcached_return_t memcached_exist_by_key(memcached_st *memc, const char *key, size_t key_length) { memcached_return_t rc; - if (memcached_failed(rc= initialize_query(memc))) + if (memcached_failed(rc= initialize_query(memc, true))) { return rc; } - if (memc->flags.use_udp) + if (memcached_is_udp(memc)) { return MEMCACHED_NOT_SUPPORTED; } - uint32_t server_key= memcached_generate_hash_with_redistribution(memc, group_key, group_key_length); memcached_server_write_instance_st instance; instance= memcached_server_instance_fetch(memc, server_key); diff --git a/libmemcached/flush.cc b/libmemcached/flush.cc index 99da07f4..f434b917 100644 --- a/libmemcached/flush.cc +++ b/libmemcached/flush.cc @@ -44,7 +44,7 @@ static memcached_return_t memcached_flush_textual(memcached_st *ptr, memcached_return_t memcached_flush(memcached_st *ptr, time_t expiration) { memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/get.cc b/libmemcached/get.cc index e478f0ba..a67e7618 100644 --- a/libmemcached/get.cc +++ b/libmemcached/get.cc @@ -72,36 +72,35 @@ char *memcached_get_by_key(memcached_st *ptr, error= &unused; } - if (ptr->flags.use_udp) + uint64_t query_id= 0; + if (ptr) { - if (value_length) - { - *value_length= 0; - } - - *error= memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); - return NULL; + query_id= ptr->query_id; } - uint64_t query_id= ptr->query_id; - (void)query_id; - /* Request the key */ *error= memcached_mget_by_key_real(ptr, group_key, group_key_length, (const char * const *)&key, &key_length, 1, false); - assert_msg(ptr->query_id == query_id +1, "Programmer error, the query_id was not incremented."); - + if (ptr) + { + assert_msg(ptr->query_id == query_id +1, "Programmer error, the query_id was not incremented."); + } if (memcached_failed(*error)) { - if (memcached_has_current_error(*ptr)) // Find the most accurate error + if (ptr) { - *error= memcached_last_error(ptr); + if (memcached_has_current_error(*ptr)) // Find the most accurate error + { + *error= memcached_last_error(ptr); + } } if (value_length) + { *value_length= 0; + } return NULL; } @@ -209,12 +208,12 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr, unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */ memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } - if (ptr->flags.use_udp) + if (memcached_is_udp(ptr)) { return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); } @@ -425,12 +424,22 @@ memcached_return_t memcached_mget_execute_by_key(memcached_st *ptr, void *context, unsigned int number_of_callbacks) { - if ((ptr->flags.binary_protocol) == 0) + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, false))) + { + return rc; + } + + if (memcached_is_udp(ptr)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + if (memcached_is_binary(ptr) == false) { return MEMCACHED_NOT_SUPPORTED; } - memcached_return_t rc; memcached_callback_st *original_callbacks= ptr->callbacks; memcached_callback_st cb= { callback, diff --git a/libmemcached/initialize_query.cc b/libmemcached/initialize_query.cc index 84fc2290..dca3c4d8 100644 --- a/libmemcached/initialize_query.cc +++ b/libmemcached/initialize_query.cc @@ -36,14 +36,17 @@ #include -memcached_return_t initialize_query(memcached_st *self) +memcached_return_t initialize_query(memcached_st *self, bool increment_query_id) { if (self == NULL) { return MEMCACHED_INVALID_ARGUMENTS; } - self->query_id++; + if (increment_query_id) + { + self->query_id++; + } if (self->state.is_time_for_rebuild) { diff --git a/libmemcached/initialize_query.h b/libmemcached/initialize_query.h index 86c8e2d8..943a37a3 100644 --- a/libmemcached/initialize_query.h +++ b/libmemcached/initialize_query.h @@ -36,16 +36,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif +memcached_return_t initialize_query(memcached_st *self, bool increment_query_id); -LIBMEMCACHED_LOCAL - memcached_return_t initialize_query(memcached_st *self); - -LIBMEMCACHED_LOCAL memcached_return_t initialize_const_query(const memcached_st *self); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/libmemcached/io.cc b/libmemcached/io.cc index 2b0866dc..ae86fa21 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -439,7 +439,7 @@ memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr, ssize_t data_read; do { - data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_DONTWAIT); + data_read= ::recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_DONTWAIT); if (data_read == SOCKET_ERROR) { switch (get_socket_errno()) @@ -494,7 +494,8 @@ memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr, WATCHPOINT_STRING("We had a zero length recv()"); memcached_quit_server(ptr, true); *nread= -1; - return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("::rec() returned zero, server has disconnected")); } } while (data_read <= 0); diff --git a/libmemcached/purge.cc b/libmemcached/purge.cc index 86e379e4..d80785ff 100644 --- a/libmemcached/purge.cc +++ b/libmemcached/purge.cc @@ -105,9 +105,11 @@ memcached_return_t memcached_purge(memcached_server_write_instance_st ptr) if (rc== MEMCACHED_PROTOCOL_ERROR or rc == MEMCACHED_UNKNOWN_READ_FAILURE or rc == MEMCACHED_READ_FAILURE) { WATCHPOINT_ERROR(rc); - ret= rc; memcached_io_reset(ptr); - memcached_set_error(*ptr, rc, MEMCACHED_AT); + ret= rc; +#if 0 + ret= memcached_set_error(*ptr, rc, MEMCACHED_AT); +#endif } if (ptr->root->callbacks != NULL) diff --git a/libmemcached/quit.cc b/libmemcached/quit.cc index 90a97e45..f228c881 100644 --- a/libmemcached/quit.cc +++ b/libmemcached/quit.cc @@ -140,7 +140,8 @@ void send_quit(memcached_st *ptr) void memcached_quit(memcached_st *ptr) { - if (memcached_failed(initialize_query(ptr))) + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) { return; } diff --git a/libmemcached/response.cc b/libmemcached/response.cc index 3312fb7c..445b9233 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -46,11 +46,6 @@ static memcached_return_t textual_value_fetch(memcached_server_write_instance_st ssize_t read_length= 0; size_t value_length; - if (ptr->root->flags.use_udp) - { - return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); - } - WATCHPOINT_ASSERT(ptr->root); char *end_ptr= buffer + MEMCACHED_DEFAULT_COMMAND_SIZE; @@ -345,11 +340,13 @@ static memcached_return_t textual_read_one_response(memcached_server_write_insta if (auto_return_value == ULLONG_MAX and errno == ERANGE) { - return MEMCACHED_UNKNOWN_READ_FAILURE; + return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Numeric response was out of range")); } else if (errno == EINVAL) { - return MEMCACHED_UNKNOWN_READ_FAILURE; + return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Numeric response was out of range")); } numeric_value= uint64_t(auto_return_value); @@ -362,7 +359,8 @@ static memcached_return_t textual_read_one_response(memcached_server_write_insta break; } - return MEMCACHED_UNKNOWN_READ_FAILURE; + return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Could not determine response")); } static memcached_return_t binary_read_one_response(memcached_server_write_instance_st ptr, @@ -660,6 +658,11 @@ memcached_return_t memcached_read_one_response(memcached_server_write_instance_s memcached_result_st *result, uint64_t& numeric_value) { + if (memcached_is_udp(ptr->root)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + memcached_server_response_decrement(ptr); if (result == NULL) @@ -704,6 +707,11 @@ memcached_return_t memcached_response(memcached_server_write_instance_st ptr, memcached_result_st *result, uint64_t& numeric_value) { + if (memcached_is_udp(ptr->root)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + /* We may have old commands in the buffer not set, first purge */ if ((ptr->root->flags.no_block) and (memcached_is_processing_input(ptr->root) == false)) { diff --git a/libmemcached/stats.cc b/libmemcached/stats.cc index 3c7c1068..c01b2acc 100644 --- a/libmemcached/stats.cc +++ b/libmemcached/stats.cc @@ -498,19 +498,18 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu error= &unused; } - memcached_return_t rc; - if (memcached_failed(rc= initialize_query(self))) + if (memcached_failed(*error= initialize_query(self, true))) { - *error= rc; return NULL; } - if (self->flags.use_udp) + if (memcached_is_udp(self)) { *error= memcached_set_error(*self, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); return NULL; } + memcached_return_t rc; size_t args_length= 0; if (args) { @@ -584,7 +583,7 @@ memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char return rc; } - if (memcached_success(rc= initialize_query(memc_ptr))) + if (memcached_success(rc= initialize_query(memc_ptr, true))) { size_t args_length= 0; if (args) diff --git a/libmemcached/storage.cc b/libmemcached/storage.cc index 3e293232..629b95dc 100644 --- a/libmemcached/storage.cc +++ b/libmemcached/storage.cc @@ -333,7 +333,7 @@ static inline memcached_return_t memcached_send(memcached_st *ptr, memcached_storage_action_t verb) { memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/touch.cc b/libmemcached/touch.cc index ab1f7023..ac52b3a1 100644 --- a/libmemcached/touch.cc +++ b/libmemcached/touch.cc @@ -114,7 +114,7 @@ memcached_return_t memcached_touch_by_key(memcached_st *ptr, LIBMEMCACHED_MEMCACHED_TOUCH_START(); memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= initialize_query(ptr, true))) { return rc; } diff --git a/libmemcached/verbosity.cc b/libmemcached/verbosity.cc index 0a5b9bbe..557fb005 100644 --- a/libmemcached/verbosity.cc +++ b/libmemcached/verbosity.cc @@ -75,6 +75,17 @@ static memcached_return_t _set_verbosity(const memcached_st *, memcached_return_t memcached_verbosity(memcached_st *ptr, uint32_t verbosity) { + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, false))) + { + return rc; + } + + if (memcached_is_udp(ptr)) + { + return MEMCACHED_NOT_SUPPORTED; + } + memcached_server_fn callbacks[1]; char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; @@ -86,7 +97,7 @@ memcached_return_t memcached_verbosity(memcached_st *ptr, uint32_t verbosity) memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("verbosity ") }, { buffer, send_length }, diff --git a/libmemcached/version.cc b/libmemcached/version.cc index 4b9bfeeb..b889bf4f 100644 --- a/libmemcached/version.cc +++ b/libmemcached/version.cc @@ -41,37 +41,9 @@ const char * memcached_lib_version(void) return LIBMEMCACHED_VERSION_STRING; } -static inline memcached_return_t memcached_version_binary(memcached_st *ptr); -static inline memcached_return_t memcached_version_textual(memcached_st *ptr); - -memcached_return_t memcached_version(memcached_st *ptr) -{ - memcached_return_t rc; - if (memcached_failed(rc= initialize_query(ptr))) - { - return rc; - } - - if (ptr->flags.use_udp) - { - return MEMCACHED_NOT_SUPPORTED; - } - - if (ptr->flags.binary_protocol) - { - rc= memcached_version_binary(ptr); - } - else - { - rc= memcached_version_textual(ptr); - } - - return rc; -} - static inline memcached_return_t memcached_version_textual(memcached_st *ptr) { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("version\r\n") }, }; @@ -157,7 +129,7 @@ static inline memcached_return_t memcached_version_binary(memcached_st *ptr) request.message.header.request.opcode= PROTOCOL_BINARY_CMD_VERSION; request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) } }; @@ -237,3 +209,28 @@ static inline memcached_return_t memcached_version_binary(memcached_st *ptr) return rc; } + +memcached_return_t memcached_version(memcached_st *ptr) +{ + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + if (memcached_is_udp(ptr)) + { + return MEMCACHED_NOT_SUPPORTED; + } + + if (memcached_is_binary(ptr)) + { + rc= memcached_version_binary(ptr); + } + else + { + rc= memcached_version_textual(ptr); + } + + return rc; +} diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc index a9933f6f..b2b807b6 100644 --- a/tests/libmemcached-1.0/mem_functions.cc +++ b/tests/libmemcached-1.0/mem_functions.cc @@ -3120,7 +3120,7 @@ static test_return_t generate_data(memcached_st *memc) { unsigned int check_execute= execute_set(memc, global_pairs, global_count); - test_compare(global_count, check_execute); + test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs"); return TEST_SUCCESS; } diff --git a/tests/mem_udp.cc b/tests/mem_udp.cc index 590ad7b9..577dabe8 100644 --- a/tests/mem_udp.cc +++ b/tests/mem_udp.cc @@ -200,6 +200,54 @@ static test_return_t add_udp_server_tcp_client_test(memcached_st *memc) return TEST_SUCCESS; } +static test_return_t version_TEST(memcached_st *memc) +{ + test_compare(MEMCACHED_NOT_SUPPORTED, memcached_version(memc)); + return TEST_SUCCESS; +} + +static test_return_t verbosity_TEST(memcached_st *memc) +{ + test_compare(MEMCACHED_NOT_SUPPORTED, memcached_verbosity(memc, 0)); + return TEST_SUCCESS; +} + +static test_return_t memcached_get_TEST(memcached_st *memc) +{ + memcached_return_t rc; + test_null(memcached_get(memc, + test_literal_param(__func__), + 0, 0, &rc)); + test_compare(MEMCACHED_NOT_SUPPORTED, rc); + + return TEST_SUCCESS; +} + +static test_return_t memcached_mget_execute_by_key_TEST(memcached_st *memc) +{ + char **keys= NULL; + size_t *key_length= NULL; + test_compare(MEMCACHED_NOT_SUPPORTED, + memcached_mget_execute_by_key(memc, + test_literal_param(__func__), // Group key + keys, key_length, // Actual key + 0, // Number of keys + 0, // callbacks + 0, // context + 0)); // Number of callbacks + + return TEST_SUCCESS; +} + +static test_return_t memcached_stat_TEST(memcached_st *memc) +{ + memcached_return_t rc; + test_null(memcached_stat(memc, 0, &rc)); + test_compare(MEMCACHED_NOT_SUPPORTED, rc); + + return TEST_SUCCESS; +} + static test_return_t set_udp_behavior_test(memcached_st *memc) { memcached_quit(memc); @@ -470,6 +518,15 @@ static test_return_t udp_mixed_io_test(memcached_st *memc) return TEST_SUCCESS; } +test_st compatibility_TESTS[] ={ + {"version", 0, (test_callback_fn*)version_TEST }, + {"version", 0, (test_callback_fn*)verbosity_TEST }, + {"memcached_get()", 0, (test_callback_fn*)memcached_get_TEST }, + {"memcached_mget_execute_by_key()", 0, (test_callback_fn*)memcached_mget_execute_by_key_TEST }, + {"memcached_stat()", 0, (test_callback_fn*)memcached_stat_TEST }, + {0, 0, 0} +}; + test_st udp_setup_server_tests[] ={ {"set_udp_behavior_test", 0, (test_callback_fn*)set_udp_behavior_test}, {"add_tcp_server_udp_client_test", 0, (test_callback_fn*)add_tcp_server_udp_client_test}, @@ -497,6 +554,7 @@ test_st upd_io_tests[] ={ collection_st collection[] ={ {"udp_setup", (test_callback_fn*)init_udp, 0, udp_setup_server_tests}, + {"compatibility", (test_callback_fn*)init_udp, 0, compatibility_TESTS}, {"udp_io", (test_callback_fn*)init_udp_valgrind, 0, upd_io_tests}, {"udp_binary_io", (test_callback_fn*)binary_init_udp, 0, upd_io_tests}, {0, 0, 0, 0}