[PATCH] Re: ldb cmocka tests

Andreas Schneider asn at samba.org
Fri Apr 7 09:11:53 UTC 2017


On Friday, 7 April 2017 05:18:02 CEST Andrew Bartlett wrote:
> > Can you look at this cmocka test for me?  I've been writing one to
> > show
> > the ldb_tdb locking bug in the other thread.  I like cmocka!
> > 
> > I'm not sure what the correct interaction with fork() is meant to be,
> > but I've made this work for now.  

The test looks fine. I think the original idea of the file is to test the API.

This test you wrote is a special case. I would put that in its own binary.

The setup/teardown functions could be shared. 

> > I've also added another API test in python, trying to show the same
> > issue, but python isn't called back at the right points, so I went to
> > C.
> > 
> > Please review/comment!
> > 
> > Once we sort out how to ensure we always have cmocka, it will be
> > great
> > to get this all into the tree!

Well, we can't/shouldn't put cmocka in ldb. If we put it in third_party it is 
available in a Samba build but not in a standalone ldb build!


Cheers,


	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list