[PATCH] Re: ldb cmocka tests
abartlet at samba.org
Sun Apr 9 22:26:06 UTC 2017
On Fri, 2017-04-07 at 11:11 +0200, Andreas Schneider wrote:
> 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
> The setup/teardown functions could be shared.
Currently we don't have a good framework for multiple tests in ldb. To
split it out we need to create that, with a set of test names and a way
to ensure we run them all.
I think we both want to get the concept of cmocka in for now, can we
leave this for the next large test expansion?
Otherwise, could you show how you would like it split up by splitting
the existing test up, so I can just follow the same pattern?
> > > 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!
Thanks for proposing it for third_party. I've reviewed that.
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
More information about the samba-technical