This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] memrchr testcase

On 08/31/2013 04:09 AM, OndÅej BÃlka wrote:
> On Thu, Aug 29, 2013 at 11:29:27AM -0300, Adhemerval Zanella wrote:
>> Hi all,
>> When reviewing the PPC LE patches from Alan I noticed GLIBC don't have a
>> memrchr testcase. In fact when I was coding this path I found out an
>> issue with POWER7 implementation which Alan's memchr/memrch patch
>> already addresses (so I won't bother sending the patch).
>> I used the memchr one as base and adjusting for a reverse search (I removed
>> from the check with a large len which obvious generate invalid memory accesses).
> I would prefer to write it using ifdef AS_MEMRCHR in memchr testcase.
> This way can we can keep these in sync when we will need to change
> testcase.

In my view, adding ifdefs will only pollute the test in this case. Different for memcpy/mempcpy
where the bulk of testcase is essentially the same (with adjustments made only name and functions
calls), I had to modify the memchr testcase slight to remove checks that did not make sense
for memrchr (to check a very large input size for memory length, for instance). 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]