[PATCH] Fix the last of the defaults and include a test to check them

Andrew Bartlett abartlet at samba.org
Fri Jan 31 03:41:43 MST 2014


On Fri, 2014-01-31 at 10:58 +0100, Michael Adam wrote:
> Hi Garming and Andrew,
> 
> On 2014-01-31 at 12:22 +1300, Garming Sam wrote:
> > >
> > >Here's a few more. This has the last of the renames I believe,
> > >which didn't work on their own before.
> > >
> > >For printer name, it needed a patch which changed the function
> > >from being static.
> > >
> > >The other dependent patch which I have here, is changing the
> > >security default in s3 to AUTO instead of USER. In lib/param, it
> > >was always already set to AUTO and in the docs, it says that the
> > >default should be AUTO. With AUTO, it should act as USER unless
> > >the server role has been set.
> > >
> > >
> > >Cheers,
> > >
> > >Garming Sam
> > 
> > This set of patches goes on top of the last of the renames and the
> > entities patches.
> > 
> > It's the last set of patches needed to fix the defaults and includes
> > the updated docs.py script. The new script compares the output of
> > testparm to the docs to ensure the defaults are correct, so this
> > should hopefully try to prevent deviations in the future.
> > 
> > The reason some of these are last is because they are the ones that
> > actually make notable changes.
> 
> I have reviewed them and all doc and loadparm changes look
> reasonable and good so far.

Great!

> But the new docs.py script fails the "samba.tests.docs"
> test: It seems it does not get any of the parameters
> from the docs with the ElementTree...
> 
> "AssertionError: Parameters that are in the implementation but undocumented:"
>  lists _all_ parameters.

That's very, very odd.  

> The error I am seeing is also different on two different systems:
> On our autobuild box (ubuntu 10.04) I see a plain error.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> UNEXPECTED(failure): samba.tests.docs.SmbDotConfTests.test_undocumented
> REASON: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python
> traceback
> 238B
> Traceback (most recent call last):
>   File "/memdisk/obnox/x/b829955/samba/bin/python/samba/tests/docs.py", line 169, in test_undocumented
>     "Parameters that are in the implementation but undocumented:"))
> AssertionError: Parameters that are in the implementation but undocumented:
> 
>     -valid
>     NIS homedir
>     abort shutdown script
>     ...
>     write ok
>     write raw
>     writeable
>     wtmp directory
> 0
> 
> FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> On my laptop (ubuntu 13.10, I see  garbage output after the above
> message (uninitialized memory?...) and apparently the error is not
> correctly caught. The test continues with the unknown test and fails
> again:

I can at least put your mind and sanity to rest regarding the weird
output.  This is an artefact of the subunit2 protocol, and it varies
depending on the version of the subunit packages installed on your
system.

The filters we use should hide these details, but something doesn't
quite work right.  At least you can be assured it's nothing unexpected.

> I guess I will look a little bit, but probably push the patches
> without the docs.py update.

Thanks!

Did you have the 'use XML entities' patches in your series?  (They are
needed to get the paths correct).  

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