[v9,22/22] string: Hook up the default implementation on test-memrchr

Message ID 20230117200014.1299923-23-adhemerval.zanella@linaro.org
State Superseded
Headers
Series Improve generic string routines |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit fail Patch caused testsuite regressions

Commit Message

Adhemerval Zanella Jan. 17, 2023, 8 p.m. UTC
  ---
 string/test-memrchr.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Carlos O'Donell Jan. 18, 2023, 6:51 p.m. UTC | #1
On 1/17/23 15:00, Adhemerval Zanella via Libc-alpha wrote:
> ---
>  string/test-memrchr.c | 7 +++++++
>  1 file changed, 7 insertions(+)

Fails i686 CI.
https://patchwork.sourceware.org/project/glibc/patch/20230117200014.1299923-23-adhemerval.zanella@linaro.org/

 
> diff --git a/string/test-memrchr.c b/string/test-memrchr.c
> index a4eac3592e..e4cba1878a 100644
> --- a/string/test-memrchr.c
> +++ b/string/test-memrchr.c
> @@ -24,6 +24,13 @@ typedef char *(*proto_t) (const char *, int, size_t);
>  
>  IMPL (memrchr, 1)
>  
> +/* Also check the generic implementation.  */
> +#undef weak_alias
> +#define weak_alias(a, b)
> +#define MEMRCHR __memrchr_default
> +#include "string/memrchr.c"
> +IMPL (__memrchr_default, 1)
> +
>  /* Naive implementation to verify results.  */
>  char *
>  simple_memrchr (const char *s, int c, size_t n)
  

Patch

diff --git a/string/test-memrchr.c b/string/test-memrchr.c
index a4eac3592e..e4cba1878a 100644
--- a/string/test-memrchr.c
+++ b/string/test-memrchr.c
@@ -24,6 +24,13 @@  typedef char *(*proto_t) (const char *, int, size_t);
 
 IMPL (memrchr, 1)
 
+/* Also check the generic implementation.  */
+#undef weak_alias
+#define weak_alias(a, b)
+#define MEMRCHR __memrchr_default
+#include "string/memrchr.c"
+IMPL (__memrchr_default, 1)
+
 /* Naive implementation to verify results.  */
 char *
 simple_memrchr (const char *s, int c, size_t n)