The attached patch solves the ticket: https://fedorahosted.org/sssd/ticket/1899
It was not a real leak. The "leaked" bytes were freed, but too late (after the ck_leaks_pop), because the c-ares request can take more time. Thanks Michal
>From 1cd704a94f04f600c89e1a8236f9b5f9f09b308b Mon Sep 17 00:00:00 2001 From: Michal Zidek <mzi...@redhat.com> Date: Mon, 22 Jul 2013 14:30:47 +0200 Subject: [PATCH] resolv-tests failing with memory leak Wait for c-ares to finish before checking for memory leaks. https://fedorahosted.org/sssd/ticket/1899 --- src/tests/resolv-tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/resolv-tests.c b/src/tests/resolv-tests.c index 49fe2a5..a8e4c41 100644 --- a/src/tests/resolv-tests.c +++ b/src/tests/resolv-tests.c @@ -38,7 +38,7 @@ /* Interface under test */ #include "resolv/async_resolv.h" -#define RESOLV_DEFAULT_TIMEOUT 5 +#define RESOLV_DEFAULT_TIMEOUT 6 static int use_net_test; static char *txt_host; @@ -803,7 +803,8 @@ START_TEST(test_resolv_free_req) gettimeofday(&free_tv, NULL); free_tv.tv_sec += 1; free_tv.tv_usec = 0; - terminate_tv.tv_sec = free_tv.tv_sec + 1; + /* Give enought time for c-ares request to terminate */ + terminate_tv.tv_sec = free_tv.tv_sec + 6; terminate_tv.tv_usec = 0; free_timer = tevent_add_timer(test_ctx->ev, test_ctx, free_tv, resolv_free_req, req); @@ -890,6 +891,7 @@ Suite *create_resolv_suite(void) Suite *s = suite_create("resolv"); TCase *tc_resolv = tcase_create("RESOLV Tests"); + tcase_set_timeout(tc_resolv, 8); tcase_add_checked_fixture(tc_resolv, ck_leak_check_setup, ck_leak_check_teardown); /* Do some testing */ -- 1.7.11.2
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel