[PATCH] string: Additional test for strcmp, strcasecmp
Florian Weimer
fweimer@redhat.com
Mon Jul 11 08:41:00 GMT 2016
On 07/07/2016 06:50 PM, Florian Weimer wrote:
> On 07/07/2016 06:25 PM, Rajalakshmi Srinivasaraghavan wrote:
>>
>>
>> On 07/07/2016 09:46 PM, Florian Weimer wrote:
>>> On 07/07/2016 06:06 PM, Rajalakshmi Srinivasaraghavan wrote:
>>>>
>>>>
>>>> On 07/05/2016 05:49 PM, Florian Weimer wrote:
>>>>> 2016-07-05 Florian Weimer <fweimer@redhat.com>
>>>>>
>>>>> * string/tst-cmp.c: New test.
>>>>> * string/Makefile (tests): Add it.
>>>
>>>> LGTM. Just one comment.
>>>
>>> Thanks.
>>>
>>>> Can you include strncmp and strncasecmp as well?
>>>
>>> What shall we do about the length argument? Keep it constant at 64 or
>>> something like that?
>
>> Either constant or strlen(left + left_align)+1.
>
> That alters the result of the comparison. We would have to use the
> maximum over both string lengths, I think.
What about this?
Tested on aarch64, i386, ppc, ppc64, ppc64le, s390, s390x, x86_64 (some
of the tests were run after loop switching, to avoid pointless
reconstruction of the string).
The test runs rather long. I could remove the SIZE_MAX tests, some of
the test strings, and a few of the pad byte choices to reduce the run
time if that is desired.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst-cmp.patch
Type: text/x-patch
Size: 7349 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160711/8259e741/attachment.bin>
More information about the Libc-alpha
mailing list