[PATCH] Re: ldb cmocka tests

Andrew Bartlett abartlet at samba.org
Fri Apr 7 02:49:51 UTC 2017


On Fri, 2017-04-07 at 09:39 +1200, Andrew Bartlett via samba-technical
wrote:
> On Thu, 2017-04-06 at 17:04 +1200, Andrew Bartlett via samba-
> technical
> wrote:
> > 
> > I thought I was using that, I tried to install a copy from source. 
> > 
> > As correct cmocka versions are not yet widely installed in
> > distributions, would it make sense to put it in third_party?  It
> > would
> > be very helpful if the right version was in the tree to test
> > with.  
> > 
> > I don't like us having to bundle a lot of software, but if we want
> > to
> > write tests in a framework, we should have the framework in our
> > tree
> > or
> > available on all of current debian/ubuntu LTS/fedora.
> 
> I had tried to install cmokca from Debian Unstable, but that isn't
> recent enough.  However that was enough to break the test, as it
> doesn't link strongly against the version in /usr/local/lib.  I had
> to
> use LD_LIBRARY_PATH to override it. 
> 
> Andrew Bartlett

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.  

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!

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list