code duplication in ccan (was: Re: snprintf on SunOS)

Jelmer Vernooij jelmer at samba.org
Thu Jun 21 09:56:23 MDT 2012


On Mon, Jun 18, 2012 at 04:20:00PM +0930, Rusty Russell wrote:
> On Sat, 16 Jun 2012 10:28:46 +0200, Jelmer Vernooij <jelmer at samba.org> wrote:
>         In this reply, I've tried to avoid your points which seemed to
> be based on your misunderstanding of ccan (corrected in the other
> reply), and addressed the rest.

> There's some good stuff in here!

> > Do we really need 10 files for that in the tree though? I see how it
> > would be useful if users grab just one or two modules from the
> > website, in this case it's just extra noise.

> > Likewise, the _info file uses a format that's completely different
> > from the doxygen format that we've standardized on (for better or worse) in the
> > rest of Samba.

> Well, that's how it is upstream in CCAN.  Is there much point in
> diverging for an internal libary?  I've generally avoided that.
I'm not sure I follow - isn't ccan diverging here?

> > > Specifically smbtorture?  I don't think we can :(

> > > We want these lowlevel unit tests to depend on as little as possible,
> > > and we want them run first.  Little test programs are nice for that;
> > > easy to write, easy to run.

> > Not really smbtorture so much as subunit, compatibility with our
> > test lists in selftest/tests.py and integration in the test namespace.

> > This gives us a uniform way of reporting and analysing test results
> > and of running (selected) tests.

> That's due to my ignorance :( I thought 'make test' integration was the
> right level.

> Hmm, there's no selftest/tests.py, but I'll poke around and come back
> and ask questions if I can't figure out the best way to tie these tests
> together!

Great, let me know if there is anything I can help with!

Perhaps the easiest thing to do would be to pull the test running code
out of lib/ccan/wscript and pull it into a separate script that takes
a list of tests to run and outputs subunit?

> > > I'd like to write more unit tests for Samba code: it's nicer to get a
> > > local failure than have smbtorture report some high-level failure
> > > halfway through a 2 hour test run :(
> > You can run individual tests, there is no need to run the whole thing.

> Sorry, I was unclear.  I was referring to the isolation failures, where
> a single test run by itself succeeds, but a while 'make test' fails.

> This happens occasionally to me, and it's annoying.
Agreed, we really should fix those.

Cheers,

Jelmer


More information about the samba-technical mailing list