AX_APPEND_COMPILE_FLAGS([-Werror -Wall])
AX_APPEND_COMPILE_FLAGS([-Werror -Wextra])
-AX_APPEND_COMPILE_FLAGS([-Werror -fstack-protector-all])
-AX_APPEND_COMPILE_FLAGS([-Werror -ggdb])
-AX_APPEND_COMPILE_FLAGS([-Werror -floop-parallelize-all])
-AX_APPEND_COMPILE_FLAGS([-Werror -Wsign-compare])
AX_APPEND_COMPILE_FLAGS([-Werror -Wmaybe-uninitialized])
-AX_APPEND_COMPILE_FLAGS([-Werror -Wunused-variable])
AX_APPEND_COMPILE_FLAGS([-Werror -Wsign-compare])
+AX_APPEND_COMPILE_FLAGS([-Werror -Wunused-result])
+AX_APPEND_COMPILE_FLAGS([-Werror -Wunused-variable])
+AX_APPEND_COMPILE_FLAGS([-Werror -floop-parallelize-all])
+AX_APPEND_COMPILE_FLAGS([-Werror -fstack-protector-all])
+AX_APPEND_COMPILE_FLAGS([-Werror -ggdb])
AC_CONFIG_FILES([
Makefile
-.TH "HASHKIT_CLONE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_CLONE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_clone \- libhashkit Documentation
.
-.TH "HASHKIT_CRC32" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_CRC32" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_crc32 \- libhashkit Documentation
.
-.TH "HASHKIT_CREATE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_CREATE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_create \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_32" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FNV1_32" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_fnv1_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_64" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FNV1_64" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_fnv1_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_32" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FNV1A_32" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_fnv1a_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_64" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FNV1A_64" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_fnv1a_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FREE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FREE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_free \- libhashkit Documentation
.
-.TH "HASHKIT_FUNCTIONS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_FUNCTIONS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_functions \- libhashkit Documentation
.
-.TH "HASHKIT_HSIEH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_HSIEH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_hsieh \- libhashkit Documentation
.
-.TH "HASHKIT_IS_ALLOCATED" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_IS_ALLOCATED" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_is_allocated \- libhashkit Documentation
.
-.TH "HASHKIT_JENKINS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_JENKINS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_jenkins \- libhashkit Documentation
.
-.TH "HASHKIT_MD5" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_MD5" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_md5 \- libhashkit Documentation
.
-.TH "HASHKIT_MURMUR" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_MURMUR" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_murmur \- libhashkit Documentation
.
-.TH "HASHKIT_VALUE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "HASHKIT_VALUE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
hashkit_value \- libhashkit Documentation
.
-.TH "LIBHASHKIT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBHASHKIT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libhashkit \- libhashkit Documentation
.
-.TH "LIBMEMCACHED" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBMEMCACHED" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libmemcached \- Introducing the C Client Library for memcached
.
-.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libmemcached_check_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_CONFIGURATION" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBMEMCACHED_CONFIGURATION" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libmemcached_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_EXAMPLES" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBMEMCACHED_EXAMPLES" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libmemcached_examples \- libmemcached Documentation
.
-.TH "LIBMEMCACHEDUTIL" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "LIBMEMCACHEDUTIL" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
libmemcachedutil \- libmemcached Documentation
.
-.TH "MEMASLAP" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMASLAP" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memaslap \- libmemcached Documentation
.
-.TH "MEMCACHED" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached \- libmemcached Documentation
.
-.TH "MEMCACHED_ADD" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_ADD" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_add \- Storing and Replacing Data
.
-.TH "MEMCACHED_ADD_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_ADD_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_add_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_ANALYZE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_ANALYZE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_analyze \- libmemcached Documentation
.
-.TH "MEMCACHED_APPEND" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_APPEND" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_append \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_APPEND_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_append_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_AUTO" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_AUTO" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_auto \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_BEHAVIOR" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_behavior \- libmemcached Documentation
.
-.TH "MEMCACHED_BEHAVIOR_GET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_behavior_get \- libmemcached Documentation
.
-.TH "MEMCACHED_BEHAVIOR_SET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_behavior_set \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CALLBACK" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_callback \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_GET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CALLBACK_GET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_callback_get \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_SET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CALLBACK_SET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_callback_set \- libmemcached Documentation
.
-.TH "MEMCACHED_CAS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CAS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_cas \- Working with data on the server in an atomic fashion
.
-.TH "MEMCACHED_CAS_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CAS_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_cas_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_CLONE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CLONE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_clone \- libmemcached Documentation
.
-.TH "MEMCACHED_CREATE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_CREATE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_create \- libmemcached Documentation
.
-.TH "MEMCACHED_DECREMENT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DECREMENT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_decrement \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_decrement_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DELETE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DELETE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_delete \- libmemcached Documentation
.
-.TH "MEMCACHED_DELETE_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_delete_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_destroy_sasl_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_DUMP" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_DUMP" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_dump \- libmemcached Documentation
.
-.TH "MEMCACHED_EXIST" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_EXIST" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_exist \- libmemcached Documentation
.
-.TH "MEMCACHED_EXIST_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_EXIST_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_exist_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_FETCH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FETCH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_fetch \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_EXECUTE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_fetch_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_RESULT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FETCH_RESULT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_fetch_result \- Retrieving data from the server
.
-.TH "MEMCACHED_FLUSH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FLUSH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_flush \- libmemcached Documentation
.
-.TH "MEMCACHED_FLUSH_BUFFERS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_flush_buffers \- libmemcached Documentation
.
-.TH "MEMCACHED_FREE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_FREE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_free \- libmemcached Documentation
.
-.TH "MEMCACHED_GENERATE_HASH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_generate_hash \- Generating hash values directly
.
-.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_generate_hash_value \- Generating hash values directly
.
-.TH "MEMCACHED_GET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_get \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GET_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_get_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_get_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_get_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_USER_DATA" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_GET_USER_DATA" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_get_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_INCREMENT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_INCREMENT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_increment \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_increment_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_LAST_ERROR_MESSAGE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_LAST_ERROR_MESSAGE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_last_error_message \- libmemcached Documentation
.
-.TH "MEMCACHED_LIB_VERSION" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_LIB_VERSION" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_lib_version \- libmemcached Documentation
.
-.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_MGET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_MGET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_mget \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_MGET_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_mget_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_mget_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_mget_execute_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_POOL" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_behavior_get \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_behavior_set \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_CREATE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_CREATE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_create \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_DESTROY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_DESTROY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_destroy \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_FETCH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_FETCH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_fetch \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_POP" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_POP" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_pop \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_PUSH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_PUSH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_push \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_RELEASE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_RELEASE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_release \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_ST" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_POOL_ST" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_pool_st \- libmemcached Documentation
.
-.TH "MEMCACHED_PREPEND" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_PREPEND" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_prepend \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_PREPEND_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_prepend_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_QUIT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_QUIT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_quit \- libmemcached Documentation
.
-.TH "MEMCACHED_REPLACE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_REPLACE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_replace \- Storing and Replacing Data
.
-.TH "MEMCACHED_REPLACE_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_replace_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_RESULT_CAS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_CAS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_cas \- Working with result sets
.
-.TH "MEMCACHED_RESULT_CREATE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_CREATE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_create \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FLAGS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_FLAGS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_flags \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FREE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_FREE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_free \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_key_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_key_value \- Working with result sets
.
-.TH "MEMCACHED_RESULT_LENGTH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_LENGTH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_ST" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_ST" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_st \- Working with result sets
.
-.TH "MEMCACHED_RESULT_VALUE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RESULT_VALUE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_result_value \- Working with result sets
.
-.TH "MEMCACHED_RETURN_T" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_RETURN_T" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_return_t \- Return type values
.
-.TH "MEMCACHED_SASL" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SASL" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_sasl \- libmemcached Documentation
.
-.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_sasl_set_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_add \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_add_unix_socket \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_COUNT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_COUNT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_CURSOR" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_CURSOR" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_cursor \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_list \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_list_append \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_list_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_FREE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_list_free \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_PUSH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_PUSH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_push \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ST" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVER_ST" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_server_st \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVERS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_servers \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_PARSE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVERS_PARSE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_servers_parse \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_RESET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SERVERS_RESET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_servers_reset \- libmemcached Documentation
.
-.TH "MEMCACHED_SET" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_ENCODING_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_ENCODING_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_encoding_key \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_memory_allocators_context \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_USER_DATA" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_SET_USER_DATA" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_set_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STAT" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stat \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_EXECUTE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STAT_EXECUTE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stat_execute \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_KEYS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stat_get_keys \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_VALUE" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stat_get_value \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_SERVERNAME" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stat_servername \- libmemcached Documentation
.
-.TH "MEMCACHED_STATS" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STATS" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_stats \- libmemcached Documentation
.
-.TH "MEMCACHED_STRERROR" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_STRERROR" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_strerror \- libmemcached Documentation
.
-.TH "MEMCACHED_TOUCH" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_TOUCH" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_touch \- libmemcached Documentation
.
-.TH "MEMCACHED_TOUCH_BY_KEY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_TOUCH_BY_KEY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_touch_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_USER_DATA" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_USER_DATA" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_VERBOSITY" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_VERBOSITY" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_verbosity \- libmemcached Documentation
.
-.TH "MEMCACHED_VERSION" "3" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCACHED_VERSION" "3" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcached_version \- libmemcached Documentation
.
-.TH "MEMCAPABLE" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCAPABLE" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcapable \- libmemcached Documentation
.
-.TH "MEMCAT" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCAT" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcat \- libmemcached Documentation
.
-.TH "MEMCP" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMCP" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memcp \- libmemcached Documentation
.
-.TH "MEMDUMP" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMDUMP" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memdump \- libmemcached Documentation
.
-.TH "MEMERROR" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMERROR" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memerror \- libmemcached Documentation
.
-.TH "MEMEXIST" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMEXIST" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memexist \- libmemcached Documentation
.
-.TH "MEMFLUSH" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMFLUSH" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memflush \- libmemcached Documentation
.
-.TH "MEMPARSE" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMPARSE" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memparse \- libmemcached Documentation
.
-.TH "MEMPING" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMPING" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memping \- libmemcached Documentation
.
-.TH "MEMRM" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMRM" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memrm \- libmemcached Documentation
.
-.TH "MEMSLAP" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMSLAP" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memslap \- libmemcached Documentation
.
-.TH "MEMSTAT" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMSTAT" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memstat \- libmemcached Documentation
.
-.TH "MEMTOUCH" "1" "July 31, 2012" "1.0.10" "libmemcached"
+.TH "MEMTOUCH" "1" "August 02, 2012" "1.0.10" "libmemcached"
.SH NAME
memtouch \- libmemcached Documentation
.
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->create(world_create);
world->destroy(world_destroy);
int error= setsockopt(server->fd, SOL_SOCKET, SO_SNDTIMEO,
&waittime, (socklen_t)sizeof(struct timeval));
+ (void)(error);
assert(error == 0);
}
#endif
int error= setsockopt(server->fd, SOL_SOCKET, SO_RCVTIMEO,
&waittime, (socklen_t)sizeof(struct timeval));
+ (void)(error);
assert(error == 0);
}
#endif
linger.l_linger= 0; /* By default on close() just drop the socket */
int error= setsockopt(server->fd, SOL_SOCKET, SO_LINGER,
&linger, (socklen_t)sizeof(struct linger));
+ (void)(error);
assert(error == 0);
}
int error= setsockopt(server->fd, IPPROTO_TCP, TCP_NODELAY,
&flag, (socklen_t)sizeof(int));
+ (void)(error);
assert(error == 0);
}
int error= setsockopt(server->fd, SOL_SOCKET, SO_KEEPALIVE,
&flag, (socklen_t)sizeof(int));
+ (void)(error);
assert(error == 0);
}
{
int error= setsockopt(server->fd, IPPROTO_TCP, TCP_KEEPIDLE,
&server->root->tcp_keepidle, (socklen_t)sizeof(int));
+ (void)(error);
assert(error == 0);
}
#endif
{
int error= setsockopt(server->fd, SOL_SOCKET, SO_SNDBUF,
&server->root->send_size, (socklen_t)sizeof(int));
+ (void)(error);
assert(error == 0);
}
{
int error= setsockopt(server->fd, SOL_SOCKET, SO_RCVBUF,
&server->root->recv_size, (socklen_t)sizeof(int));
+ (void)(error);
assert(error == 0);
}
#include <sys/types.h>
#include <unistd.h>
+#include <algorithm>
+
#ifndef __USE_GNU
static char **environ= NULL;
#endif
namespace {
- std::string print_argv(char * * & built_argv, const size_t& argc)
+ std::string print_argv(libtest::vchar_ptr_t& built_argv)
{
std::stringstream arg_buffer;
- for (size_t x= 0; x < argc; ++x)
+ for (vchar_ptr_t::iterator iter= built_argv.begin();
+ iter == built_argv.end();
+ iter++)
{
- arg_buffer << built_argv[x] << " ";
+ arg_buffer << *iter << " ";
}
return arg_buffer.str();
stdin_fd(STDIN_FILENO),
stdout_fd(STDOUT_FILENO),
stderr_fd(STDERR_FILENO),
- built_argv(NULL),
_pid(-1)
{
if (_use_libtool)
}
else
{
+
if (_use_libtool)
{
- spawn_ret= posix_spawn(&_pid, built_argv[0], &file_actions, &spawnattr, built_argv, NULL);
+ spawn_ret= posix_spawn(&_pid, built_argv[0], &file_actions, &spawnattr, &built_argv[0], NULL);
}
else
{
- spawn_ret= posix_spawnp(&_pid, built_argv[0], &file_actions, &spawnattr, built_argv, NULL);
+ spawn_ret= posix_spawnp(&_pid, built_argv[0], &file_actions, &spawnattr, &built_argv[0], NULL);
}
}
return exit_code;
}
+Application::error_t Application::join()
+{
+ if (_pid == -1)
+ {
+ return Application::INVALID;
+ }
+
+ slurp();
+
+ error_t exit_code= FAILURE;
+ {
+ int status= 0;
+ pid_t waited_pid;
+ do {
+ waited_pid= waitpid(_pid, &status, 0);
+ } while (waited_pid == -1 and (errno == EINTR or errno == EAGAIN));
+
+ if (waited_pid == -1)
+ {
+ switch (errno)
+ {
+ case ECHILD:
+ exit_code= Application::SUCCESS;
+ break;
+
+ case EINTR:
+ break;
+
+ default:
+ Error << "Error occured while waitpid(" << strerror(errno) << ") on pid " << int(_pid);
+ break;
+ }
+ }
+ else if (waited_pid == 0)
+ {
+ exit_code= Application::SUCCESS;
+ }
+ else
+ {
+ if (waited_pid != _pid)
+ {
+ throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "Pid mismatch, %d != %d", int(waited_pid), int(_pid));
+ }
+
+ exit_code= int_to_error_t(exited_successfully(status));
+ }
+ }
+
+ slurp();
+
+#if 0
+ if (exit_code == Application::INVALID)
+ {
+ Error << print_argv(built_argv, _argc);
+ }
+#endif
+
+ return exit_code;
+}
+
void Application::add_long_option(const std::string& name, const std::string& option_value)
{
std::string arg(name);
data_was_read= true;
arg.reserve(read_length +1);
- for (size_t x= 0; x < read_length; ++x)
+ for (size_t x= 0; x < size_t(read_length); ++x)
{
arg.push_back(buffer[x]);
}
void Application::create_argv(const char *args[])
{
delete_argv();
- fatal_assert(_argc == 0);
-
- if (_use_libtool)
- {
- _argc+= 2; // +2 for libtool --mode=execute
- }
-
- _argc+= 1; // For the command
-
- /*
- valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --track-origin=yes --malloc-fill=A5 --free-fill=DE --log-file=
- */
- if (_use_valgrind)
- {
- _argc+= 8;
- }
- else if (_use_ptrcheck)
- {
- /*
- valgrind --error-exitcode=1 --tool=exp-ptrcheck --log-file=
- */
- _argc+= 4;
- }
- else if (_use_gdb) // gdb
- {
- _argc+= 1;
- }
-
- for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter)
- {
- _argc++;
- if ((*iter).second.empty() == false)
- {
- _argc++;
- }
- }
-
- if (args)
- {
- for (const char **ptr= args; *ptr; ++ptr)
- {
- _argc++;
- }
- }
-
- _argc+= 1; // for the NULL
-
- built_argv= new char * [_argc];
-
- size_t x= 0;
if (_use_libtool)
{
assert(libtool());
- built_argv[x++]= strdup(libtool());
- built_argv[x++]= strdup("--mode=execute");
+ built_argv.push_back(strdup(libtool()));
+ built_argv.push_back(strdup("--mode=execute"));
}
if (_use_valgrind)
/*
valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
*/
- built_argv[x++]= strdup("valgrind");
- built_argv[x++]= strdup("--error-exitcode=1");
- built_argv[x++]= strdup("--leak-check=yes");
- built_argv[x++]= strdup("--show-reachable=yes");
- built_argv[x++]= strdup("--track-fds=yes");
+ built_argv.push_back(strdup("valgrind"));
+ built_argv.push_back(strdup("--error-exitcode=1"));
+ built_argv.push_back(strdup("--leak-check=yes"));
+ built_argv.push_back(strdup("--show-reachable=yes"));
+ built_argv.push_back(strdup("--track-fds=yes"));
#if 0
built_argv[x++]= strdup("--track-origin=yes");
#endif
- built_argv[x++]= strdup("--malloc-fill=A5");
- built_argv[x++]= strdup("--free-fill=DE");
+ built_argv.push_back(strdup("--malloc-fill=A5"));
+ built_argv.push_back(strdup("--free-fill=DE"));
std::string log_file= create_tmpfile("valgrind");
char buffer[1024];
int length= snprintf(buffer, sizeof(buffer), "--log-file=%s", log_file.c_str());
- fatal_assert(length > 0 and length < sizeof(buffer));
- built_argv[x++]= strdup(buffer);
+ fatal_assert(length > 0 and size_t(length) < sizeof(buffer));
+ built_argv.push_back(strdup(buffer));
}
else if (_use_ptrcheck)
{
/*
valgrind --error-exitcode=1 --tool=exp-ptrcheck --log-file=
*/
- built_argv[x++]= strdup("valgrind");
- built_argv[x++]= strdup("--error-exitcode=1");
- built_argv[x++]= strdup("--tool=exp-ptrcheck");
- _argc+= 4;
+ built_argv.push_back(strdup("valgrind"));
+ built_argv.push_back(strdup("--error-exitcode=1"));
+ built_argv.push_back(strdup("--tool=exp-ptrcheck"));
std::string log_file= create_tmpfile("ptrcheck");
char buffer[1024];
int length= snprintf(buffer, sizeof(buffer), "--log-file=%s", log_file.c_str());
- fatal_assert(length > 0 and length < sizeof(buffer));
- built_argv[x++]= strdup(buffer);
+ fatal_assert(length > 0 and size_t(length) < sizeof(buffer));
+ built_argv.push_back(strdup(buffer));
}
else if (_use_gdb)
{
- built_argv[x++]= strdup("gdb");
+ built_argv.push_back(strdup("gdb"));
}
- built_argv[x++]= strdup(_exectuble_with_path.c_str());
+ built_argv.push_back(strdup(_exectuble_with_path.c_str()));
for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter)
{
- built_argv[x++]= strdup((*iter).first.c_str());
+ built_argv.push_back(strdup((*iter).first.c_str()));
if ((*iter).second.empty() == false)
{
- built_argv[x++]= strdup((*iter).second.c_str());
+ built_argv.push_back(strdup((*iter).second.c_str()));
}
}
{
for (const char **ptr= args; *ptr; ++ptr)
{
- built_argv[x++]= strdup(*ptr);
+ built_argv.push_back(strdup(*ptr));
}
}
- built_argv[x++]= NULL;
- fatal_assert(x == _argc);
+ built_argv.push_back(NULL);
}
std::string Application::print()
{
- return print_argv(built_argv, _argc);
+ return print_argv(built_argv);
}
std::string Application::arguments()
return arg_buffer.str();
}
-void Application::delete_argv()
+struct DeleteFromVector
{
- if (built_argv)
- {
- for (size_t x= 0; x < _argc; ++x)
+ template <class T>
+ void operator() ( T* ptr) const
{
- if (built_argv[x])
- {
- ::free(built_argv[x]);
- }
+ free(ptr);
}
- delete[] built_argv;
- built_argv= NULL;
- _argc= 0;
- }
+};
+
+void Application::delete_argv()
+{
+ std::for_each(built_argv.begin(), built_argv.end(), DeleteFromVector());
+
+ built_argv.clear();
+ _argc= 0;
}
return int(ret);
}
- return int(app.wait(false));
+ return int(app.join());
}
const char *gearmand_binary()
INVALID= 127
};
+ static const char* toString(error_t arg)
+ {
+ switch (arg)
+ {
+ case Application::SUCCESS:
+ return "EXIT_SUCCESS";
+
+ case Application::FAILURE:
+ return "EXIT_FAILURE";
+
+ case Application::INVALID:
+ return "127";
+
+ default:
+ break;
+ }
+
+ return "EXIT_UNKNOWN";
+ }
+
class Pipe {
public:
Pipe(int);
void add_long_option(const std::string& option_name, const std::string& option_value);
error_t run(const char *args[]= NULL);
error_t wait(bool nohang= true);
+ Application::error_t join();
libtest::vchar_t stdout_result() const
{
Pipe stdin_fd;
Pipe stdout_fd;
Pipe stderr_fd;
- char * * built_argv;
+ libtest::vchar_ptr_t built_argv;
pid_t _pid;
libtest::vchar_t _stdout_buffer;
libtest::vchar_t _stderr_buffer;
static inline std::ostream& operator<<(std::ostream& output, const enum Application::error_t &arg)
{
- switch (arg)
- {
- case Application::SUCCESS:
- output << "EXIT_SUCCESS";
- break;
-
- case Application::FAILURE:
- output << "EXIT_FAILURE";
- break;
-
- case Application::INVALID:
- output << "127";
- break;
-
- default:
- output << "EXIT_UNKNOWN";
- }
-
- return output;
+ return output << Application::toString(arg);
}
int exec_cmdline(const std::string& executable, const char *args[], bool use_libtool= false);
#include <libtest/common.h>
-static test_return_t runner_code(Framework* frame,
+static test_return_t runner_code(libtest::Framework* frame,
test_st* run,
libtest::Timer& _timer)
{ // Runner Code
_success(0),
_skipped(0),
_failed(0),
- _total(0)
+ _total(0),
+ _formatter(_name)
{
fatal_assert(arg);
}
test_return_t Collection::exec()
{
- Out << "Collection: " << _name;
-
if (test_success(_frame->runner()->pre(_pre, _frame->creators_ptr())))
{
for (test_st *run= _tests; run->name; run++)
{
+ formatter()->push_testcase(run->name);
if (_frame->match(run->name))
{
+ formatter()->skipped();
continue;
}
_total++;
{
Error << "frame->runner()->flush(creators_ptr)";
_skipped++;
+ formatter()->skipped();
continue;
}
}
{
stream::cerr(e.file(), e.line(), e.func()) << e.what();
_failed++;
+ formatter()->failed();
throw;
}
switch (return_code)
{
case TEST_SUCCESS:
- Out << "\tTesting "
- << run->name
- << "\t\t\t\t\t"
- << _timer
- << " [ " << test_strerror(return_code) << " ]";
_success++;
+ formatter()->success(_timer);
break;
case TEST_FAILURE:
_failed++;
- Out << "\tTesting " << run->name << "\t\t\t\t\t" << "[ " << test_strerror(return_code) << " ]";
+ formatter()->failed();
break;
case TEST_SKIPPED:
_skipped++;
- Out << "\tTesting " << run->name << "\t\t\t\t\t" << "[ " << test_strerror(return_code) << " ]";
+ formatter()->skipped();
break;
default:
#pragma once
+#include <libtest/formatter.hpp>
+
#include <libtest/timer.hpp>
-class Framework;
+namespace { class Framework; }
+
/**
A structure which describes a collection of test cases.
class Collection {
public:
- Collection(Framework*, collection_st*);
+ Collection(libtest::Framework*, collection_st*);
test_return_t exec();
const char* name()
{
- return _name;
+ return _name.c_str();
}
uint32_t success()
return _total;
}
+ libtest::Formatter* formatter()
+ {
+ return &_formatter;
+ }
+
private:
- const char *_name;
+ std::string _name;
test_callback_fn *_pre;
test_callback_fn *_post;
struct test_st *_tests;
- Framework* _frame;
+ libtest::Framework* _frame;
uint32_t _success;
uint32_t _skipped;
uint32_t _failed;
uint32_t _total;
libtest::Timer _timer;
+ libtest::Formatter _formatter;
};
} // namespace libtest
#include <libtest/killpid.h>
#include <libtest/signal.h>
#include <libtest/dns.hpp>
+#include <libtest/formatter.hpp>
namespace libtest {
bool ping_drizzled(const in_port_t _port)
{
+ (void)(_port);
#if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE
{
drizzle_st *drizzle= drizzle_create(NULL);
return "drizzled";
};
- void log_file_option(Application& app, const std::string& arg)
+ void log_file_option(Application&, const std::string&)
{
}
}
disconnected::disconnected(const char *file_arg, int line_arg, const char *func_arg,
- const char *instance, const in_port_t port,
+ const std::string& instance, const in_port_t port,
const char *format, ...) :
std::runtime_error(func_arg),
_port(port),
_file(file_arg),
_func(func_arg)
{
- strncpy(_instance, instance, sizeof(_instance));
va_list args;
va_start(args, format);
char last_error[BUFSIZ];
(void)vsnprintf(last_error, sizeof(last_error), format, args);
va_end(args);
- snprintf(_error_message, sizeof(_error_message), "%s", last_error);
+ snprintf(_error_message, sizeof(_error_message), "%s:%u %s", instance.c_str(), uint32_t(port), last_error);
}
} // namespace libtest
class disconnected : std::runtime_error
{
public:
- disconnected(const char *file, int line, const char *func, const char *instance, const in_port_t port, const char *format, ...);
+ disconnected(const char *file, int line, const char *func, const std::string&, const in_port_t port, const char *format, ...);
const char* what() const throw()
{
#include <fnmatch.h>
#include <iostream>
-using namespace libtest;
+namespace libtest {
Framework::Framework(libtest::SignalThread& signal,
+ const std::string& name_,
const std::string& only_run_arg,
const std::string& wildcard_arg) :
- _collections(NULL),
_total(0),
_success(0),
_skipped(0),
_creators_ptr(NULL),
_signal(signal),
_only_run(only_run_arg),
- _wildcard(wildcard_arg)
+ _wildcard(wildcard_arg),
+ _name(name_)
{
get_world(this);
+}
- for (collection_st *next= _collections; next and next->name; next++)
+void Framework::collections(collection_st* collections_)
+{
+ for (collection_st *next= collections_; next and next->name; next++)
{
_collection.push_back(new Collection(this, next));
}
_failed++;
throw;
}
-
- Outn();
}
+
+ void xml(const std::string& testsuites_name, std::ostream& output);
}
uint32_t Framework::sum_total()
return rc;
}
+
+} // namespace libtest
#include <vector>
+namespace { class Collection; }
+typedef std::vector<libtest::Collection*> Suites;
+
+namespace libtest {
+
class Framework {
public:
public:
test_return_t create();
+ const std::string& name() const
+ {
+ return _name;
+ }
+
void create(test_callback_create_fn* arg)
{
_create= arg;
_destroy= arg;
}
- void collections(collection_st* arg)
- {
- _collections= arg;
- }
+ void collections(collection_st* arg);
void set_on_error(test_callback_error_fn *arg)
{
libtest::Collection& collection();
- Framework(libtest::SignalThread&, const std::string&);
-
virtual ~Framework();
Framework(libtest::SignalThread&,
+ const std::string&,
const std::string&,
const std::string&);
return _failed;
}
+ Suites& suites()
+ {
+ return _collection;
+ }
+
private:
Framework& operator=(const Framework&);
- collection_st *_collections;
-
uint32_t _total;
uint32_t _success;
uint32_t _skipped;
bool _socket;
void *_creators_ptr;
unsigned long int _servers_to_run;
- std::vector<libtest::Collection*> _collection;
+ Suites _collection;
libtest::SignalThread& _signal;
std::string _only_run;
std::string _wildcard;
+ std::string _name;
};
+
+} // namespace libtest
if (out_of_ban_killed() == false)
{
- Error << hostname().c_str() << ":" << port() << " was " << gearman_strerror(rc) << " extended: " << gearman_client_error(client);
+ Error << hostname().c_str() << ":" << port() << " " << gearman_client_error(client);
}
}
else
/* How we make all of this work :) */
LIBTEST_API
- void get_world(Framework *world);
+ void get_world(libtest::Framework *world);
#ifdef __cplusplus
}
bool has_postgres_support(void)
{
- if (getenv("POSTGES_IS_RUNNING_AND_SETUP"))
+ char *getenv_ptr;
+ if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP"))))
{
+ (void)(getenv_ptr);
if (HAVE_LIBPQ)
{
return true;
{
if (HAVE_GEARMAND_BINARY)
{
+#if defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY
std::stringstream arg_buffer;
- if (getenv("PWD") and strcmp(MEMCACHED_BINARY, "gearmand/gearmand") == 0)
+ char *getenv_ptr;
+ if (bool((getenv_ptr= getenv("PWD"))) and
+ ((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0)))
{
- arg_buffer << getenv("PWD");
+ arg_buffer << getenv_ptr;
arg_buffer << "/";
}
arg_buffer << GEARMAND_BINARY;
{
return true;
}
+#endif
}
return false;
bool has_drizzled()
{
+#if defined(HAVE_DRIZZLED_BINARY) && HAVE_DRIZZLED_BINARY
if (HAVE_DRIZZLED_BINARY)
{
if (access(DRIZZLED_BINARY, X_OK) == 0)
return true;
}
}
+#endif
return false;
}
bool has_mysqld()
{
+#if defined(HAVE_MYSQLD_BUILD) && HAVE_MYSQLD_BUILD
if (HAVE_MYSQLD_BUILD)
{
if (access(MYSQLD_BINARY, X_OK) == 0)
return true;
}
}
+#endif
return false;
}
{
std::stringstream arg_buffer;
- if (getenv("PWD") and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0)
+
+ char *getenv_ptr;
+ if (bool((getenv_ptr= getenv("PWD"))) and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0)
{
- arg_buffer << getenv("PWD");
+ arg_buffer << getenv_ptr;
arg_buffer << "/";
}
arg_buffer << MEMCACHED_BINARY;
static void init(CURL *curl, const std::string& url)
{
+ (void)curl;
+ (void)url;
if (HAVE_LIBCURL)
{
#if defined(HAVE_LIBCURL) && HAVE_LIBCURL
#pragma once
+#include <libtest/vchar.hpp>
+
namespace libtest {
namespace http {
VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND)
HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd
+MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif
GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb
PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1
CLEANFILES+= tmp_chroot/var/log/*
CLEANFILES+= tmp_chroot/var/run/*
CLEANFILES+= tmp_chroot/var/tmp/*
+CLEANFILES+= tmp_chroot/*.xml
BUILT_SOURCES+= libtest/version.h
distclean-libtest-check:
-rm -rf tmp_chroot
+noinst_HEADERS+= libtest/formatter.hpp
noinst_HEADERS+= libtest/timer.hpp
noinst_HEADERS+= libtest/binaries.h
noinst_HEADERS+= libtest/cpu.hpp
libtest_libtest_la_SOURCES+= libtest/cpu.cc
libtest_libtest_la_SOURCES+= libtest/dream.cc
libtest_libtest_la_SOURCES+= libtest/fatal.cc
+libtest_libtest_la_SOURCES+= libtest/formatter.cc
libtest_libtest_la_SOURCES+= libtest/framework.cc
libtest_libtest_la_SOURCES+= libtest/has.cc
libtest_libtest_la_SOURCES+= libtest/drizzled.cc
@libtest/unittest
valgrind-unittest: libtest/unittest
- @$(VALGRIND_COMMAND) libtest/unittest TESTS_ENVIRONMENT="valgrind"
+ @$(VALGRIND_COMMAND) libtest/unittest
gdb-unittest: libtest/unittest
@$(GDB_COMMAND) libtest/unittest
#include <ctime>
#include <fnmatch.h>
#include <iostream>
+#include <fstream>
#include <memory>
#include <sys/stat.h>
#include <sys/time.h>
using namespace libtest;
-static void stats_print(Framework *frame)
+static void stats_print(libtest::Framework *frame)
{
if (frame->failed() == 0 and frame->success() == 0)
{
bool opt_quiet= false;
std::string collection_to_run;
std::string wildcard;
+ std::string binary_name;
+
+ const char *just_filename= rindex(argv[0], '/');
+ if (just_filename)
+ {
+ just_filename++;
+ }
+ else
+ {
+ just_filename= argv[0];
+ }
+
+ if (just_filename[0] == 'l' and just_filename[1] == 't' and just_filename[2] == '-')
+ {
+ just_filename+= 3;
+ }
+ binary_name.append(just_filename);
/*
Valgrind does not currently work reliably, or sometimes at all, on OSX
return EXIT_FAILURE;
}
- std::auto_ptr<Framework> frame(new Framework(signal, collection_to_run, wildcard));
+ std::auto_ptr<libtest::Framework> frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard));
// Run create(), bail on error.
{
}
else if (frame->success() and (frame->failed() == 0))
{
+ Out;
Out << "All tests completed successfully.";
}
stats_print(frame.get());
+ std::ofstream xml_file;
+ std::string file_name;
+ if (getenv("LIBTEST_TEMP"))
+ {
+ file_name.append(getenv("LIBTEST_TEMP"));
+ }
+ file_name.append(frame->name());
+ file_name.append(".xml");
+ xml_file.open(file_name.c_str(), std::ios::trunc);
+ libtest::Formatter::xml(*frame, xml_file);
+
Outn(); // Generate a blank to break up the messages if make check/test has been run
} while (exit_code == EXIT_SUCCESS and --opt_repeat);
}
add_option(sasl());
}
- for (int x= 0 ; x < argc ; x++)
+ for (size_t x= 0 ; x < argc ; x++)
{
add_option(argv[x]);
}
#pragma once
+#define LIBTEST_FAIL_PORT 23
+
namespace libtest {
LIBTEST_API
}
#endif
+ if (port() == LIBTEST_FAIL_PORT)
+ {
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(), "Called failure");
+ }
+
if (getenv("YATL_PTRCHECK_SERVER"))
{
_app.use_ptrcheck();
if (args(_app) == false)
{
- Error << "Could not build command()";
- return false;
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(), "Could not build command()");
}
libtest::release_port(_port);
Application::error_t ret;
if (Application::SUCCESS != (ret= _app.run()))
{
- Error << "Application::run() " << ret;
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(), "Application::run() %s", libtest::Application::toString(ret));
return false;
}
_running= _app.print();
char buf[PATH_MAX];
char *getcwd_buf= getcwd(buf, sizeof(buf));
- throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
- "Unable to open pidfile in %s for: %s stderr:%s",
- getcwd_buf ? getcwd_buf : "",
- _running.c_str(),
- _app.stderr_c_str());
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(),
+ "Unable to open pidfile in %s for: %s stderr:%s",
+ getcwd_buf ? getcwd_buf : "",
+ _running.c_str(),
+ _app.stderr_c_str());
}
}
}
uint32_t waited;
uint32_t retry;
- for (waited= 0, retry= 1; ; retry++, waited+= this_wait)
+ for (waited= 0, retry= 4; ; retry++, waited+= this_wait)
{
if ((pinged= ping()) == true)
{
_app.slurp();
if (kill_file(pid_file()) == false)
{
- libtest::fatal err(LIBYATL_DEFAULT_PARAM,
- "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %.*s stderr:%.*s",
- this_wait,
- int(_running.size()), _running.c_str(),
- int(_app.stderr_result_length()), _app.stderr_c_str());
-
- stream::cerr(err.file(), err.line(), err.func()) << err.what();
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(),
+ "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %.*s stderr:%.*s",
+ this_wait,
+ int(_running.size()), _running.c_str(),
+ int(_app.stderr_result_length()), _app.stderr_c_str());
}
else
{
- libtest::fatal err(LIBYATL_DEFAULT_PARAM,
- "Failed native ping(), pid: %d was alive: %s waited: %u server started, having pid_file. exec: %.*s stderr:%.*s",
- int(_app.pid()),
- _app.check() ? "true" : "false",
- this_wait,
- int(_running.size()), _running.c_str(),
- int(_app.stderr_result_length()), _app.stderr_c_str());
-
- stream::cerr(err.file(), err.line(), err.func()) << err.what();
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(),
+ "Failed native ping(), pid: %d was alive: %s waited: %u server started, having pid_file. exec: %.*s stderr:%.*s",
+ int(_app.pid()),
+ _app.check() ? "true" : "false",
+ this_wait,
+ int(_running.size()), _running.c_str(),
+ int(_app.stderr_result_length()), _app.stderr_c_str());
}
}
else
{
- libtest::fatal err(LIBYATL_DEFAULT_PARAM,
- "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %.*s stderr:%.*s",
- int(_app.pid()),
- _app.check() ? "true" : "false",
- this_wait,
- int(_running.size()), _running.c_str(),
- int(_app.stderr_result_length()), _app.stderr_c_str());
-
- stream::cerr(err.file(), err.line(), err.func()) << err.what();
+ throw libtest::disconnected(LIBYATL_DEFAULT_PARAM,
+ hostname(), port(),
+ "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %.*s stderr:%.*s",
+ int(_app.pid()),
+ _app.check() ? "true" : "false",
+ this_wait,
+ int(_running.size()), _running.c_str(),
+ int(_app.stderr_result_length()), _app.stderr_c_str());
}
_running.clear();
+
return false;
}
}
}
}
+ catch (libtest::disconnected err)
+ {
+ stream::cerr(err.file(), err.line(), err.func()) << err.what();
+ delete server;
+ return false;
+ }
catch (...)
{
delete server;
return NULL;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework *world)
{
world->create(world_create);
}
#define test_zero(__actual) \
do \
{ \
- if (not libtest::_compare_zero(__FILE__, __LINE__, __func__, ((__actual)))) \
+ if (libtest::_compare_zero(__FILE__, __LINE__, __func__, ((__actual))) == false) \
{ \
libtest::create_core(); \
return TEST_FAILURE; \
test_skip(true, has_drizzled());
- test_true(server_startup(*servers, "drizzled", get_free_port(), 0, NULL));
+ test_skip(true, server_startup(*servers, "drizzled", get_free_port(), 0, NULL));
return TEST_SUCCESS;
}
test_skip(true, has_gearmand());
- test_true(server_startup(*servers, "gearmand", get_free_port(), 0, NULL));
+ test_skip(true, server_startup(*servers, "gearmand", get_free_port(), 0, NULL));
return TEST_SUCCESS;
}
+#if 0
static test_return_t memcached_light_cycle_TEST(void *object)
{
server_startup_st *servers= (server_startup_st*)object;
return TEST_SUCCESS;
}
+#endif
static test_return_t skip_shim(bool a, bool b)
{
return TEST_SUCCESS;
}
-static test_return_t test_skip_true_TEST(void *object)
+static test_return_t test_skip_true_TEST(void*)
{
test_compare(true, true);
test_compare(false, false);
return TEST_SUCCESS;
}
-static test_return_t test_skip_false_TEST(void *object)
+static test_return_t test_skip_false_TEST(void*)
{
test_compare(TEST_SKIPPED, skip_shim(true, false));
test_compare(TEST_SKIPPED, skip_shim(false, true));
return TEST_SUCCESS;
}
+static test_return_t server_startup_fail_TEST(void *object)
+{
+ server_startup_st *servers= (server_startup_st*)object;
+ test_true(servers);
+
+ test_compare(servers->start_server(testing_service, LIBTEST_FAIL_PORT, 0, NULL, true), false);
+
+ return TEST_SUCCESS;
+}
+
static test_return_t server_startup_TEST(void *object)
{
server_startup_st *servers= (server_startup_st*)object;
return TEST_SUCCESS;
}
+#if 0
static test_return_t memcached_sasl_test(void *object)
{
server_startup_st *servers= (server_startup_st*)object;
return TEST_SKIPPED;
}
+#endif
static test_return_t application_true_BINARY(void *)
{
const char *args[]= { "--fubar", 0 };
test_compare(Application::SUCCESS, true_app.run(args));
test_compare(Application::SUCCESS, true_app.wait());
- test_compare(0, true_app.stdout_result().size());
+ test_zero(true_app.stdout_result().size());
return TEST_SUCCESS;
}
test_compare(Application::INVALID, true_app.wait(false));
#endif
- test_compare(0, true_app.stdout_result().size());
+ test_zero(true_app.stdout_result().size());
return TEST_SUCCESS;
}
const char *args[]= { "--fubar=doh", 0 };
test_compare(Application::SUCCESS, true_app.run(args));
test_compare(Application::SUCCESS, true_app.wait());
- test_compare(0, true_app.stdout_result().size());
+ test_zero(true_app.stdout_result().size());
return TEST_SUCCESS;
}
test_compare(Application::SUCCESS, true_app.run());
test_compare(Application::SUCCESS, true_app.wait());
- test_compare(0, true_app.stdout_result().size());
+ test_zero(true_app.stdout_result().size());
return TEST_SUCCESS;
}
true_app.add_option("fubar");
test_compare(Application::SUCCESS, true_app.run());
- test_compare(Application::SUCCESS, true_app.wait(false));
+ test_compare(Application::SUCCESS, true_app.join());
libtest::vchar_t response;
make_vector(response, test_literal_param("fubar\n"));
Application touch_app("touch");
const char *args[]= { tmp.c_str(), 0 };
test_compare(Application::SUCCESS, touch_app.run(args));
- test_compare(Application::SUCCESS, touch_app.wait(false));
+ test_compare(Application::SUCCESS, touch_app.join());
test_compare(0, access(tmp.c_str(), R_OK));
test_compare(0, unlink(tmp.c_str()));
{
test_skip(true, HAVE_LIBGEARMAN);
test_skip(true, has_gearmand());
+
+ testing_service= "gearmand";
+
return TEST_SUCCESS;
}
{
test_skip(true, HAVE_LIBDRIZZLE);
test_skip(true, has_drizzled());
+
+ testing_service= "drizzled";
+
return TEST_SUCCESS;
}
#endif
{"gearmand startup-shutdown", 0, gearmand_cycle_test },
{"_compare(gearman_return_t)", 0, _compare_gearman_return_t_test },
+ {"server_startup(fail)", 0, server_startup_fail_TEST },
{0, 0, 0}
};
{"memcached startup-shutdown", 0, server_startup_TEST },
{"memcached(socket file) startup-shutdown", 0, socket_server_startup_TEST },
{"_compare(memcached_return_t)", 0, _compare_memcached_return_t_test },
+ {"server_startup(fail)", 0, server_startup_fail_TEST },
{0, 0, 0}
};
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework *world)
{
world->collections(collection);
world->create(world_create);
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
using namespace memcache;
using namespace libtest;
-Framework *global_framework= NULL;
+libtest::Framework *global_framework= NULL;
static test_return_t shutdown_servers(memcached_st *memc)
{
#include "tests/libmemcached_world.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->servers().set_servers_to_run(1);
{0, 0, 0, 0}
};
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
}
return TEST_SUCCESS;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
#include <algorithm>
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
if (getenv("LIBMEMCACHED_SERVER_NUMBER"))
{
#include "tests/libmemcached_world_socket.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
#include "tests/libmemcached_world.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
{0, 0, 0, 0}
};
-void get_world(Framework *frame)
+void get_world(libtest::Framework* frame)
{
frame->collections(collection);
}
#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
#include "tests/libmemcached_world.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
#include "tests/libmemcached_world.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
#include "tests/libmemcached_world.h"
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false)
{
- error= TEST_FAILURE;
+ error= TEST_SKIPPED;
}
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
executable= "./clients/memcapable";
world->collections(collection);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false)
{
- error= TEST_FAILURE;
+ error= TEST_SKIPPED;
}
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == 0)
{
- error= TEST_FAILURE;
+ error= TEST_SKIPPED;
}
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
executable= "./clients/memflush";
world->collections(collection);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
executable= "./clients/memslap";
world->collections(collection);
if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false)
{
- error= TEST_FAILURE;
+ error= TEST_SKIPPED;
}
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
world->create(world_create);
if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false)
{
- error= TEST_FAILURE;
+ error= TEST_SKIPPED;
}
return &servers;
}
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
executable= "./clients/memtouch";
world->collections(collection);
{0, 0, 0, 0}
};
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
{
world->collections(collection);
}