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

Michael Adam obnox at samba.org
Fri Jan 31 02:58:55 MST 2014


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.

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.

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:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1/1 in 0s] samba.tests.docs
�)90samba.tests.docs.SmbDotConfTests.test_default_s3����)90samba.tests.docs.SmbDotConfTests.test_default_s4i�U��);2samba.tests.docs.SmbDotConfTests.test_undocumented��C�)6-samba.tests.docs.SmbDotConfTests.test_unknown�~�+ at BR�k���H0samba.tests.docs.SmbDotConfTests.test_default_s3�ّ9�+ at BR�k��U�0samba.tests.docs.SmbDotConfTests.test_default_s3_*��+ at BR�k��W��0samba.tests.docs.SmbDotConfTests.test_default_s4����+ at BR�k��T`0samba.tests.docs.SmbDotConfTests.test_default_s4&.1��+ at DR�k���`2samba.tests.docs.SmbDotConfTests.test_undocumented�E�+`d}R�k����2samba.tests.docs.SmbDotConfTests.test_undocumented3text/x-traceback; charset="utf8"; language="python"     tracebackc�Traceback (most recent call last):
  File "/data/obnox/devel/samba/master-push.git/bin/python/samba/tests/docs.py", line 169, in test_undocumented
    "Parameters that are in the implementation but undocumented:"))
  File "/usr/lib/python2.7/unittest/case.py", line 412, in fail
    raise self.failureException(msg)
AssertionError: Parameters that are in the implementation but undocumented:

    -valid
    NIS homedir
    abort shutdown script
    access based share enum
    acl allow execute always
    ...
    write raw
    writeable
    wtmp directory
��D�+p@�R�k����2samba.tests.docs.SmbDotConfTests.test_undocumented3text/x-traceback; charset="utf8"; language="python"  traceback��y#�+ at DR�k����2samba.tests.docs.SmbDotConfTests.test_undocumented�l��+>R�k����-samba.tests.docs.SmbDotConfTests.test_unknown��+`A�R�k��+�-samba.tests.docs.SmbDotConfTests.test_unknown3text/x-traceback; charset="utf8"; language="python"   tracebackATraceback (most recent call last):
  File "/data/obnox/devel/samba/master-push.git/bin/python/samba/tests/docs.py", line 153, in test_unknown
    documented = set([p for p in documented if not ":" in p])
TypeError: argument of type 'NoneType' is not iterable
����+p@~R�k��+�-samba.tests.docs.SmbDotConfTests.test_unknown3text/x-traceback; charset="utf8"; language="python"       traceback�v�s�+>R�k��+�-samba.tests.docs.SmbDotConfTests.test_unknown��ltime: 2014-01-31 10:24:11.000000
command: python -m subunit.run $LISTOPT samba.tests.docs
expanded command: python -m subunit.run $LISTOPT samba.tests.docs
ERROR: Testsuite[samba.tests.docs]
REASON: Exit code was 1



FAILED (0 failures, 0 errors and 0 unexpected successes in 1 testsuites)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140131/1788a102/attachment.pgp>


More information about the samba-technical mailing list