[PATCH] Re: ldb cmocka tests
Andreas Schneider
asn at samba.org
Thu Apr 13 10:19:55 UTC 2017
On Wednesday, 12 April 2017 03:35:05 CEST Andrew Bartlett via samba-technical
wrote:
> On Mon, 2017-04-10 at 12:13 +0200, Andreas Schneider wrote:
> > On Monday, 10 April 2017 00:26:06 CEST Andrew Bartlett wrote:
> > > 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.
> > >
> > > 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?
> >
> > Ok, lets first bring the patchset upstream.
> >
> >
> > Here is a rebased version on the third_party cmocka code which is
> > upstream
> > now. After this is upstream we can look at your additions to the ldb
> > tests.
> > Are you OK with that?
>
> Sadly this still fails autobuild. You we to change autobuild to allow
> bundling of cmocka in samba-libs (which disables bundling, something
> that was aimed at ldb/tdb/tevent), so we don't have to write 'install'
> logic for it etc.
Now you know why I hate bundling! I don't know how to fix that yet ...
Andreas
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list