[Freeipa-devel] [patch 0010] Python list comprehension leak breaking the test execution

Milan Kubík mkubik at redhat.com
Mon Aug 10 16:22:28 UTC 2015


On 08/10/2015 06:02 PM, Milan Kubík wrote:
> On 08/10/2015 05:54 PM, Jan Cholasta wrote:
>> On 10.8.2015 17:43, Milan Kubík wrote:
>>> Hi all,
>>>
>>> this patch fixes problem described in the ticket [1]
>>> that caused the test run to fail completely at every other or so run.
>>> I took the liberty to fix most of the pep8 issues while I was at it.
>>>
>>> Thanks to Jan Cholasta for help with identifying this one.
>>
>> IMO this would be more robust:
>>
>>     t = None
>>     try:
>>         ...
>>     finally:
>>         del t
>>         nss.nss_shutdown()
>>
>> By assigning a value to the variable at the beginning you make sure 
>> that the del statement will not fail.
>>
>> Honza
>>
> Thanks for the idea. It also removed the version check.
> Updated patch attached.
>
> Milan
>
>
Self NACK.

I have updated the fix for all of the leaks in that class. It seems to 
corrupt the database even when no init/shutdown was called. Just not so 
often.

Milan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/69867de7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkubik-0010.2-tests-fix-the-list-comprehension-leak-in-python-2-an.patch
Type: text/x-patch
Size: 5626 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/69867de7/attachment.bin>


More information about the Freeipa-devel mailing list