diff options
author | Petr Cech <pcech@redhat.com> | 2016-04-11 00:26:19 -0400 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-04-12 10:04:59 +0200 |
commit | 2a5cf841dec2785333117a293fcd8c875ace28b9 (patch) | |
tree | e18665ca64a8f2a974be3f11caa2e4329b346171 /src/tests | |
parent | d0e0cf6ee47ab538efc47c7882f498f1b5e0f0c7 (diff) | |
download | sssd-2a5cf841dec2785333117a293fcd8c875ace28b9.tar.gz sssd-2a5cf841dec2785333117a293fcd8c875ace28b9.tar.xz sssd-2a5cf841dec2785333117a293fcd8c875ace28b9.zip |
TESTS: global_talloc_context push/pop remove
Push/pop global_talloc_context into check_leaks is redudant. It is done
in leak_check_setup() and leak_check_teardown() functions in
src/tests/check_leaks.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/cmocka/test_ad_common.c | 2 | ||||
-rw-r--r-- | src/tests/cmocka/test_child_common.c | 2 | ||||
-rw-r--r-- | src/tests/cmocka/test_tools_colondb.c | 2 | ||||
-rw-r--r-- | src/tests/cmocka/test_utils.c | 4 | ||||
-rw-r--r-- | src/tests/cwrap/test_become_user.c | 2 |
5 files changed, 0 insertions, 12 deletions
diff --git a/src/tests/cmocka/test_ad_common.c b/src/tests/cmocka/test_ad_common.c index b1929ae35..d2a29a2ff 100644 --- a/src/tests/cmocka/test_ad_common.c +++ b/src/tests/cmocka/test_ad_common.c @@ -90,7 +90,6 @@ static int test_ad_common_setup(void **state) test_dom_suite_setup(TESTS_PATH); assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); test_ctx = talloc_zero(global_talloc_context, struct ad_common_test_ctx); assert_non_null(test_ctx); @@ -121,7 +120,6 @@ static int test_ad_common_teardown(void **state) assert_true(check_leaks_pop(test_ctx) == true); talloc_free(test_ctx); - assert_true(check_leaks_pop(global_talloc_context) == true); assert_true(leak_check_teardown()); ret = rmdir(TESTS_PATH); diff --git a/src/tests/cmocka/test_child_common.c b/src/tests/cmocka/test_child_common.c index 423132bdf..be842c4f5 100644 --- a/src/tests/cmocka/test_child_common.c +++ b/src/tests/cmocka/test_child_common.c @@ -49,7 +49,6 @@ static int child_test_setup(void **state) assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); child_tctx = talloc(global_talloc_context, struct child_test_ctx); assert_non_null(child_tctx); @@ -79,7 +78,6 @@ static int child_test_teardown(void **state) talloc_free(child_tctx); - assert_true(check_leaks_pop(global_talloc_context)); assert_true(leak_check_teardown()); return 0; } diff --git a/src/tests/cmocka/test_tools_colondb.c b/src/tests/cmocka/test_tools_colondb.c index 5aa105896..216102139 100644 --- a/src/tests/cmocka/test_tools_colondb.c +++ b/src/tests/cmocka/test_tools_colondb.c @@ -99,7 +99,6 @@ static int setup(void **state, int file_state) assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); test_ctx = talloc_new(global_talloc_context); assert_non_null(test_ctx); @@ -151,7 +150,6 @@ static int teardown(void **state) talloc_zfree(*state); test_dom_suite_cleanup(TESTS_PATH, NULL, NULL); - assert_true(check_leaks_pop(global_talloc_context)); assert_true(leak_check_teardown()); return 0; diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c index fecc5579d..996d99ea0 100644 --- a/src/tests/cmocka/test_utils.c +++ b/src/tests/cmocka/test_utils.c @@ -1135,13 +1135,11 @@ static int setup_add_strings_lists(void **state) { assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); return 0; } static int teardown_add_strings_lists(void **state) { - assert_true(check_leaks_pop(global_talloc_context) == true); assert_true(leak_check_teardown()); return 0; } @@ -1338,7 +1336,6 @@ static int unique_file_test_setup(void **state) struct unique_file_test_ctx *test_ctx; assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); test_ctx = talloc_zero(global_talloc_context, struct unique_file_test_ctx); assert_non_null(test_ctx); @@ -1364,7 +1361,6 @@ static int unique_file_test_teardown(void **state) } talloc_free(test_ctx); - assert_true(check_leaks_pop(global_talloc_context) == true); assert_true(leak_check_teardown()); return 0; } diff --git a/src/tests/cwrap/test_become_user.c b/src/tests/cwrap/test_become_user.c index feb688952..f08182ce0 100644 --- a/src/tests/cwrap/test_become_user.c +++ b/src/tests/cwrap/test_become_user.c @@ -80,7 +80,6 @@ void test_switch_user(void **state) assert_true(leak_check_setup()); - check_leaks_push(global_talloc_context); tmp_ctx = talloc_new(global_talloc_context); assert_non_null(tmp_ctx); @@ -123,7 +122,6 @@ void test_switch_user(void **state) assert_true(check_leaks_pop(tmp_ctx)); talloc_free(tmp_ctx); - assert_true(check_leaks_pop(global_talloc_context)); assert_true(leak_check_teardown()); } |