[SSSD] [PATCH] Make resolve and failover test work with CK_FORK=no

Martin Nagy mnagy at redhat.com
Thu Feb 4 14:04:36 UTC 2010


Sumit Bose wrote:
> Hi,
> 
> the resolver and failover unit test are using a leak checker which calls
> 'talloc_free(talloc_autofree_context());'. This is not recommended and
> makes the test fail it CK_FORK is set to 'no'. The attached patch
> introduces a global talloc context which should be used by the test
> instead of NULL for root of the memory hierarchy.
> 
> bye,
> Sumit

Little too late, but NACK. There is one missing detail.
From server/tests/common.h:
+TALLOC_CTX *global_talloc_context;

This will cause every file that includes common.h to define its own
global_talloc_context. I'm not surprised the tests run well, however.
My recommendation is that we add this to common.c:
TALLOC_CTX *global_talloc_context = NULL;
and add the 'extern' storage class specifier in common.h.

Sumit, can you please make another patch that will fix this problem?
(since the first patch was already acked & pushed)

Martin



More information about the sssd-devel mailing list