[PATCH] Another flapping python 3 test

Stefan Metzmacher metze at samba.org
Mon Oct 1 07:32:04 UTC 2018


Hi Douglas,

the problem is that an unexpected "error" is generated,
knownfail can only catch unexpected "failures"...

With python this typically happens if we don't catch expections,
see python/samba/tests/__init__.py

                ok = False
                try:
                    testMethod()
                    ok = True
                except SkipTest as e:
                    self._addSkip(result, str(e))
                    return
                except self.failureException:
                    result.addFailure(self, self._exc_info())
                except KeyboardInterrupt:
                    raise
                except:
                    result.addError(self, self._exc_info())

KCCTests.test_verify() needs to catch the
samba.kcc.graph_utils.GraphError exception and generate
a self.failureException exception, which typically happens with
the self.assert*() functions.

metze

Am 29.09.2018 um 04:00 schrieb Douglas Bagnall via samba-technical:
> On 29/09/18 6:04 AM, Andreas Schneider wrote:
>> On Thursday, 20 September 2018 03:43:18 CEST Douglas Bagnall via samba-
>> technical wrote:
>>> This is another Python 3 test that is flapping on sn-devel.
>>>
>>> The test is still being run in Python 2 and never fails there. It also
>>> presumably works OK in Python 3, but it doesn't like doing both at the
>>> same time.
>>>
>>> The trouble started with this recent patch:
>>>
>>> b2665d569e35957aa2433e010175ed1fe361ee7b s4/selftest: enable samba.tests.kcc
>>> for py3
>>>
>>> but rather than go backwards on that, let's put it to the side for
>>> now. What we care about now is that the file parses and runs as both
>>> pythons, and the test passes. Running both versions at once is not a
>>> long term goal.
>>
>> Douglas, that rule doesn't seem to work!
> 
> Oh. It is *this* line that has the filterable name:
> 
>> [67(594)/75 at 42m9s] samba.tests.kcc.python3(vampire_dc)
> 
> Please try with this patch.
> 
> Douglas
> 
>> UNEXPECTED(error): 
>> samba.tests.kcc.python3.samba.tests.kcc.KCCTests.test_verify(vampire_dc)
>> REASON: Exception: Exception: Traceback (most recent call last):
>>   File "bin/python/samba/tests/kcc/__init__.py", line 80, in test_verify
>>     attempt_live_connections=False)
>>   File "bin/python/samba/kcc/__init__.py", line 2659, in run
>>     ('connected',))
>>   File "bin/python/samba/kcc/__init__.py", line 2513, in plot_all_connections
>>     vertex_colors=vertex_colours)
>>   File "bin/python/samba/kcc/graph_utils.py", line 334, in verify_and_dot
>>     for p, e, doc in errors)))
>> samba.kcc.graph_utils.GraphError: The 'dsa_final CN=NTDS 
>> Settings,CN=LOCALVAMPIREDC,CN=Servers,CN=Default-First-Site-
>> Name,CN=Sites,CN=Configuration,DC=samba,DC=example,DC=com' graph lacks the 
>> following properties:
>> connected: the graph is not connected, as the following vertices are 
>> unreachable:
>>
>>
>> That's now the 5ths time in a row that I hit that with my pipeline:
>>
>> https://gitlab.com/samba-team/devel/samba/pipelines/31473359
>>
>>
>>
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181001/aee101b2/signature.sig>


More information about the samba-technical mailing list