mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
string: Add additional output in test-strchr failure
Seeing occasional failures in `__strchrnul_evex512` that are not consistently reproducible. Hopefully by adding this the next failure will provide enough information to debug. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
8d8ae5eebd
commit
4b00532e51
1 changed files with 12 additions and 5 deletions
|
@ -111,7 +111,7 @@ check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
|
||||||
CHAR *res = CALL (impl, s, c);
|
CHAR *res = CALL (impl, s, c);
|
||||||
if (res != exp_res)
|
if (res != exp_res)
|
||||||
{
|
{
|
||||||
error (0, 0, "Wrong result in function %s %#x %p %p", impl->name,
|
error (0, 0, "Wrong result in function %s(%p) %#x %p %p", impl->name, s,
|
||||||
c, res, exp_res);
|
c, res, exp_res);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -119,11 +119,10 @@ check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
|
do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
|
||||||
{
|
{
|
||||||
if (check_result (impl, s, c, exp_res) < 0)
|
return check_result (impl, s, c, exp_res);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -160,7 +159,15 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
|
||||||
result = NULLRET (buf + align + len);
|
result = NULLRET (buf + align + len);
|
||||||
|
|
||||||
FOR_EACH_IMPL (impl, 0)
|
FOR_EACH_IMPL (impl, 0)
|
||||||
do_one_test (impl, buf + align, seek_char, result);
|
{
|
||||||
|
if (do_one_test (impl, buf + align, seek_char, result) != 0)
|
||||||
|
{
|
||||||
|
error (0, 0,
|
||||||
|
"\tAlign=%zu, Pos=%zu, Len=%zu, seek=%d, max_char=%d, "
|
||||||
|
"Buf=%p, Res=%p",
|
||||||
|
align, pos, len, seek_char, max_char, buf, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue