[PATCH] Re: ldb cmocka tests
Andrew Bartlett
abartlet at samba.org
Fri Apr 7 09:41:36 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
> 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!
I don't see why it would be any different to popt.
See this in wscript:
samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace
lib/talloc:lib/talloc
lib/tdb:lib/tdb lib/tdb:lib/tdb
lib/tevent:lib/tevent
third_party/popt:third_party/popt
buildtools:buildtools
third_party/waf:third_party/waf''')
Thanks,
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list