summaryrefslogtreecommitdiffstats
path: root/src/tests/cwrap
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-10-24 15:15:39 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-11-11 12:10:45 +0100
commit20a2be57d764f58c4a6532310331e26a3273ada8 (patch)
tree3658c8bce6bb65d3ac3318e5b07cb1bd944ad0dc /src/tests/cwrap
parent9c62d6619b87f1255ef6515280a20552fca9d925 (diff)
downloadsssd-20a2be57d764f58c4a6532310331e26a3273ada8.tar.gz
sssd-20a2be57d764f58c4a6532310331e26a3273ada8.tar.xz
sssd-20a2be57d764f58c4a6532310331e26a3273ada8.zip
TESTS: Check return value of check_leaks_pop
Reviewed-by: Petr Cech <pcech@redhat.com>
Diffstat (limited to 'src/tests/cwrap')
-rw-r--r--src/tests/cwrap/test_become_user.c5
-rw-r--r--src/tests/cwrap/test_responder_common.c6
2 files changed, 6 insertions, 5 deletions
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);
}