[SSSD] [PATCH] TEST: recent_valid filter testing

Jakub Hrozek jhrozek at redhat.com
Tue Nov 10 07:42:48 UTC 2015


On Tue, Nov 10, 2015 at 08:37:13AM +0100, Lukas Slebodnik wrote:
> On (10/11/15 08:29), Pavel Reichl wrote:
> >
> >
> >On 11/05/2015 05:29 PM, Petr Cech wrote:
> >>+void test_groups_by_recent_filter_valid(void **state)
> >>+{
> >>+    struct cache_req_test_ctx *test_ctx = NULL;
> >>+    TALLOC_CTX *req_mem_ctx = NULL;
> >>+    struct tevent_req *req = NULL;
> >>+    const char **group_names = NULL;
> >>+    const char **ldb_results = NULL;
> >>+    const char *ldbname = NULL;
> >>+    void *tmp_ctx = NULL;
> >Could you use TALLOC_CTX?
> >
> Why do we need two different talloc context in a test?
> "TALLOC_CTX *req_mem_ctx", "void *tmp_ctx"
> 
> If we properly release resources we can use single talloc context.
> It's the best way how to catch memory leaks.

As long as we can push right before the _send() and pop right after the
_recv() we probably don't..


More information about the sssd-devel mailing list