[PATCH] string: Additional test for strcmp, strcasecmp

Florian Weimer fweimer@redhat.com
Fri Aug 26 12:58:00 GMT 2016


On 07/11/2016 11:41 AM, Rajalakshmi Srinivasaraghavan wrote:
>
>
> On 07/11/2016 02:10 PM, Florian Weimer wrote:
>>
>> 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.
>>
>>
> Yes. Removing pad byte choices like 'f', 127 and  string patterns like
> "0123456789abcdef" , "123456789abcdef" can reduce few seconds.

I have left in the additional tests for now.  We can remove them if the 
run time proves too long.

>> +#include <limits.h>
>> +#include <locale.h>
> Is locale used anywhere?
>>
>> +        { "strncasecmp (length SIZE_)MAX)", strncasecmp_max},
> Extra ')' after SIZE_.
>>
> LGTM with the above comments.

Thanks, committed with these changes.

Florian



More information about the Libc-alpha mailing list