How to (really) get started on Samba

Andrew Bartlett abartlet at
Mon Mar 19 18:08:19 UTC 2018

On Mon, 2018-03-19 at 09:28 +0100, Swen Schillig wrote:
> On Mon, 2018-03-19 at 16:30 +1300, Andrew Bartlett wrote:
> > On Fri, 2018-03-16 at 10:32 -0700, Jeremy Allison via samba-technical
> > wrote:
> > > 
> > > 
> > > Please bear with us, we (mostly:-) are really nice
> > > people and we'd love to help you help us - with the
> > > ultimate goal of adding you to the Team so you can
> > > be a nice person yourself :-) :-).
> Ohh, I'm already such nice person :-)

> Well, I'm not trying to justify myself here, but as I said before, 
> this mass-annoying-patch-set was originally consisting of 3 or 4
> patches and not 12-15 or so. 
> So I thought that was easier to digest but I was told to not do that.

Yeah, one of the things that I realised isn't as clearly communicated
is that all Samba patches should be small, some say micro, patches.  

Also, while the advise generally for starting on a project, even Samba,
is 'start by doing something trivial', that advise doesn't multiply. 
It is great advice for your first and second patch, you get a chance to
sort out your DCO, patch style and stuff on things that truly don't

However it doesn't scale, as you have seen.  Sadly you have drifted
into 'trivial, but...' territory and it has just got a little bogged

> I guess I will leave any of those so-called "cleanup's" for a while and
> focus on the bare fix.
> ....waiting for the "while at it you could.." comments.

I think that is best.  Now you know how to do a Samba patch, find a
real, end-user visible bug and write a comprehensive test for it, in
python, smbtorture or cmocka (or more than one of these).  

Put the test in first, with a knownfail.d file, and take it out with
the commit that fixes it.  (Run make test TESTS=mytest on each commit,
making sure it passes)

Practice with the same enthusiasm showing clearly what the bug is, then
write a patch for that, and then go back and extend the test to cover
all the edge cases also.

Then to ensure it all passes, run a full make test and a full autobuild
locally, or push it to github and start a private travis-ci job on it,
and if that goes well make a pull request.  

If you are really keen help me extent what stuff gets automatic CI done
by helping me get us running on gitlab CI. 

Finally, look back over the patches you submit, and re-check if you
think you have a good commit message, and a clear explanation about why
they help Samba.

The Samba game is a lot of work, and I don't want to hide that from
you.  But if you do all this, then review will I hope be a breeze, as
you will have already covered all the bases. 


Andrew Bartlett
Andrew Bartlett             
Authentication Developer, Samba Team
Samba Developer, Catalyst IT

More information about the samba-technical mailing list