/string/ |
A D | test-string.h | 126 #define CALL(impl, ...) \ argument 137 impl_t *impl; \ 146 for (impl = __start_impls; impl < __stop_impls; ++impl) \ 148 skip = impl; \ 153 for (impl = __start_impls; impl < __stop_impls; ++impl) \ 154 if (impl != skip) \ 155 *a++ = *impl; \ 172 impl = impl_array; \ 174 if (!notall || impl->test) 177 for (impl_t *impl = __start_impls; impl < __stop_impls; ++impl) \ [all …]
|
A D | test-strstr.c | 61 check_result (impl_t *impl, const char *s1, const char *s2, in check_result() argument 64 char *result = CALL (impl, s1, s2); in check_result() 80 if (check_result (impl, s1, s2, exp_result) < 0) in do_one_test() 120 FOR_EACH_IMPL (impl, 0) in do_test() 134 FOR_EACH_IMPL (impl, 0) in check1() 135 check_result (impl, s1, s2, exp_result); in check1() 167 FOR_EACH_IMPL (impl, 0) in check2() 205 FOR_EACH_IMPL (impl, 0) in pr23637() 206 check_result (impl, h, n, exp_result); in pr23637() 219 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strnlen.c | 62 size_t len = CALL (impl, s, maxlen); in do_one_test() 87 FOR_EACH_IMPL (impl, 0) in do_test() 155 FOR_EACH_IMPL (impl, 1) in do_random_tests() 161 n, impl->name, align, in do_random_tests() 168 n, impl->name, align, in do_random_tests() 175 n, impl->name, align, in do_random_tests() 203 FOR_EACH_IMPL (impl, 0) in do_page_tests() 227 FOR_EACH_IMPL (impl, 0) in do_page_tests() 256 FOR_EACH_IMPL (impl, 0) in do_page_2_tests() 273 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memmem.c | 65 res = CALL (impl, haystack, haystack_len, needle, needle_len); in check_result() 68 error (0, 0, "Wrong result in function %s %p %p", impl->name, in check_result() 78 do_one_test (impl_t *impl, const void *haystack, size_t haystack_len, in do_one_test() argument 81 if (check_result (impl, haystack, haystack_len, needle, needle_len, in do_one_test() 94 FOR_EACH_IMPL (impl, 0) in do_test() 121 FOR_EACH_IMPL (impl, 0) in do_random_tests() 122 do_one_test (impl, buf1, BUF1PAGES * page_size, buf1 + idx, len, in do_random_tests() 141 FOR_EACH_IMPL (impl, 0) in check1() 142 check_result (impl, search_buf, sizeof search_buf_data, in check1() 164 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strncat.c | 77 if (CALL (impl, dst, src, n) != dst) in do_one_test() 80 CALL (impl, dst, src, n), dst); in do_one_test() 89 impl->name); in do_one_test() 96 impl->name); in do_one_test() 129 FOR_EACH_IMPL (impl, 0) in do_test() 132 do_one_test (impl, s2, s1, n); in do_test() 154 FOR_EACH_IMPL (impl, 0) in do_overflow_tests() 172 FOR_EACH_IMPL (impl, 0) in do_overflow_tests() 255 FOR_EACH_IMPL (impl, 1) in do_random_tests() 334 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-rawmemchr.c | 41 do_one_test (impl_t *impl, const char *s, int c, char *exp_res) in do_one_test() argument 43 char *res = CALL (impl, s, c); in do_one_test() 46 error (0, 0, "Wrong result in function %s %p %p", impl->name, in do_one_test() 77 FOR_EACH_IMPL (impl, 0) in do_test() 78 do_one_test (impl, (char *) (buf1 + align), seek_char, result); in do_test() 123 FOR_EACH_IMPL (impl, 1) in do_random_tests() 124 if (CALL (impl, (char *) (p + align), seek_char) != result) in do_random_tests() 127 n, impl->name, align, seek_char, len, pos, in do_random_tests() 128 CALL (impl, (char *) (p + align), seek_char), in do_random_tests() 143 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strlen.c | 63 do_one_test (impl_t *impl, const CHAR *s, size_t exp_len) in do_one_test() argument 65 size_t len = CALL (impl, s); in do_one_test() 68 error (0, 0, "Wrong result in function %s %zd %zd", impl->name, in do_one_test() 90 FOR_EACH_IMPL (impl, 0) in do_test() 91 do_one_test (impl, (CHAR *) (buf + align), len); in do_test() 122 FOR_EACH_IMPL (impl, 1) in do_random_tests() 123 if (CALL (impl, (CHAR *) (p + align)) != len) in do_random_tests() 126 n, impl->name, align, CALL (impl, (CHAR *) (p + align)), in do_random_tests() 141 FOR_EACH_IMPL (impl, 0) in test_main() 142 printf ("\t%s", impl->name); in test_main()
|
A D | test-strcpy.c | 74 do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, in do_one_test() argument 89 impl->name, dst, src); in do_one_test() 118 FOR_EACH_IMPL (impl, 0) in do_test() 119 do_one_test (impl, s2, s1, len); in do_test() 164 FOR_EACH_IMPL (impl, 1) in do_random_tests() 171 n, impl->name, align1, align2, len, res, in do_random_tests() 180 n, impl->name, align1, align2, len); in do_random_tests() 190 n, impl->name, align1, align2, len); in do_random_tests() 198 n, impl->name, align1, align2, len); in do_random_tests() 213 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memmove.c | 74 CALL (impl, src, dst, len); in do_one_test() 78 res = CALL (impl, dst, src, len); in do_one_test() 91 impl->name, dst, src); in do_one_test() 117 FOR_EACH_IMPL (impl, 0) in do_test() 181 FOR_EACH_IMPL (impl, 1) in do_random_tests() 282 FOR_EACH_IMPL (impl, 0) in do_test2() 300 impl->name, dst, src, i); in do_test2() 329 FOR_EACH_IMPL (impl, 0) in do_test3() 348 impl->name, dst, buf, i); in do_test3() 375 FOR_EACH_IMPL (impl, 0) in do_test4() [all …]
|
A D | test-memrchr.c | 40 do_one_test (impl_t *impl, const char *s, int c, size_t n, char *exp_res) in do_one_test() argument 42 char *res = CALL (impl, s, c, n); in do_one_test() 45 error (0, 0, "Wrong result in function %s %p %p", impl->name, in do_one_test() 82 FOR_EACH_IMPL (impl, 0) in do_test() 83 do_one_test (impl, (char *) (buf1 + align), seek_char, len, result); in do_test() 127 FOR_EACH_IMPL (impl, 1) in do_random_tests() 128 if (CALL (impl, (char *) (p + align), seek_char, len) != result) in do_random_tests() 131 n, impl->name, align, seek_char, len, pos, in do_random_tests() 132 CALL (impl, (char *) (p + align), seek_char, len), in do_random_tests() 147 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memcpy-support.h | 57 do_one_test (impl_t *impl, char *dst, const char *src, size_t len) in do_one_test() argument 65 if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len)) in do_one_test() 67 error (0, 0, "Wrong result in function %s %p %p", impl->name, in do_one_test() 68 CALL (impl, dst, src, len), MEMCPY_RESULT (dst, len)); in do_one_test() 78 impl->name, dst, (int)len, dst, src, (int)len, src, len); in do_one_test() 105 FOR_EACH_IMPL (impl, 0) in do_test() 106 do_one_test (impl, s2, s1, len); in do_test() 146 FOR_EACH_IMPL (impl, 0) in do_test1() 149 CALL (impl, (char *)dest, (char *)src, size); in do_test1() 158 impl->name, dest, src, i); in do_test1()
|
A D | test-strcat.c | 76 if (CALL (impl, dst, src) != dst) in do_one_test() 79 CALL (impl, dst, src), dst); in do_one_test() 87 impl->name, dst, src); in do_one_test() 117 FOR_EACH_IMPL (impl, 0) in do_test() 120 do_one_test (impl, s2, s1); in do_test() 181 FOR_EACH_IMPL (impl, 1) in do_random_tests() 200 n, impl->name, align1, align2, len1, len2); in do_random_tests() 208 n, impl->name, align1, align2, len1, len2); in do_random_tests() 216 n, impl->name, align1, align2, len1, len2); in do_random_tests() 239 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strncpy.c | 101 CALL (impl, dst, src, n), dst); in do_one_test() 153 FOR_EACH_IMPL (impl, 0) in do_test() 154 do_one_test (impl, s2, s1, len, n); in do_test() 184 FOR_EACH_IMPL (impl, 0) in do_page_tests() 264 FOR_EACH_IMPL (impl, 1) in do_random_tests() 281 n, impl->name, align1, align2, len); in do_random_tests() 294 n, impl->name, align1, align2, len); in do_random_tests() 303 n, impl->name, align1, align2, len); in do_random_tests() 313 n, impl->name, align1, align2, len); in do_random_tests() 328 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memccpy.c | 62 if (CALL (impl, dst, src, c, n) != expect) in do_one_test() 65 CALL (impl, dst, src, c, n), expect); in do_one_test() 72 error (0, 0, "Wrong result in function %s", impl->name); in do_one_test() 106 FOR_EACH_IMPL (impl, 0) in do_test() 107 do_one_test (impl, s2, s1, c, len, n); in do_test() 180 FOR_EACH_IMPL (impl, 1) in do_random_tests() 201 n, impl->name, align1, align2, len); in do_random_tests() 214 n, impl->name, align1, align2, len); in do_random_tests() 225 n, impl->name, align1, align2, len); in do_random_tests() 240 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memset.c | 118 CALL (impl, s, n); in do_one_test() 123 CHAR *res = CALL (impl, s, c, n); in do_one_test() 144 FOR_EACH_IMPL (impl, 0) in do_test() 145 do_one_test (impl, (CHAR *) (buf1) + align, c, len); in do_test() 192 FOR_EACH_IMPL (impl, 1) in do_random_tests() 204 n, impl->name, align, c, len, res, p + align); in do_random_tests() 211 n, impl->name, align, c, len); in do_random_tests() 219 n, impl->name, align, c, len); in do_random_tests() 227 n, impl->name, align, c, len); in do_random_tests() 245 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strcasestr.c | 62 check_result (impl_t *impl, const char *s1, const char *s2, in check_result() argument 65 char *result = CALL (impl, s1, s2); in check_result() 68 error (0, 0, "Wrong result in function %s %s %s", impl->name, in check_result() 78 do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result) in do_one_test() argument 80 if (check_result (impl, s1, s2, exp_result) < 0) in do_one_test() 121 FOR_EACH_IMPL (impl, 0) in do_test() 122 do_one_test (impl, s1, s2, fail ? NULL : s1 + len1 - len2); in do_test() 133 FOR_EACH_IMPL (impl, 0) in check1() 134 check_result (impl, s1, s2, exp_result); in check1() 145 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strchr.c | 104 CHAR *res = CALL (impl, s, c); in check_result() 118 if (check_result (impl, s, c, exp_res) < 0) in do_one_test() 155 FOR_EACH_IMPL (impl, 0) in do_test() 156 do_one_test (impl, buf + align, seek_char, result); in do_test() 217 FOR_EACH_IMPL (impl, 1) in do_random_tests() 218 if (CALL (impl, (CHAR *) (p + align), seek_char) != result) in do_random_tests() 223 CALL (impl, (CHAR *) (p + align), seek_char), result, p); in do_random_tests() 236 FOR_EACH_IMPL (impl, 0) in check1() 237 check_result (impl, s, c, exp_result); in check1() 250 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strncasecmp.c | 77 int result = CALL (impl, s1, s2, n); in check_result() 135 FOR_EACH_IMPL (impl, 0) in do_test() 136 do_one_test (impl, s1, s2, n, exp_result); in do_test() 174 FOR_EACH_IMPL (impl, 0) in do_page_tests() 254 FOR_EACH_IMPL (impl, 1) in do_random_tests() 288 FOR_EACH_IMPL (impl, 0) in bz12205() 289 check_result (impl, s1, s2, n, exp_result); in bz12205() 297 FOR_EACH_IMPL (impl, 0) in bz14195() 298 check_result (impl, empty_string, "", 5, 0); in bz14195() 316 FOR_EACH_IMPL (impl, 0) in test_locale() [all …]
|
A D | test-strrchr.c | 63 do_one_test (impl_t *impl, const CHAR *s, int c, CHAR *exp_res) in do_one_test() argument 65 CHAR *res = CALL (impl, s, c); in do_one_test() 68 error (0, 0, "Wrong result in function %s %p %p", impl->name, in do_one_test() 111 FOR_EACH_IMPL (impl, 0) in do_test() 112 do_one_test (impl, (CHAR *) (buf + align), seek_char, result); in do_test() 181 FOR_EACH_IMPL (impl, 1) in do_random_tests() 182 if (CALL (impl, (CHAR *) (p + align), seek_char) != result) in do_random_tests() 185 n, impl->name, align, seek_char, len, pos, in do_random_tests() 186 CALL (impl, (CHAR *) (p + align), seek_char), result, p); in do_random_tests() 200 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strspn.c | 93 do_one_test (impl_t *impl, const CHAR *s, const CHAR *acc, size_t exp_res) in do_one_test() argument 95 size_t res = CALL (impl, s, acc); in do_one_test() 98 error (0, 0, "Wrong result in function %s %p %p", impl->name, in do_one_test() 140 FOR_EACH_IMPL (impl, 0) in do_test() 141 do_one_test (impl, s, acc, pos); in do_test() 197 FOR_EACH_IMPL (impl, 1) in do_random_tests() 198 if (CALL (impl, (CHAR *) (p + align), in do_random_tests() 202 n, impl->name, align, acc, alen, pos, len, in do_random_tests() 203 CALL (impl, (CHAR *) (p + align), (CHAR *) acc), in do_random_tests() 218 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strcmp.c | 138 check_result (impl_t *impl, in check_result() argument 142 int result = CALL (impl, s1, s2); in check_result() 157 do_one_test (impl_t *impl, in do_one_test() argument 198 FOR_EACH_IMPL (impl, 0) in do_test() 278 FOR_EACH_IMPL (impl, 1) in do_random_tests() 328 FOR_EACH_IMPL (impl, 0) in check() 355 FOR_EACH_IMPL (impl, 0) in check() 389 FOR_EACH_IMPL (impl, 0) in check2() 413 FOR_EACH_IMPL (impl, 0) in check3() 431 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-strncmp.c | 129 int result = CALL (impl, s1, s2, n); in check_result() 166 FOR_EACH_IMPL (impl, 0) in do_test_limit() 167 do_one_test (impl, s1, s2, n, 0); in do_test_limit() 198 FOR_EACH_IMPL (impl, 0) in do_test_limit() 240 FOR_EACH_IMPL (impl, 0) in do_test() 259 FOR_EACH_IMPL (impl, 0) in do_page_test() 342 FOR_EACH_IMPL (impl, 1) in do_random_tests() 380 FOR_EACH_IMPL (impl, 0) in check1() 432 FOR_EACH_IMPL (impl, 0) in check3() 449 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memchr.c | 62 do_one_test (impl_t *impl, const CHAR *s, int c, size_t n, CHAR *exp_res) in do_one_test() argument 64 CHAR *res = CALL (impl, s, c, n); in do_one_test() 68 impl->name, s, c, n, res, exp_res); in do_one_test() 105 FOR_EACH_IMPL (impl, 0) in do_test() 106 do_one_test (impl, (CHAR *) (buf + align), seek_char, n, result); in do_test() 187 FOR_EACH_IMPL (impl, 1) in do_random_tests() 188 if (CALL (impl, (CHAR *) (p + align), seek_char, len) != result) in do_random_tests() 191 n, impl->name, align, seek_char, len, pos, in do_random_tests() 192 CALL (impl, (CHAR *) (p + align), seek_char, len), in do_random_tests() 207 FOR_EACH_IMPL (impl, 0) in test_main() [all …]
|
A D | test-memcpy.c | 88 FOR_EACH_IMPL (impl, 1) in do_random_tests() 94 res = (unsigned char *)CALL (impl, (char *)(p2 + align2), in do_random_tests() 101 n, impl->name, align1, align2, len, res, in do_random_tests() 111 impl->name, align1, align2, len); in do_random_tests() 122 impl->name, align1, align2, len); in do_random_tests() 131 impl->name, align1, align2, len); in do_random_tests() 146 FOR_EACH_IMPL (impl, 0) in test_main() 147 printf ("\t%s", impl->name); in test_main()
|
A D | test-strcasecmp.c | 64 do_one_test (impl_t *impl, const char *s1, const char *s2, int exp_result) in do_one_test() argument 66 int result = CALL (impl, s1, s2); in do_one_test() 71 error (0, 0, "Wrong result in function %s %d %d", impl->name, in do_one_test() 114 FOR_EACH_IMPL (impl, 0) in do_test() 115 do_one_test (impl, s1, s2, exp_result); in do_test() 191 FOR_EACH_IMPL (impl, 1) in do_random_tests() 193 r = CALL (impl, (char *) (p1 + align1), (char *) (p2 + align2)); in do_random_tests() 202 n, impl->name, align1, align2, len1, len2, pos, r, result, p1, p2); in do_random_tests() 221 FOR_EACH_IMPL (impl, 0) in test_locale() 222 printf ("\t%s", impl->name); in test_locale()
|