Looks like we do not have self-tests for smbcacls

Andrew Bartlett abartlet at samba.org
Tue Aug 1 20:28:06 UTC 2017

On Tue, 2017-08-01 at 07:40 -0400, Jim McDonough wrote:
> On 07/31/2017 03:34 PM, Andrew Bartlett via samba-technical wrote:
> > On Mon, 2017-07-31 at 13:51 +0100, Noel Power via samba-technical
> > wrote:
> > > Please find a new version of the patchset (with tests re-written in python)
> > > Noel
> > 
> > Thanks for writing these tests.  It would have been better however if
> > the tests used the standard test classes like BlackboxTestCase and the
> > assertions that go with it.  
> > 
> > I know it will be a pile of pain to re-work the test (again!), but the
> > consistency really helps as others will copy and paste from the first
> > example they find.
> > 
> > See for example python/samba/tests/blackbox/ndrdump.py
> > 
> > (We used to have more of those, but SambaToolCmdTest took over for
> > Samba tests).
> Sorry, but this does not pass the any test of consistency as a review.
> There is only one test in samba using it and _in the same directory_ as
> the submitted test there is only one written in python, which itself
> does not use that class.  

Most Samba python tests use a test class derived from TestClass.

A large number of good examples can be found under:

While there are few blackbox tests written that way (most are written
in shell), there is already a good example that I pointed at, being

The reason I raised my concerns is that the test looks nothing like the
majority of other python tests in Samba.  

Can you point me at the test it looks like?  

> The submitted test is modeled after that one.

Which one is that?  I couldn't find anything in that directory other
than the wbinfo test, which is a python driver inside a shell script as
a subunit wrapper, and it also looks nothing like this test.

unittest.TestCase is the standard Python unit testing framework, and we
use that in Samba extensively. 

> If there is missing policy documentation, then fix it.  If the
> documentation is there, point to it in the review.
> Turning away test code where there was none calls for a higher level of
> review and feedback than this.

I hope the above is helpful.  I can't at this time fix our full
documentation deficit, but I have added:


I realise this proposed patch meets metze's request that the language
be changed to python (or shell), but sadly that is all it does.  That
is why I need to say:

Please model the python based test on our existing test framework and
usage patterns.  Unfortunately changing only the language is not


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