static char *global_keys[GLOBAL_COUNT];
static size_t global_keys_length[GLOBAL_COUNT];
-test_return init_test(memcached_st *not_used)
+static test_return init_test(memcached_st *not_used __attribute__((unused)))
{
memcached_st memc;
return 0;
}
-test_return server_list_null_test(memcached_st *ptr)
+static test_return server_list_null_test(memcached_st *ptr __attribute__((unused)))
{
memcached_server_st *server_list;
memcached_return rc;
#define TEST_PORT_COUNT 7
uint32_t test_ports[TEST_PORT_COUNT];
-memcached_return server_display_function(memcached_st *ptr, memcached_server_st *server, void *context)
+static memcached_return server_display_function(memcached_st *ptr __attribute__((unused)), memcached_server_st *server, void *context)
{
/* Do Nothing */
uint32_t bigger= *((uint32_t *)(context));
return MEMCACHED_SUCCESS;
}
-test_return server_sort_test(memcached_st *ptr)
+static test_return server_sort_test(memcached_st *ptr __attribute__((unused)))
{
- uint8_t x;
+ uint32_t x;
uint32_t bigger= 0; /* Prime the value for the assert in server_display_function */
memcached_return rc;
memcached_server_function callbacks[1];
{
test_ports[x]= random() % 64000;
rc= memcached_server_add(local_memc, "localhost", test_ports[x]);
- assert(local_memc->number_of_hosts == x+1);
+ assert(local_memc->number_of_hosts == x + 1);
assert(local_memc->hosts[0].count == x+1);
assert(rc == MEMCACHED_SUCCESS);
}
return 0;
}
-test_return server_sort2_test(memcached_st *ptr)
+static test_return server_sort2_test(memcached_st *ptr __attribute__((unused)))
{
uint32_t bigger= 0; /* Prime the value for the assert in server_display_function */
memcached_return rc;
return 0;
}
-memcached_return server_display_unsort_function(memcached_st *ptr, memcached_server_st *server, void *context)
+static memcached_return server_display_unsort_function(memcached_st *ptr __attribute__((unused)), memcached_server_st *server, void *context)
{
/* Do Nothing */
uint32_t x= *((uint32_t *)(context));
return MEMCACHED_SUCCESS;
}
-test_return server_unsort_test(memcached_st *ptr)
+static test_return server_unsort_test(memcached_st *ptr __attribute__((unused)))
{
- uint8_t x;
+ uint32_t x;
uint32_t counter= 0; /* Prime the value for the assert in server_display_function */
uint32_t bigger= 0; /* Prime the value for the assert in server_display_function */
memcached_return rc;
return 0;
}
-test_return allocation_test(memcached_st *not_used)
+static test_return allocation_test(memcached_st *not_used __attribute__((unused)))
{
memcached_st *memc;
memc= memcached_create(NULL);
return 0;
}
-test_return clone_test(memcached_st *memc)
+static test_return clone_test(memcached_st *memc)
{
/* All null? */
{
return 0;
}
-test_return connection_test(memcached_st *memc)
+static test_return connection_test(memcached_st *memc)
{
memcached_return rc;
return 0;
}
-test_return error_test(memcached_st *memc)
+static test_return error_test(memcached_st *memc)
{
memcached_return rc;
return 0;
}
-test_return set_test(memcached_st *memc)
+static test_return set_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return append_test(memcached_st *memc)
+static test_return append_test(memcached_st *memc)
{
memcached_return rc;
char *key= "fig";
return 0;
}
-test_return append_binary_test(memcached_st *memc)
+static test_return append_binary_test(memcached_st *memc)
{
memcached_return rc;
char *key= "numbers";
return 0;
}
-test_return cas2_test(memcached_st *memc)
+static test_return cas2_test(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
return 0;
}
-test_return cas_test(memcached_st *memc)
+static test_return cas_test(memcached_st *memc)
{
memcached_return rc;
char *key= "fun";
return 0;
}
-test_return prepend_test(memcached_st *memc)
+static test_return prepend_test(memcached_st *memc)
{
memcached_return rc;
char *key= "fig";
Set the value, then quit to make sure it is flushed.
Come back in and test that add fails.
*/
-test_return add_test(memcached_st *memc)
+static test_return add_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return add_wrapper(memcached_st *memc)
+static test_return add_wrapper(memcached_st *memc)
{
unsigned int x;
return 0;
}
-test_return replace_test(memcached_st *memc)
+static test_return replace_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return delete_test(memcached_st *memc)
+static test_return delete_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return flush_test(memcached_st *memc)
+static test_return flush_test(memcached_st *memc)
{
memcached_return rc;
return 0;
}
-memcached_return server_function(memcached_st *ptr, memcached_server_st *server, void *context)
+static memcached_return server_function(memcached_st *ptr __attribute__((unused)),
+ memcached_server_st *server __attribute__((unused)),
+ void *context __attribute__((unused)))
{
/* Do Nothing */
return MEMCACHED_SUCCESS;
}
-test_return memcached_server_cursor_test(memcached_st *memc)
+static test_return memcached_server_cursor_test(memcached_st *memc)
{
char *context= "foo bad";
memcached_server_function callbacks[1];
return 0;
}
-test_return bad_key_test(memcached_st *memc)
+static test_return bad_key_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo bad";
}
#define READ_THROUGH_VALUE "set for me"
-memcached_return read_through_trigger(memcached_st *memc,
- char *key, size_t key_length,
+static memcached_return read_through_trigger(memcached_st *memc __attribute__((unused)),
+ char *key __attribute__((unused)),
+ size_t key_length __attribute__((unused)),
memcached_result_st *result)
{
return memcached_result_set_value(result, READ_THROUGH_VALUE, strlen(READ_THROUGH_VALUE));
}
-test_return read_through(memcached_st *memc)
+static test_return read_through(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
assert(string_length == 0);
assert(!string);
- rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_GET_FAILURE, read_through_trigger);
+ rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_GET_FAILURE, (void *)read_through_trigger);
assert(rc == MEMCACHED_SUCCESS);
string= memcached_get(memc, key, strlen(key),
return 0;
}
-memcached_return delete_trigger(memcached_st *ptr, const char *key, size_t key_length)
+static memcached_return delete_trigger(memcached_st *ptr __attribute__((unused)),
+ const char *key,
+ size_t key_length __attribute__((unused)))
{
assert(key);
return MEMCACHED_SUCCESS;
}
-test_return delete_through(memcached_st *memc)
+static test_return delete_through(memcached_st *memc)
{
memcached_trigger_delete_key callback;
memcached_return rc;
return 0;
}
-test_return get_test(memcached_st *memc)
+static test_return get_test(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return get_test2(memcached_st *memc)
+static test_return get_test2(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return set_test2(memcached_st *memc)
+static test_return set_test2(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return set_test3(memcached_st *memc)
+static test_return set_test3(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
return 0;
}
-test_return get_test3(memcached_st *memc)
+static test_return get_test3(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
char *string;
size_t string_length;
uint32_t flags;
- int x;
+ uint32_t x;
value = (char*)malloc(value_length);
assert(value);
return 0;
}
-test_return get_test4(memcached_st *memc)
+static test_return get_test4(memcached_st *memc)
{
memcached_return rc;
char *key= "foo";
char *string;
size_t string_length;
uint32_t flags;
- int x;
+ uint32_t x;
value = (char*)malloc(value_length);
assert(value);
}
/* Do not copy the style of this code, I just access hosts to testthis function */
-test_return stats_servername_test(memcached_st *memc)
+static test_return stats_servername_test(memcached_st *memc)
{
memcached_return rc;
memcached_stat_st stat;
return 0;
}
-test_return increment_test(memcached_st *memc)
+static test_return increment_test(memcached_st *memc)
{
uint64_t new_number;
memcached_return rc;
return 0;
}
-test_return decrement_test(memcached_st *memc)
+static test_return decrement_test(memcached_st *memc)
{
uint64_t new_number;
memcached_return rc;
return 0;
}
-test_return quit_test(memcached_st *memc)
+static test_return quit_test(memcached_st *memc)
{
memcached_return rc;
char *key= "fudge";
return 0;
}
-test_return mget_result_test(memcached_st *memc)
+static test_return mget_result_test(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
return 0;
}
-test_return mget_result_alloc_test(memcached_st *memc)
+static test_return mget_result_alloc_test(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
}
/* Count the results */
-unsigned int callback_counter(memcached_st *ptr, memcached_result_st *result, void *context)
+static memcached_return callback_counter(memcached_st *ptr __attribute__((unused)),
+ memcached_result_st *result __attribute__((unused)),
+ void *context)
{
unsigned int *counter= (unsigned int *)context;
*counter= *counter + 1;
- return 0;
+ return MEMCACHED_SUCCESS;
}
-test_return mget_result_function(memcached_st *memc)
+static test_return mget_result_function(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
return 0;
}
-test_return mget_test(memcached_st *memc)
+static test_return mget_test(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
return 0;
}
-test_return get_stats_keys(memcached_st *memc)
+static test_return get_stats_keys(memcached_st *memc)
{
char **list;
char **ptr;
return 0;
}
-test_return version_string_test(memcached_st *memc)
+static test_return version_string_test(memcached_st *memc __attribute__((unused)))
{
const char *version_string;
return 0;
}
-test_return get_stats(memcached_st *memc)
+static test_return get_stats(memcached_st *memc)
{
unsigned int x;
char **list;
return 0;
}
-test_return add_host_test(memcached_st *memc)
+static test_return add_host_test(memcached_st *memc)
{
unsigned int x;
memcached_server_st *servers;
return 0;
}
-memcached_return clone_test_callback(memcached_st *parent, memcached_st *clone)
+static memcached_return clone_test_callback(memcached_st *parent __attribute__((unused)), memcached_st *clone __attribute__((unused)))
{
return MEMCACHED_SUCCESS;
}
-memcached_return cleanup_test_callback(memcached_st *ptr)
+static memcached_return cleanup_test_callback(memcached_st *ptr __attribute__((unused)))
{
return MEMCACHED_SUCCESS;
}
-test_return callback_test(memcached_st *memc)
+static test_return callback_test(memcached_st *memc)
{
/* Test User Data */
{
}
/* We don't test the behavior itself, we test the switches */
-test_return behavior_test(memcached_st *memc)
+static test_return behavior_test(memcached_st *memc)
{
uint64_t value;
uint32_t set= 1;
}
/* Test case provided by Cal Haldenbrand */
-test_return user_supplied_bug1(memcached_st *memc)
+static test_return user_supplied_bug1(memcached_st *memc)
{
unsigned int setter= 1;
unsigned int x;
unsigned long long total= 0;
- int size= 0;
+ uint32_t size= 0;
char key[10];
char randomstuff[6 * 1024];
memcached_return rc;
}
/* Test case provided by Cal Haldenbrand */
-test_return user_supplied_bug2(memcached_st *memc)
+static test_return user_supplied_bug2(memcached_st *memc)
{
int errors;
unsigned int setter;
/* Do a large mget() over all the keys we think exist */
#define KEY_COUNT 3000 // * 1024576
-test_return user_supplied_bug3(memcached_st *memc)
+static test_return user_supplied_bug3(memcached_st *memc)
{
memcached_return rc;
unsigned int setter;
}
/* Make sure we behave properly if server list has no values */
-test_return user_supplied_bug4(memcached_st *memc)
+static test_return user_supplied_bug4(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"fudge", "son", "food"};
}
#define VALUE_SIZE_BUG5 1048064
-test_return user_supplied_bug5(memcached_st *memc)
+static test_return user_supplied_bug5(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
return 0;
}
-test_return user_supplied_bug6(memcached_st *memc)
+static test_return user_supplied_bug6(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
return 0;
}
-test_return user_supplied_bug8(memcached_st *memc)
+static test_return user_supplied_bug8(memcached_st *memc __attribute__((unused)))
{
memcached_return rc;
memcached_st *mine;
}
/* Test flag store/retrieve */
-test_return user_supplied_bug7(memcached_st *memc)
+static test_return user_supplied_bug7(memcached_st *memc)
{
memcached_return rc;
char *keys= "036790384900";
return 0;
}
-test_return user_supplied_bug9(memcached_st *memc)
+static test_return user_supplied_bug9(memcached_st *memc)
{
memcached_return rc;
char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};
}
/* We are testing with aggressive timeout to get failures */
-test_return user_supplied_bug10(memcached_st *memc)
+static test_return user_supplied_bug10(memcached_st *memc)
{
char *key= "foo";
char *value;
/*
We are looking failures in the async protocol
*/
-test_return user_supplied_bug11(memcached_st *memc)
+static test_return user_supplied_bug11(memcached_st *memc)
{
char *key= "foo";
char *value;
/*
Bug found where incr was not returning MEMCACHED_NOTFOUND when object did not exist.
*/
-test_return user_supplied_bug12(memcached_st *memc)
+static test_return user_supplied_bug12(memcached_st *memc)
{
memcached_return rc;
uint32_t flags;
Bug found where command total one more than MEMCACHED_MAX_BUFFER
set key34567890 0 0 8169 \r\n is sent followed by buffer of size 8169, followed by 8169
*/
-test_return user_supplied_bug13(memcached_st *memc)
+static test_return user_supplied_bug13(memcached_st *memc)
{
char key[] = "key34567890";
char *overflow;
set key34567890 0 0 8169 \r\n
is sent followed by buffer of size 8169, followed by 8169
*/
-test_return user_supplied_bug14(memcached_st *memc)
+static test_return user_supplied_bug14(memcached_st *memc)
{
int setter= 1;
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
/*
Look for zero length value problems
*/
-test_return user_supplied_bug15(memcached_st *memc)
+static test_return user_supplied_bug15(memcached_st *memc)
{
uint32_t x;
memcached_return rc;
}
/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
-test_return user_supplied_bug16(memcached_st *memc)
+static test_return user_supplied_bug16(memcached_st *memc)
{
memcached_return rc;
char *key= "mykey";
}
/* Check the validity of chinese key*/
-test_return user_supplied_bug17(memcached_st *memc)
+static test_return user_supplied_bug17(memcached_st *memc)
{
memcached_return rc;
char *key= "豆瓣";
}
-test_return result_static(memcached_st *memc)
+static test_return result_static(memcached_st *memc)
{
memcached_result_st result;
memcached_result_st *result_ptr;
return 0;
}
-test_return result_alloc(memcached_st *memc)
+static test_return result_alloc(memcached_st *memc)
{
memcached_result_st *result;
return 0;
}
-test_return string_static_null(memcached_st *memc)
+static test_return string_static_null(memcached_st *memc)
{
memcached_string_st string;
memcached_string_st *string_ptr;
return 0;
}
-test_return string_alloc_null(memcached_st *memc)
+static test_return string_alloc_null(memcached_st *memc)
{
memcached_string_st *string;
return 0;
}
-test_return string_alloc_with_size(memcached_st *memc)
+static test_return string_alloc_with_size(memcached_st *memc)
{
memcached_string_st *string;
return 0;
}
-test_return string_alloc_with_size_toobig(memcached_st *memc)
+static test_return string_alloc_with_size_toobig(memcached_st *memc)
{
memcached_string_st *string;
return 0;
}
-test_return string_alloc_append(memcached_st *memc)
+static test_return string_alloc_append(memcached_st *memc)
{
unsigned int x;
char buffer[SMALL_STRING_LEN];
return 0;
}
-test_return string_alloc_append_toobig(memcached_st *memc)
+static test_return string_alloc_append_toobig(memcached_st *memc)
{
memcached_return rc;
unsigned int x;
return 0;
}
-test_return cleanup_pairs(memcached_st *memc)
+static test_return cleanup_pairs(memcached_st *memc __attribute__((unused)))
{
pairs_free(global_pairs);
return 0;
}
-test_return generate_pairs(memcached_st *memc)
+static test_return generate_pairs(memcached_st *memc __attribute__((unused)))
{
unsigned long long x;
global_pairs= pairs_generate(GLOBAL_COUNT, 400);
return 0;
}
-test_return generate_large_pairs(memcached_st *memc)
+static test_return generate_large_pairs(memcached_st *memc __attribute__((unused)))
{
unsigned long long x;
global_pairs= pairs_generate(GLOBAL2_COUNT, MEMCACHED_MAX_BUFFER+10);
return 0;
}
-test_return generate_data(memcached_st *memc)
+static test_return generate_data(memcached_st *memc)
{
execute_set(memc, global_pairs, global_count);
return 0;
}
-test_return generate_data_with_stats(memcached_st *memc)
+static test_return generate_data_with_stats(memcached_st *memc)
{
memcached_stat_st *stat_p;
memcached_return rc;
memcached_stat_free(NULL, stat_p);
-
return 0;
}
-test_return generate_buffer_data(memcached_st *memc)
+static test_return generate_buffer_data(memcached_st *memc)
{
int latch= 0;
return 0;
}
-test_return get_read_count(memcached_st *memc)
+static test_return get_read_count(memcached_st *memc)
{
unsigned int x;
memcached_return rc;
return 0;
}
-test_return get_read(memcached_st *memc)
+static test_return get_read(memcached_st *memc)
{
unsigned int x;
memcached_return rc;
return 0;
}
-test_return mget_read(memcached_st *memc)
+static test_return mget_read(memcached_st *memc)
{
memcached_return rc;
return 0;
}
-test_return mget_read_result(memcached_st *memc)
+static test_return mget_read_result(memcached_st *memc)
{
memcached_return rc;
return 0;
}
-test_return mget_read_function(memcached_st *memc)
+static test_return mget_read_function(memcached_st *memc)
{
memcached_return rc;
unsigned int counter;
return 0;
}
-test_return delete_generate(memcached_st *memc)
+static test_return delete_generate(memcached_st *memc)
{
unsigned int x;
return 0;
}
-test_return delete_buffer_generate(memcached_st *memc)
+static test_return delete_buffer_generate(memcached_st *memc)
{
int latch= 0;
unsigned int x;
return 0;
}
-test_return free_data(memcached_st *memc)
+static test_return free_data(memcached_st *memc __attribute__((unused)))
{
pairs_free(global_pairs);
return 0;
}
-test_return add_host_test1(memcached_st *memc)
+static test_return add_host_test1(memcached_st *memc)
{
unsigned int x;
memcached_return rc;
return 0;
}
-memcached_return pre_nonblock(memcached_st *memc)
+static memcached_return pre_nonblock(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_murmur(memcached_st *memc)
+static memcached_return pre_murmur(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_md5(memcached_st *memc)
+static memcached_return pre_md5(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MD5);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_crc(memcached_st *memc)
+static memcached_return pre_crc(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_CRC);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_hsieh(memcached_st *memc)
+static memcached_return pre_hsieh(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_HSIEH);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_hash_fnv1_64(memcached_st *memc)
+static memcached_return pre_hash_fnv1_64(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1_64);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_hash_fnv1a_64(memcached_st *memc)
+static memcached_return pre_hash_fnv1a_64(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_64);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_hash_fnv1_32(memcached_st *memc)
+static memcached_return pre_hash_fnv1_32(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1_32);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_hash_fnv1a_32(memcached_st *memc)
+static memcached_return pre_hash_fnv1a_32(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_32);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_behavior_ketama(memcached_st *memc)
+static memcached_return pre_behavior_ketama(memcached_st *memc)
{
memcached_return rc;
uint64_t value;
return MEMCACHED_SUCCESS;
}
-memcached_return pre_behavior_ketama_weighted(memcached_st *memc)
+static memcached_return pre_behavior_ketama_weighted(memcached_st *memc)
{
memcached_return rc;
uint64_t value;
return MEMCACHED_SUCCESS;
}
-memcached_return pre_binary(memcached_st *memc)
+static memcached_return pre_binary(memcached_st *memc)
{
memcached_return rc= MEMCACHED_FAILURE;
memcached_st *clone;
return rc;
}
-void my_free(memcached_st *ptr, void *mem)
+static void my_free(memcached_st *ptr __attribute__((unused)), void *mem)
{
free(mem);
}
-void *my_malloc(memcached_st *ptr, const size_t size)
+static void *my_malloc(memcached_st *ptr __attribute__((unused)), const size_t size)
{
return malloc(size);
}
-void *my_realloc(memcached_st *ptr, void *mem, const size_t size)
+static void *my_realloc(memcached_st *ptr __attribute__((unused)), void *mem, const size_t size)
{
return realloc(mem, size);
}
-memcached_return set_prefix(memcached_st *memc)
+static memcached_return set_prefix(memcached_st *memc)
{
memcached_return rc;
const char *key= "mine";
return MEMCACHED_SUCCESS;
}
-memcached_return set_memory_alloc(memcached_st *memc)
+static memcached_return set_memory_alloc(memcached_st *memc)
{
{
memcached_malloc_function test_ptr;
return MEMCACHED_SUCCESS;
}
-memcached_return enable_consistent(memcached_st *memc)
+static memcached_return enable_consistent(memcached_st *memc)
{
memcached_server_distribution value= MEMCACHED_DISTRIBUTION_CONSISTENT;
memcached_hash hash;
return MEMCACHED_SUCCESS;
}
-memcached_return enable_cas(memcached_st *memc)
+static memcached_return enable_cas(memcached_st *memc)
{
unsigned int set= 1;
return MEMCACHED_FAILURE;
}
-memcached_return check_for_1_2_3(memcached_st *memc)
+static memcached_return check_for_1_2_3(memcached_st *memc)
{
memcached_version(memc);
return MEMCACHED_FAILURE;
}
-memcached_return pre_unix_socket(memcached_st *memc)
+static memcached_return pre_unix_socket(memcached_st *memc)
{
memcached_return rc;
struct stat buf;
return rc;
}
-memcached_return pre_udp(memcached_st *memc)
-{
- memcached_return rc;
-
- memcached_server_list_free(memc->hosts);
- memc->hosts= NULL;
- memc->number_of_hosts= 0;
-
- if (0)
- return MEMCACHED_FAILURE;
-
- rc= memcached_server_add_udp(memc, "localhost", MEMCACHED_DEFAULT_PORT);
-
- return rc;
-}
-
-memcached_return pre_nodelay(memcached_st *memc)
+static memcached_return pre_nodelay(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 0);
return MEMCACHED_SUCCESS;
}
-memcached_return pre_settimer(memcached_st *memc)
+static memcached_return pre_settimer(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000);
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000);
return MEMCACHED_SUCCESS;
}
-memcached_return poll_timeout(memcached_st *memc)
+static memcached_return poll_timeout(memcached_st *memc)
{
int32_t timeout;
{"mget_result_function", 1, mget_result_function },
{"get_stats", 0, get_stats },
{"add_host_test", 0, add_host_test },
+ {"add_host_test_1", 0, add_host_test1 },
{"get_stats_keys", 0, get_stats_keys },
{"behavior_test", 0, get_stats_keys },
{"callback_test", 0, get_stats_keys },
{"consistent", enable_consistent, 0, tests},
{"memory_allocators", set_memory_alloc, 0, tests},
{"prefix", set_prefix, 0, tests},
-// {"udp", pre_udp, 0, tests},
{"version_1_2_3", check_for_1_2_3, 0, version_1_2_3},
{"string", 0, 0, string_tests},
{"result", 0, 0, result_tests},
#define SERVERS_TO_CREATE 5
+/* Prototypes for functions we will pass to test framework */
+void *world_create(void);
+void world_destroy(void *p);
+
void *world_create(void)
{
server_startup_st *construct;
return construct;
}
+
void world_destroy(void *p)
{
server_startup_st *construct= (server_startup_st *)p;