[PATCH] Another flapping python 3 test

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Wed Oct 3 04:26:32 UTC 2018


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)

I'll keep my eye on those.

Douglas



More information about the samba-technical mailing list