[PATCH] samba-tool throws error if there is an empty FSMO role

Rowland Penny repenny241155 at gmail.com
Wed May 11 14:51:35 UTC 2016


On 11/05/16 09:40, Jeremy Allison wrote:
> On Wed, May 11, 2016 at 09:11:10AM +0100, Rowland Penny wrote:
>> On 11/05/16 08:58, Andreas Schneider wrote:
>>> On Wednesday, May 11, 2016 08:01:14 AM Rowland Penny wrote:
>>>> If you examine 'timecmd.py', you will find a 'class' and a couple of
>>>> 'def's , but there doesn't seem to be anything to run the 'def's. How is
>>>> the code run ????
>>> Hey Rowland,
>>>
>>> To find out how the test is executed you can run it with the following
>>> command:
>>>
>>> make test TESTS="samba.tests.samba_tool.timecmd" SUBUNIT_FORMATTER=cat
>>>
>>> Look for 'expanded command'.
>>>
>>> It shows you how the test is invoked and with which arguments. I need to find
>>> some time to really document this stuff. The selftest stuff is the finest
>>> spagetthi code we have in Samba ;)
>>>
>>>
>>> 	-- andreas
>> Spaghetti code has nothing on this, this is undocumented knitted
>> spaghetti code :-D
> Not only that, some of the spaghetti is made of noodles,
> some of string, and some of steel wool :-).
>
> If you can get this working Rowland, you've earned
> the badge of the finest of Samba engineers - a Test
> Code Hacker (tm) :-).
>
> Very few people can do this :-).

OK, if I set up an fl2000dc testenv and run:

make test TESTS="samba.tests.samba_tool.fsmo" SUBUNIT_FORMATTER=cat

and get:

testsuite-failure: samba.tests.samba_tool.fsmo(fl2000dc:local)

and then patch fsmo.py and re-run:

make test TESTS="samba.tests.samba_tool.fsmo" SUBUNIT_FORMATTER=cat

and get:

testsuite-success: samba.tests.samba_tool.fsmo(fl2000dc:local)

Does this mean I have a test for 'samba-tool fsmo show' that works ?

Rowland



More information about the samba-technical mailing list