[PATCH] More tdb/ldb tests.
Adrian Cochrane
adrianc at catalyst.net.nz
Tue Sep 1 21:39:31 UTC 2015
Thanks for asking about the strncasecmp(), that turned out to be a bug.
Here's another update to the patches.
On Fri, Aug 28, 2015 at 6:31 AM, Stefan Metzmacher <metze at samba.org>
wrote:
> Hi Adrian,
>
> can you please inline torture/ldb/ldb_parse.h
> static const variables should be inside of the .c file.
>
> The commit that introduces ldb_unpack_data_withlist() contains
> an unrelated change in ldb_private.h
> that just removes an empty line, please remove that change
>
> Can you please split the move of ldb_[un]pack_data() to ldb_module.h
> into it's own commit.
>
> Please also change 'const char* const* list' into
> 'const char * const *list'.
>
> Instead of using strncasecmp(), we may want to
> add some ldb_attr_n_cmp() helper macro, similar to
> ldb_attr_cmp().
>
> Please initialize 'struct ldb_message_element *element;'
> to NULL.
>
> message->elements[nelem].flags = 0; should be removed
> and added as element->flags = 0; later.
>
> element = &(message->elements[nelem]);
> can be
> element = &message->elements[nelem];
>
> Thanks!
> metze
>
> Am 26.08.2015 um 05:17 schrieb Adrian Cochrane:
>> Caught a slight oversight in what I just posted.
>>
>> On Tue, Aug 25, 2015 at 11:01 AM, Adrian Cochrane
>> <adrianc at catalyst.net.nz> wrote:
>>> I've now tidied up Matthieu Patou's patches.
>>>
>>> On Fri, Aug 21, 2015 at 6:05 PM, Volker Lendecke
>>> <Volker.Lendecke at SerNet.DE> wrote:
>>>> On Fri, Aug 21, 2015 at 01:49:28PM +1200, Andrew Bartlett wrote:
>>>>> On Fri, 2015-08-21 at 13:27 +1200, Adrian Cochrane wrote:
>>>>> > I think I addressed all your issues with this code.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Reviewed-by: Andrew Bartlett <abartlet at samba.org>
>>>>>
>>>>> Can I get a second team reviewer please?
>>>>
>>>> Two comments: First, in ldb_unpack_data_withlist we can live
>>>> without the "filter" boolean. If you want to protect against
>>>> "list==NULL" but "list_size!=0" just do a
>>>>
>>>> if (list == NULL) { list_size = 0; }
>>>>
>>>> Second, parts of the patch go way beyond the 80-char limit.
>>>> I think introducing a helper variable might be overdue here.
>>>>
>>>> Volker
>>>>
>>>> --
>>>> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
>>>> phone: +49-551-370000-0, fax: +49-551-370000-9
>>>> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
>>>> http://www.sernet.de, mailto:kontakt at sernet.de
>>>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-ldb-torture-test-ldb_unpack_data_withlist.patch
Type: text/x-patch
Size: 6859 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0007-ldb-torture-test-ldb_unpack_data_withlist.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ldb-Move-ldb_-un-pack_data-into-ldb_module.h-for-tes.patch
Type: text/x-patch
Size: 1990 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0001-ldb-Move-ldb_-un-pack_data-into-ldb_module.h-for-tes.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-ldb-increment-version-due-to-added-ldb_unpack_data_w.patch
Type: text/x-patch
Size: 22210 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0006-ldb-increment-version-due-to-added-ldb_unpack_data_w.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ldb-torture-Test-ldb-unpacking-and-printing.patch
Type: text/x-patch
Size: 24398 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0002-ldb-torture-Test-ldb-unpacking-and-printing.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ldb-introduce-ldb_unpack_data_withlist-to-unpack-par.patch
Type: text/x-patch
Size: 7185 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0003-ldb-introduce-ldb_unpack_data_withlist-to-unpack-par.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-lib-ldb-Use-talloc_memdup-because-we-know-the-length.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0005-lib-ldb-Use-talloc_memdup-because-we-know-the-length.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lib-ldb-Use-better-variable-names-in-ldb_unpack_with.patch
Type: text/x-patch
Size: 2321 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150902/dd7ac541/0004-lib-ldb-Use-better-variable-names-in-ldb_unpack_with.bin>
More information about the samba-technical
mailing list