mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
* string/test-strchr.c (stupid_strchr): New function.
(do_random_tests): Make sure the string is zero terminated. * string/test-strpbrk.c (stupid_strpbrk): New function. (do_random_tests): Make sure the string is zero terminated. * string/test-strcmp.c (stupid_strcmp): New function. (do_random_tests): Make sure the strings are zero terminated. * string/test-strspn.c (stupid_strspn): New function. (simple_strspn): Rename rej argument to acc. (do_random_tests): Make sure the string is zero terminated. * string/test-strcspn.c (stupid_strcspn): New function. * string/test-strncpy.c (stupid_strncpy): New function. * string/test-stpncpy.c (stupid_stpncpy): New function. * string/test-strncmp.c (stupid_strncmp): New function. (do_random_tests): Make sure the strings are zero terminated. * string/test-string.h (impl_t): Change test into long. (IMPL): Add __attribute__((aligned (sizeof (void *)))).
This commit is contained in:
@ -22,13 +22,13 @@ typedef struct
|
||||
{
|
||||
const char *name;
|
||||
void (*fn) (void);
|
||||
int test;
|
||||
long test;
|
||||
} impl_t;
|
||||
extern impl_t __start_impls[], __stop_impls[];
|
||||
|
||||
#define IMPL(name, test) \
|
||||
impl_t tst_ ## name \
|
||||
__attribute__ ((section ("impls"))) \
|
||||
impl_t tst_ ## name \
|
||||
__attribute__ ((section ("impls"), aligned (sizeof (void *)))) \
|
||||
= { #name, (void (*) (void))name, test };
|
||||
|
||||
#ifdef TEST_MAIN
|
||||
|
Reference in New Issue
Block a user