Home
last modified time | relevance | path

Searched refs:tests (Results 1 – 25 of 262) sorted by relevance

1234567891011

/glibc-2.36/
DRules87 tests-special += $(objpfx)check-installed-headers-c.out
99 tests-special += $(objpfx)check-installed-headers-cxx.out
111 tests-special += $(objpfx)check-wrapper-headers.out
120 tests-special += $(objpfx)check-obsolete-constructs.out
131 .PHONY: others tests bench bench-build
134 tests-printers-programs := $(addprefix $(objpfx),$(tests-printers))
136 # .out files with the output of running the pretty printer tests.
137 tests-printers-out := $(patsubst %,$(objpfx)%.out,$(tests-printers))
148 ifeq ($(run-built-tests),no)
149 tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
[all …]
/glibc-2.36/libio/
Dtst-swscanf.c33 } tests[] = variable
59 for (n = 0; n < sizeof (tests) / sizeof (tests[0]); ++n) in do_test()
64 if (tests[n].only_C_locale && strcmp (loc, "C") != 0) in do_test()
67 if (swscanf (tests[n].arg, tests[n].fmt, buf) != tests[n].retval) in do_test()
70 tests[n].arg, tests[n].fmt); in do_test()
73 else if (tests[n].retval != 0 && strcmp (buf, tests[n].res) != 0) in do_test()
76 tests[n].arg, tests[n].fmt, buf, tests[n].res); in do_test()
81 tests[n].arg, tests[n].fmt); in do_test()
83 if (swscanf (tests[n].arg, tests[n].wfmt, wbuf) != tests[n].retval) in do_test()
86 tests[n].arg, tests[n].wfmt); in do_test()
[all …]
Dtst_swprintf.c14 } tests[] = variable
38 for (n = 0; n < array_length (tests); ++n) in do_test()
40 ssize_t res = swprintf (buf, tests[n].n, L"%s", tests[n].str); in do_test()
42 if (tests[n].exp < 0 && res >= 0) in do_test()
46 tests[n].n, tests[n].str); in do_test()
48 else if (tests[n].exp >= 0 && tests[n].exp != res) in do_test()
53 tests[n].n, tests[n].str, tests[n].exp, res); in do_test()
57 tests[n].n, tests[n].str); in do_test()
/glibc-2.36/posix/
Drunptests.c32 } tests[] = variable
44 for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt) in main()
45 if (tests[cnt].str == NULL) in main()
47 printf ("\n%s\n%.*s\n", tests[cnt].reg, in main()
48 (int) strlen (tests[cnt].reg), in main()
51 else if (tests[cnt].reg == NULL) in main()
52 printf ("!!! %s\n", tests[cnt].str); in main()
59 printf ("regexp: \"%s\", string: \"%s\" -> ", tests[cnt].reg, in main()
60 tests[cnt].str); in main()
63 err = regcomp (&re, tests[cnt].reg, tests[cnt].options); in main()
[all …]
Dbug-regex11.c32 } tests[] = { variable
101 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in main()
103 n = regcomp (&re, tests[i].pattern, tests[i].flags); in main()
108 printf ("%s: regcomp %zd failed: %s\n", tests[i].pattern, i, buf); in main()
113 if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0)) in main()
115 printf ("%s: regexec %zd failed\n", tests[i].pattern, i); in main()
121 for (n = 0; n < tests[i].nmatch; ++n) in main()
122 if (rm[n].rm_so != tests[i].rm[n].rm_so in main()
123 || rm[n].rm_eo != tests[i].rm[n].rm_eo) in main()
125 if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) in main()
[all …]
Dbug-regex20.c39 } tests[] = { variable
198 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in main()
202 re_set_syntax (tests[i].syntax); in main()
204 err = re_compile_pattern (tests[i].pattern, strlen (tests[i].pattern), in main()
215 if (optimized != tests[i].optimize) in main()
218 i, optimized ? "" : "not ", tests[i].optimize ? "" : " not"); in main()
222 int str_len = strlen (tests[i].string); in main()
223 res = re_search (&regbuf, tests[i].string, str_len, 0, str_len, NULL); in main()
224 if (res != tests[i].res) in main()
232 res = re_search (&regbuf, tests[i].string, str_len, str_len, -str_len, in main()
[all …]
Dbug-regex28.c26 struct tests struct
33 static const struct tests tests[] = { variable
48 static const size_t tests_size = sizeof (tests) / sizeof (tests[0]);
57 re_set_syntax (tests[i].syntax); in do_test()
59 const char *re = re_compile_pattern (tests[i].regex, in do_test()
60 strlen (tests[i].regex), &r); in do_test()
65 size_t len = strlen (tests[i].string); in do_test()
66 int rv = re_search (&r, tests[i].string, len, 0, len, NULL); in do_test()
67 TEST_VERIFY (rv == tests[i].retval); in do_test()
69 printf ("info: i=%zu rv=%d expected=%d\n", i, rv, tests[i].retval); in do_test()
Dbug-regex17.c33 } tests[] = { variable
69 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in do_test()
71 n = regcomp (&re, tests[i].pattern, tests[i].flags); in do_test()
81 if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0)) in do_test()
89 for (n = 0; n < tests[i].nmatch; ++n) in do_test()
90 if (rm[n].rm_so != tests[i].rm[n].rm_so in do_test()
91 || rm[n].rm_eo != tests[i].rm[n].rm_eo) in do_test()
93 if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) in do_test()
Dbug-regex30.c33 } tests[] = { variable
60 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in do_test()
64 int n = regcomp (&re, tests[i].pattern, tests[i].flags); in do_test()
74 if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0)) in do_test()
82 for (n = 0; n < tests[i].nmatch; ++n) in do_test()
83 if (rm[n].rm_so != tests[i].rm[n].rm_so in do_test()
84 || rm[n].rm_eo != tests[i].rm[n].rm_eo) in do_test()
86 if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) in do_test()
Dbug-regex18.c33 } tests[] = { variable
62 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in main()
64 n = regcomp (&re, tests[i].pattern, tests[i].flags); in main()
74 if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0)) in main()
82 for (n = 0; n < tests[i].nmatch; ++n) in main()
83 if (rm[n].rm_so != tests[i].rm[n].rm_so in main()
84 || rm[n].rm_eo != tests[i].rm[n].rm_eo) in main()
86 if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) in main()
/glibc-2.36/localedata/
Dtst-xlocale1.c12 } tests[] = variable
20 #define ntests (sizeof (tests) / sizeof (tests[0]))
34 if (setlocale (LC_ALL, tests[cnt].locale) == NULL) in do_test()
36 printf ("cannot set locale \"%s\": %m\n", tests[cnt].locale); in do_test()
42 tests[cnt].str1, tests[cnt].str2); in do_test()
44 r = strcasecmp_l (tests[cnt].str1, tests[cnt].str2, loc); in do_test()
45 if (tests[cnt].result == 0) in do_test()
50 tests[cnt].str1, tests[cnt].str2, r); in do_test()
54 else if (tests[cnt].result < 0) in do_test()
59 tests[cnt].str1, tests[cnt].str2, r); in do_test()
[all …]
Dtst-locale.sh63 test_locale tests/test1.cm tests/test1.def test1
64 test_locale tests/test2.cm tests/test2.def test2
65 test_locale tests/test3.cm tests/test3.def test3
66 test_locale tests/test4.cm tests/test4.def test4
67 test_locale tests/test5.cm tests/test5.def test5 tests/test5.ds
68 test_locale tests/test6.cm tests/test6.def test6 tests/test6.ds
69 test_locale tests/test7.cm tests/test7.def test7
/glibc-2.36/string/
Dtst-svc2.c10 } tests[] = variable
16 #define ntests (sizeof (tests) / sizeof (tests[0]))
35 if (compare (tests[i].str1, tests[i].str2, -1)) in do_test()
37 printf ("FAIL: \"%s\" > \"%s\"\n", tests[i].str1, tests[i].str2); in do_test()
40 if (compare (tests[i].str2, tests[i].str1, +1)) in do_test()
42 printf ("FAIL: \"%s\" > \"%s\"\n", tests[i].str2, tests[i].str1); in do_test()
45 char *copy1 = strdupa (tests[i].str1); in do_test()
46 if (compare (tests[i].str1, copy1, 0)) in do_test()
48 printf ("FAIL: \"%s\" != \"%s\"\n", tests[i].str1, copy1); in do_test()
51 char *copy2 = strdupa (tests[i].str2); in do_test()
[all …]
/glibc-2.36/misc/
Dtst-efgcvt-template.c143 test (testcase tests[], efcvt_func efcvt, const char *name) in test() argument
149 while (tests[no].value != -1.0) in test()
151 p = efcvt (tests[no].value, tests[no].ndigit, &decpt, &sign); in test()
152 if (decpt != tests[no].decpt in test()
153 || sign != (tests[no].value < 0) in test()
154 || strcmp (p, tests[no].result) != 0) in test()
155 output_error (name, tests[no].value, tests[no].ndigit, in test()
156 tests[no].result, tests[no].decpt, in test()
157 (tests[no].value < 0), in test()
164 test_r (testcase tests[], efcvt_r_func efcvt_r, const char *name) in test_r() argument
[all …]
Dtst-mntent-escape.c36 struct const_mntent tests[] = variable
53 for (int i = 0; i < sizeof (tests) / sizeof (struct const_mntent); i++) in do_test()
65 curtest.mnt_fsname = strdupa (tests[i].mnt_fsname); in do_test()
66 curtest.mnt_dir = strdupa (tests[i].mnt_dir); in do_test()
67 curtest.mnt_type = strdupa (tests[i].mnt_type); in do_test()
68 curtest.mnt_opts = strdupa (tests[i].mnt_opts); in do_test()
69 curtest.mnt_freq = tests[i].mnt_freq; in do_test()
70 curtest.mnt_passno = tests[i].mnt_passno; in do_test()
78 TEST_COMPARE_STRING (buf, tests[i].expected); in do_test()
88 TEST_COMPARE_STRING(tests[i].mnt_fsname, ret->mnt_fsname); in do_test()
[all …]
/glibc-2.36/time/
Dtst-getdate.c35 } tests [] = variable
113 for (int i = 0; i < array_length (tests); ++i) in do_test()
115 setenv ("TZ", tests[i].tz, 1); in do_test()
117 tm = getdate (tests[i].str); in do_test()
126 TEST_COMPARE (tests[i].tm.tm_mon, tm->tm_mon); in do_test()
127 TEST_COMPARE (tests[i].tm.tm_year, tm->tm_year); in do_test()
128 TEST_COMPARE (tests[i].tm.tm_mday, tm->tm_mday); in do_test()
129 TEST_COMPARE (tests[i].tm.tm_hour, tm->tm_hour); in do_test()
130 TEST_COMPARE (tests[i].tm.tm_min, tm->tm_min); in do_test()
131 TEST_COMPARE (tests[i].tm.tm_sec, tm->tm_sec); in do_test()
[all …]
/glibc-2.36/stdlib/
Dtst-strtod1i.c38 } tests[] = in do_test() local
45 #define ntests (sizeof (tests) / sizeof (tests[0])) in do_test()
56 if (setlocale (LC_ALL, tests[n].loc) == NULL) in do_test()
58 printf ("cannot set locale %s\n", tests[n].loc); in do_test()
63 d = __strtod_internal (tests[n].str, &endp, 1); in do_test()
64 if (d != tests[n].exp) in do_test()
67 tests[n].str, d, tests[n].exp); in do_test()
70 else if (endp - tests[n].str != tests[n].nread) in do_test()
73 tests[n].str, endp - tests[n].str, tests[n].nread); in do_test()
Dtest-canon.c55 } tests[] = { variable
163 for (i = 0; i < (int) (sizeof (tests) / sizeof (tests[0])); ++i) in do_test()
166 result = realpath (tests[i].in, buf); in do_test()
168 if (!check_path (result, tests[i].out)) in do_test()
171 argv[0], i, tests[i].out ? tests[i].out : "NULL", in do_test()
179 && !check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved)) in do_test()
182 argv[0], i, tests[i].out ? tests[i].out : tests[i].resolved, in do_test()
188 if (!tests[i].out && errno != tests[i].error) in do_test()
191 argv[0], i, tests[i].error, errno); in do_test()
196 char *result2 = realpath (tests[i].in, NULL); in do_test()
Dtst-strtod2.c9 } tests[] = variable
24 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in do_test()
27 double r = strtod (tests[i].str, &ep); in do_test()
28 if (r != tests[i].result) in do_test()
30 printf ("test %zu r = %g, expect %g\n", i, r, tests[i].result); in do_test()
33 if (ep != tests[i].str + tests[i].offset) in do_test()
36 i, ep - tests[i].str, tests[i].offset); in do_test()
/glibc-2.36/sysdeps/pthread/
Dtst-cancel4-common.c41 if (tests[cnt].only_early) in do_test()
44 if (pthread_barrier_init (&b2, NULL, tests[cnt].nb) != 0) in do_test()
54 if (pthread_create (&th, NULL, tests[cnt].tf, NULL) != 0) in do_test()
56 printf ("create for '%s' test failed\n", tests[cnt].name); in do_test()
75 printf ("cancel for '%s' failed\n", tests[cnt].name); in do_test()
83 printf ("join for '%s' failed\n", tests[cnt].name); in do_test()
89 printf ("thread for '%s' not canceled\n", tests[cnt].name); in do_test()
103 printf ("cleanup handler not called for '%s'\n", tests[cnt].name); in do_test()
110 tests[cnt].name); in do_test()
115 printf ("in-time cancel test of '%s' successful\n", tests[cnt].name); in do_test()
[all …]
/glibc-2.36/resolv/
Dtst-aton.c26 static const struct tests struct
31 } tests[] = variable
77 for (cnt = 0; cnt < array_length (tests); ++cnt) in do_test()
81 if ((int) inet_aton (tests[cnt].input, &addr) != tests[cnt].valid) in do_test()
83 if (tests[cnt].valid) in do_test()
84 printf ("\"%s\" not seen as valid IP address\n", tests[cnt].input); in do_test()
86 printf ("\"%s\" seen as valid IP address\n", tests[cnt].input); in do_test()
89 else if (tests[cnt].valid && addr.s_addr != ntohl (tests[cnt].result)) in do_test()
92 tests[cnt].input, addr.s_addr, tests[cnt].result); in do_test()
/glibc-2.36/crypt/
Dbadsalttest.c24 static const char *tests[][2] = variable
41 size_t n = sizeof (tests) / sizeof (*tests); in do_test()
61 tests[n - 1][1] = &page[pagesize - 1]; in do_test()
69 if (crypt (tests[i][0], tests[i][1])) in do_test()
73 tests[i][0], tests[i][1]); in do_test()
76 if (crypt_r (tests[i][0], tests[i][1], &cd)) in do_test()
80 tests[i][0], tests[i][1]); in do_test()
/glibc-2.36/resource/
Dtst-getrlimit.c29 } tests[] = variable
63 #define ntests (sizeof (tests) / sizeof (tests[0]))
76 int res = getrlimit (tests[i].resource, &r); in do_test()
81 if (tests[i].required) in do_test()
84 tests[i].name); in do_test()
92 tests[i].name); in do_test()
99 res = getrlimit64 (tests[i].resource, &r64); in do_test()
104 if (tests[i].required) in do_test()
107 "\n", tests[i].name); in do_test()
115 tests[i].name); in do_test()
[all …]
/glibc-2.36/io/
Dtst-utimensat-skeleton.c32 } tests[] = { variable
72 for (int i = 0; i < array_length (tests); i++) in do_test()
76 if (__builtin_add_overflow (tests[i].v1, 0, &t) in do_test()
77 || __builtin_add_overflow (tests[i].v2, 0, &t)) in do_test()
80 "time_t overflows\n", i, tests[i].v1, tests[i].v2); in do_test()
84 if (tests[i].v1 >= 0x100000000LL && !y2106) in do_test()
88 i, tests[i].v1, tests[i].v2); in do_test()
92 TEST_CALL (testfile, temp_fd, testlink, tests[i].v1, tests[i].v2); in do_test()
/glibc-2.36/sysdeps/ieee754/ldbl-96/
Dtest-totalorderl-ldbl-96.c26 static const uint64_t tests[] = variable
38 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) in do_test()
45 tests[i] >> 32, tests[i] & 0xffffffffULL); in do_test()
47 (tests[i] >> 32) | 0x80000000, in do_test()
48 tests[i] & 0xffffffffULL); in do_test()
50 tests[i] >> 32, tests[i] & 0xffffffffULL); in do_test()
52 (tests[i] >> 32) | 0x80000000, in do_test()
53 tests[i] & 0xffffffffULL); in do_test()

1234567891011