From 20a2be57d764f58c4a6532310331e26a3273ada8 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sat, 24 Oct 2015 15:15:39 +0200 Subject: TESTS: Check return value of check_leaks_pop Reviewed-by: Petr Cech --- src/tests/cwrap/test_become_user.c | 5 +++-- src/tests/cwrap/test_responder_common.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/tests/cwrap') diff --git a/src/tests/cwrap/test_become_user.c b/src/tests/cwrap/test_become_user.c index 48e16d4c7..feb688952 100644 --- a/src/tests/cwrap/test_become_user.c +++ b/src/tests/cwrap/test_become_user.c @@ -120,9 +120,10 @@ void test_switch_user(void **state) assert_int_equal(getgid(), 0); talloc_free(saved_creds); - check_leaks_pop(tmp_ctx); + assert_true(check_leaks_pop(tmp_ctx)); talloc_free(tmp_ctx); - check_leaks_pop(global_talloc_context); + + assert_true(check_leaks_pop(global_talloc_context)); assert_true(leak_check_teardown()); } diff --git a/src/tests/cwrap/test_responder_common.c b/src/tests/cwrap/test_responder_common.c index 2c92ff080..024065bc1 100644 --- a/src/tests/cwrap/test_responder_common.c +++ b/src/tests/cwrap/test_responder_common.c @@ -60,7 +60,7 @@ void test_uid_csv_to_uid_list(void **state) assert_int_equal(list[2], 3); talloc_free(list); - check_leaks_pop(tmp_ctx); + assert_true(check_leaks_pop(tmp_ctx)); talloc_free(tmp_ctx); } @@ -83,7 +83,7 @@ void test_name_csv_to_uid_list(void **state) assert_int_equal(list[1], 10001); talloc_free(list); - check_leaks_pop(tmp_ctx); + assert_true(check_leaks_pop(tmp_ctx)); talloc_free(tmp_ctx); } @@ -102,7 +102,7 @@ void test_csv_to_uid_list_neg(void **state) ret = csv_string_to_uid_array(tmp_ctx, "nosuchuser", true, &count, &list); assert_int_not_equal(ret, EOK); - check_leaks_pop(tmp_ctx); + assert_true(check_leaks_pop(tmp_ctx)); talloc_free(tmp_ctx); } -- cgit