[PATCH] Another flapping python 3 test

Noel Power nopower at suse.com
Wed Oct 3 09:15:38 UTC 2018


Hi Douglas

On 03/10/2018 05:26, Douglas Bagnall via samba-technical wrote:
> On 02/10/18 23:55, Stefan Metzmacher wrote:
>> Hi,
>>
>>> 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.
>> The attached patch turns it into an error for me.
> thanks Metze.
>
> We have a few other python3 tests that intermittently flap:
>
> found 37 lines matching 'UNEXPECTED.+python3' in 345 files matching 'sn-devel-144'
>    21 UNEXPECTED(error): samba.tests.kcc.python3.samba.tests.kcc.KCCTests.test_verify(vampire_dc)
>     8 UNEXPECTED(error): samba.tests.kcc.python3.samba.tests.kcc.KCCTests.test_verify(promoted_dc)
>     3 UNEXPECTED(failure): samba.tests.samba_tool.visualize_drs.python3.samba.tests.samba_tool.visualize_drs.SambaToolVisualizeDrsTest.test_reps_remote(promoted_dc)
>     1 UNEXPECTED(failure): samba4.drs.samba_tool_drs_showrepl.python(promoted_dc).python3.samba_tool_drs_showrepl.SambaToolDrsShowReplTests.test_samba_tool_showrepl_summary_forced_failure(promoted_dc:local)
>     1 UNEXPECTED(error): samba.tests.kcc.python3.samba.tests.kcc.KCCTests.test_list_dsas(vampire_dc)
>     1 UNEXPECTED(failure): samba.tests.samba_tool.visualize_drs.python3.samba.tests.samba_tool.visualize_drs.SambaToolVisualizeDrsTest.test_uptodateness_all_partitions(promoted_dc)
>     1 UNEXPECTED(failure): samba4.drs.samba_tool_drs_showrepl.python(vampire_dc).python3.samba_tool_drs_showrepl.SambaToolDrsShowReplTests.test_samba_tool_showrepl_summary_forced_failure(vampire_dc:local)
>     1 UNEXPECTED(error): samba4.drs.replica_sync.python(vampire_dc).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewRemoteWin(vampire_dc:local)


Do any of these tests also have the python2 variant also flapping ? It 
would be great to nail down where and why some of these are failing, It 
is really frustrating, any of the flapping tests don't seem to fail for 
me when I run them independently, Worse some of these seem to just 
randomly become flapping and then go quite again. At various times I 
burned alot of time trying unsuccessfully to get to the bottom of how 
some of these tests are failing but have been stumped due to 
unfamiliarity with the tests and inability to get them to fail outside 
of CI. If anyone can help with that it would be great, marking them as 
flapping is the best that can be done now but unfortunately risks hiding 
problems.

Noel




More information about the samba-technical mailing list