This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] memrchr testcase
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 2 Sep 2013 11:04:50 +0200
- 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> <52224ECA dot 6040309 at linux dot vnet dot ibm dot com>
On Sat, Aug 31, 2013 at 05:15:06PM -0300, Adhemerval Zanella wrote:
> 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
If you thisnk so then its OK.