{0, 0, 0}
};
+test_st kill_TESTS[] ={
+ {"kill(HUP)", 0, (test_callback_fn*)kill_HUP_TEST},
+ {0, 0, 0}
+};
+
test_st memcached_stat_tests[] ={
{"memcached_stat() INVALID ARG", 0, (test_callback_fn*)memcached_stat_TEST},
{"memcached_stat()", 0, (test_callback_fn*)memcached_stat_TEST2},
{"touch", 0, 0, touch_tests},
{"touch", (test_callback_fn*)pre_binary, 0, touch_tests},
{"memcached_stat()", 0, 0, memcached_stat_tests},
+ {"kill()", 0, 0, kill_TESTS},
{0, 0, 0, 0}
};
return TEST_SUCCESS;
}
+
+test_return_t kill_HUP_TEST(memcached_st *original_memc)
+{
+ memcached_st *memc= create_single_instance_memcached(original_memc, 0);
+ test_true(memc);
+
+ memcached_server_instance_st instance= memcached_server_instance_by_position(memc, 0);
+
+ pid_t pid;
+ test_true((pid= libmemcached_util_getpid(memcached_server_name(instance),
+ memcached_server_port(instance), NULL)) > -1);
+
+
+ test_compare(MEMCACHED_SUCCESS,
+ memcached_set(memc,
+ test_literal_param(__func__), // Keys
+ test_literal_param(__func__), // Values
+ 0, 0));
+ test_true_got(kill(pid, SIGHUP) == 0, strerror(errno));
+
+ test_compare(MEMCACHED_SUCCESS,
+ memcached_set(memc,
+ test_literal_param(__func__), // Keys
+ test_literal_param(__func__), // Values
+ 0, 0));
+
+ return TEST_SUCCESS;
+}
test_return_t version_string_test(memcached_st *);
test_return_t wrong_failure_counter_test(memcached_st *memc);
test_return_t wrong_failure_counter_two_test(memcached_st *memc);
+test_return_t kill_HUP_TEST(memcached_st *memc);