[PATCH 22/23] gpo: Add gpo tests

David Mulder dmulder at suse.com
Wed May 3 21:32:53 UTC 2017


This is the libgpo bindings with all the cruft removed. The gpo code was 
only using that one function.

On 04/28/2017 06:36 AM, David Mulder via samba-technical wrote:
>
>
> On 04/27/2017 01:49 PM, Andrew Bartlett wrote:
>> In Subject: [PATCH 02/22] gpo: Add python libgpo bindings:
>>
>> The py_gpo_get_unix_path() routine and others like it appears to leak
>> the result of talloc_new(NULL).
>>
>> I also am totally unclear how py_ads_parse_gp_ext() is used, tested or
>> even works - it appears to blindly cast a C object to a python object
>> and has a memory leak.
>>
>> The same I could say for py_ads_get_gpo_link, which tries to build a
>> tuple with a raw C object, and leaks memory.  It also has really
>> strange indentation and // comments, and is commented out in the end.
>>
>> I know this isn't your code!  However it means we have to go over
>> everything with a fine toothed comb.  A patch to trim it down to the
>> bare minimum required would go a long way.
>>
>> Comprehensive tests for the bindings and for the now modular script
>> directly would go a long way to improving my confidence with this patch
>> set.
> Thanks for the feedback. Clearly I didn't take enough time to look 
> over the libgpo bindings. Looks like most of that code is really WIP.
> I'll start by trimming down anything that isn't used in there, then 
> work on writing some tests for it.
>

-- 
David Mulder
SUSE Labs Software Engineer - Samba
dmulder at suse.com
SUSE Linux GmbH, GF: Felix Imend├Ârffer, Jane Smithard, Graham Norton, HRB 21284 (AG N├╝rnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gpo-Add-python-libgpo-bindings.patch
Type: text/x-patch
Size: 4669 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170503/c4e64905/0001-gpo-Add-python-libgpo-bindings.bin>


More information about the samba-technical mailing list