This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] memrchr testcase
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Sat, 31 Aug 2013 17:15:06 -0300
- Subject: Re: [PATCH] memrchr testcase
- Authentication-results: sourceware.org; auth=none
- References: <521F5AC7 dot 5000505 at linux dot vnet dot ibm dot com> <20130831070936 dot GA26092 at domone dot kolej dot mff dot cuni dot cz>
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
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).