bin/ksh/misc.c
714
posix_cclass(const unsigned char *pattern, int test, const unsigned char **ep)
bin/ksh/misc.c
730
if (cc->isctype(test))
bin/pax/pat_rep.c
496
char test;
bin/pax/pat_rep.c
521
if ((test = *string++) == '\0')
bin/pax/pat_rep.c
541
while ((test = *string) != '\0') {
bin/pax/pat_rep.c
551
if (((test = *string++) == '\0') ||
bin/pax/pat_rep.c
552
((pattern = range_match(pattern, test)) == NULL))
bin/pax/pat_rep.c
569
range_match(char *pattern, int test)
bin/pax/pat_rep.c
588
if ((c <= test) && (test <= c2))
bin/pax/pat_rep.c
591
} else if (c == test)
games/backgammon/common_source/table.c
159
int test;
games/backgammon/common_source/table.c
161
test = (c == 'R');
games/backgammon/common_source/table.c
164
if (a == c || (test && a == '\n')) {
games/backgammon/common_source/table.c
225
if (!test || a != '\n')
games/backgammon/teachgammon/data.c
386
const struct situatn test[] = {
games/backgammon/teachgammon/tutor.c
100
D0 = test[i].roll1;
games/backgammon/teachgammon/tutor.c
101
D1 = test[i].roll2;
games/backgammon/teachgammon/tutor.c
105
if (test[i].mp[j] == test[i].mg[j])
games/backgammon/teachgammon/tutor.c
107
p[j] = test[i].mp[j];
games/backgammon/teachgammon/tutor.c
108
g[j] = test[i].mg[j];
games/backgammon/teachgammon/tutor.c
117
D0 = test[i].new1;
games/backgammon/teachgammon/tutor.c
118
D1 = test[i].new2;
games/backgammon/teachgammon/tutor.c
59
if (!brdeq(test[i].brd, board)) {
games/backgammon/teachgammon/tutor.c
64
text(*test[i].ans);
games/backgammon/teachgammon/tutor.c
65
memcpy(board,test[i].brd,26*sizeof(int));
games/backgammon/teachgammon/tutor.c
96
text(*test[i].com);
games/backgammon/teachgammon/tutor.h
61
extern const struct situatn test[];
games/gomoku/main.c
101
test = 1;
games/gomoku/main.c
104
test = 2;
games/gomoku/main.c
139
if (inputfp == NULL && test == 0) {
games/gomoku/main.c
173
switch (test) {
games/gomoku/main.c
203
switch (test) {
games/gomoku/main.c
52
int test; /* both moves come from 1: input, 2: computer */
lib/libc/arch/sparc64/fpu/fpu_qp.c
140
#define _QP_CMP(name, cmpe, test) \
lib/libc/arch/sparc64/fpu/fpu_qp.c
155
return (test(FSR_GET_FCC0(fe.fe_fsr))); \
lib/libc/gen/fnmatch.c
124
if (cc->isctype((unsigned char)test))
lib/libc/gen/fnmatch.c
99
classmatch(const char *pattern, char test, int foldcase, const char **ep)
lib/libc/stdlib/random.c
200
int32_t test;
lib/libc/stdlib/random.c
218
test = 16807 * val.rem - 2836 * val.quot;
lib/libc/stdlib/random.c
219
state[i] = test + (test < 0 ? 2147483647 : 0);
lib/libcrypto/dsa/dsa_gen.c
111
BIGNUM *r0, *W, *X, *c, *test;
lib/libcrypto/dsa/dsa_gen.c
168
if ((test = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
171
if (!BN_lshift(test, BN_value_one(), bits - 1))
lib/libcrypto/dsa/dsa_gen.c
270
if (!BN_add(X, X, test))
lib/libcrypto/dsa/dsa_gen.c
284
if (BN_cmp(p, test) >= 0) {
lib/libcrypto/dsa/dsa_gen.c
309
if (!BN_sub(test, p, BN_value_one()))
lib/libcrypto/dsa/dsa_gen.c
311
if (!BN_div_ct(r0, NULL, test, q, ctx))
lib/libcrypto/dsa/dsa_gen.c
314
if (!BN_set_word(test, h))
lib/libcrypto/dsa/dsa_gen.c
321
if (!BN_mod_exp_mont_ct(g, test, r0, p, ctx, mont))
lib/libcrypto/dsa/dsa_gen.c
325
if (!BN_add(test, test, BN_value_one()))
lib/libcurses/base/lib_newwin.c
263
NCURSES_SIZE_T test = (NCURSES_SIZE_T) value;
lib/libcurses/base/lib_newwin.c
264
return (test == value && value > 0);
lib/libcurses/tinfo/access.c
113
const char *test = strrchr(path, '/');
lib/libcurses/tinfo/access.c
115
if (test == 0)
lib/libcurses/tinfo/access.c
116
test = strrchr(path, '\\');
lib/libcurses/tinfo/access.c
118
if (test == 0)
lib/libcurses/tinfo/access.c
119
test = path;
lib/libcurses/tinfo/access.c
121
test++;
lib/libcurses/tinfo/access.c
122
return (unsigned) (test - path);
lib/libcurses/tinfo/read_entry.c
629
size_t test = lens + size;
lib/libcurses/tinfo/read_entry.c
632
if (test < limit) {
lib/libedit/chared.c
278
int test;
lib/libedit/chared.c
281
test = (*wtest)(*p);
lib/libedit/chared.c
282
while ((p < high) && (*wtest)(*p) == test)
lib/libedit/chared.c
307
int test;
lib/libedit/chared.c
313
test = (*wtest)(*p);
lib/libedit/chared.c
314
while ((p >= low) && (*wtest)(*p) == test)
lib/libedit/chared.c
371
int test;
lib/libedit/chared.c
379
test = (*wtest)(*p);
lib/libedit/chared.c
380
while ((p < high) && (*wtest)(*p) == test)
lib/libexpat/tests/basic_tests.c
1437
AttTest *test;
lib/libexpat/tests/basic_tests.c
1439
for (test = attr_data; test->definition != NULL; test++) {
lib/libexpat/tests/basic_tests.c
1440
set_subtest("%s", test->definition);
lib/libexpat/tests/basic_tests.c
1442
XML_SetUserData(g_parser, test);
lib/libexpat/tests/basic_tests.c
1447
if (_XML_Parse_SINGLE_BYTES(g_parser, test->definition,
lib/libexpat/tests/basic_tests.c
1448
(int)strlen(test->definition), XML_TRUE)
lib/libexpat/tests/common.c
151
tcase_add_test__ifdef_xml_dtd(TCase *tc, tcase_test_function test) {
lib/libexpat/tests/common.c
153
tcase_add_test(tc, test);
lib/libexpat/tests/common.c
156
UNUSED_P(test);
lib/libexpat/tests/common.c
161
tcase_add_test__if_xml_ge(TCase *tc, tcase_test_function test) {
lib/libexpat/tests/common.c
163
tcase_add_test(tc, test);
lib/libexpat/tests/common.c
166
UNUSED_P(test);
lib/libexpat/tests/common.h
92
extern void tcase_add_test__ifdef_xml_dtd(TCase *tc, tcase_test_function test);
lib/libexpat/tests/common.h
93
extern void tcase_add_test__if_xml_ge(TCase *tc, tcase_test_function test);
lib/libexpat/tests/minicheck.c
103
tc->tests[tc->ntests] = test;
lib/libexpat/tests/minicheck.c
92
tcase_add_test(TCase *tc, tcase_test_function test) {
lib/libexpat/tests/minicheck.h
143
void tcase_add_test(TCase *tc, tcase_test_function test);
lib/libmenu/m_global.c
275
int test = wcwidth(temp[n]);
lib/libmenu/m_global.c
277
if (test <= 0)
lib/libmenu/m_global.c
278
test = 1;
lib/libmenu/m_global.c
279
result += test;
regress/lib/csu/callbacks/atexit/atexit_test.c
62
int test;
regress/lib/csu/callbacks/atexit/atexit_test.c
73
test = 0;
regress/lib/csu/callbacks/atexit/atexit_test.c
75
test = atoi(argv[1]);
regress/lib/csu/callbacks/atexit/atexit_test.c
77
switch (test) {
regress/lib/csu/callbacks/pthread_atfork/pthread_atfork_test.c
105
test = 0;
regress/lib/csu/callbacks/pthread_atfork/pthread_atfork_test.c
107
test = atoi(argv[1]);
regress/lib/csu/callbacks/pthread_atfork/pthread_atfork_test.c
109
switch (test) {
regress/lib/csu/callbacks/pthread_atfork/pthread_atfork_test.c
90
int test, status;
regress/lib/libc/malloc/malloc0test/malloc0test.c
104
prot = test(blob, tsize);
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
251
void (*test)(void);
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
255
struct test tests[] = {
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
297
(*tests[i].test)();
regress/lib/libc/orientation/orientation_test.c
52
fail(int line, int r, char const *expect, char const *test)
regress/lib/libc/orientation/orientation_test.c
57
line, r, expect, test);
regress/lib/libc/qsort/qsort_test.c
45
int (*test)(struct test_distribution *d, int n, void *x, void *y, void *z);
regress/lib/libc/qsort/qsort_test.c
710
if (d->test(d, n, x, y, z) != 0)
regress/lib/libc/strtol/strtoltest.c
55
struct strtol_test *test;
regress/lib/libc/strtol/strtoltest.c
62
test = &strtol_tests[i];
regress/lib/libc/strtol/strtoltest.c
64
n = strtol(test->input, &end, test->base);
regress/lib/libc/strtol/strtoltest.c
65
if (n != test->output) {
regress/lib/libc/strtol/strtoltest.c
67
i, test->input, test->base, n);
regress/lib/libc/strtol/strtoltest.c
69
} else if (*end != test->end) {
regress/lib/libc/strtol/strtoltest.c
71
i, test->end, *end);
regress/lib/libc/strtol/strtoltest.c
73
} else if (errno != test->err) {
regress/lib/libc/strtol/strtoltest.c
75
i, test->err, errno);
regress/lib/libc/strtonum/strtonumtest.c
44
test("1", 0, 10, 1);
regress/lib/libc/strtonum/strtonumtest.c
45
test("0", -2, 5, 1);
regress/lib/libc/strtonum/strtonumtest.c
46
test("0", 2, 5, 0);
regress/lib/libc/strtonum/strtonumtest.c
47
test("0", 2, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
48
test("-2", 0, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
49
test("0", -5, LLONG_MAX, 1);
regress/lib/libc/strtonum/strtonumtest.c
50
test("-3", -3, LLONG_MAX, 1);
regress/lib/libc/strtonum/strtonumtest.c
51
test("-9223372036854775808", LLONG_MIN, LLONG_MAX, 1);
regress/lib/libc/strtonum/strtonumtest.c
52
test("9223372036854775807", LLONG_MIN, LLONG_MAX, 1);
regress/lib/libc/strtonum/strtonumtest.c
53
test("-9223372036854775809", LLONG_MIN, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
54
test("9223372036854775808", LLONG_MIN, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
55
test("1000000000000000000000000", LLONG_MIN, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
56
test("-1000000000000000000000000", LLONG_MIN, LLONG_MAX, 0);
regress/lib/libc/strtonum/strtonumtest.c
57
test("-2", 10, -1, 0);
regress/lib/libc/strtonum/strtonumtest.c
58
test("-2", -10, -1, 1);
regress/lib/libc/strtonum/strtonumtest.c
59
test("-20", -10, -1, 0);
regress/lib/libc/strtonum/strtonumtest.c
60
test("20", -10, -1, 0);
regress/lib/libc/sys/atf-c.c
37
int test;
regress/lib/libc/sys/atf-c.c
42
int ch, test;
regress/lib/libc/sys/atf-c.c
73
test = strtonum(num, 1, INT_MAX, &errstr);
regress/lib/libc/sys/atf-c.c
80
ATF_CLEANUP(test);
regress/lib/libc/sys/atf-c.c
82
ATF_RUN(test);
regress/lib/libc/sys/atf-c.c
84
ATF_INSPECT(test);
regress/lib/libc/sys/t_fork.c
241
#define RAISE(test, sig) \
regress/lib/libc/sys/t_fork.c
242
ATF_TC(test); \
regress/lib/libc/sys/t_fork.c
243
ATF_TC_HEAD(test, tc) \
regress/lib/libc/sys/t_fork.c
250
ATF_TC_BODY(test, tc) \
regress/lib/libc/sys/t_fork.c
334
#define NESTED(test, fn, flags) \
regress/lib/libc/sys/t_fork.c
335
ATF_TC(test); \
regress/lib/libc/sys/t_fork.c
336
ATF_TC_HEAD(test, tc) \
regress/lib/libc/sys/t_fork.c
343
ATF_TC_BODY(test, tc) \
regress/lib/libc/sys/t_mkdir.c
185
const char **test;
regress/lib/libc/sys/t_mkdir.c
187
for (test = &tests[0]; *test != NULL; ++test) {
regress/lib/libc/sys/t_mkdir.c
189
(void)printf("Checking \"%s\"\n", *test);
regress/lib/libc/sys/t_mkdir.c
190
(void)rmdir(*test);
regress/lib/libc/sys/t_mkdir.c
192
ATF_REQUIRE(mkdir(*test, 0777) == 0);
regress/lib/libc/sys/t_mkdir.c
193
ATF_REQUIRE(rename(*test, "foo") == 0);
regress/lib/libc/sys/t_mkdir.c
194
ATF_REQUIRE(rename("foo/", *test) == 0);
regress/lib/libc/sys/t_mkdir.c
195
ATF_REQUIRE(rmdir(*test) == 0);
regress/lib/libc/time/time_conversion/timetest.c
1753
int dotimetest(struct timetest *test, int print)
regress/lib/libc/time/time_conversion/timetest.c
1758
if (gmtime_r(&test->time, &gmt) == NULL) {
regress/lib/libc/time/time_conversion/timetest.c
1763
if (converted != test->time) {
regress/lib/libc/time/time_conversion/timetest.c
1765
"does not match expected value\n", test->descr,
regress/lib/libc/time/time_conversion/timetest.c
1766
test->timezone);
regress/lib/libc/time/time_conversion/timetest.c
1767
fprintf(stderr, "expected: %lld\n", test->time);
regress/lib/libc/time/time_conversion/timetest.c
1772
if (!tm_match(&test->gmt_tm, &gmt)) {
regress/lib/libc/time/time_conversion/timetest.c
1774
" match expected value\n", test->descr, test->timezone);
regress/lib/libc/time/time_conversion/timetest.c
1776
printtm(stderr, &test->gmt_tm);
regress/lib/libc/time/time_conversion/timetest.c
1781
setenv("TZ", test->timezone, 1);
regress/lib/libc/time/time_conversion/timetest.c
1782
if (localtime_r(&test->time, &local) == NULL) {
regress/lib/libc/time/time_conversion/timetest.c
1787
if (converted != test->time) {
regress/lib/libc/time/time_conversion/timetest.c
1789
"does not match expected value\n", test->descr,
regress/lib/libc/time/time_conversion/timetest.c
1790
test->timezone);
regress/lib/libc/time/time_conversion/timetest.c
1791
fprintf(stderr, "expected: %lld\n", test->time);
regress/lib/libc/time/time_conversion/timetest.c
1796
if (!tm_match(&test->local_tm, &local)) {
regress/lib/libc/time/time_conversion/timetest.c
1798
"not match expected value\n", test->descr, test->timezone);
regress/lib/libc/time/time_conversion/timetest.c
1800
printtm(stderr, &test->local_tm);
regress/lib/libc/time/time_conversion/timetest.c
1807
".time=%lld,\n", test->descr, test->timezone, test->time);
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
101
if (memcmp(out, test->want, test->want_len) != 0) {
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
74
asn1_string_to_utf8_test(const struct asn1_string_to_utf8_test_case *test)
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
82
der = test->der;
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
83
if ((str = (ASN1_STRING *)ASN1_item_d2i(NULL, &der, test->der_len,
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
84
test->item)) == NULL) {
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
91
test->want_len);
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
95
if (ret != test->want_len) {
regress/lib/libcrypto/asn1/asn1_string_to_utf8.c
97
test->want_len);
regress/lib/libcrypto/asn1/asn1oct.c
100
__func__, test->desc, test->want, got);
regress/lib/libcrypto/asn1/asn1oct.c
227
test_s2i_ASN1_OCTET_STRING(const struct s2i_asn1_octet_string_test *test)
regress/lib/libcrypto/asn1/asn1oct.c
231
int should_fail = test->want == NULL;
regress/lib/libcrypto/asn1/asn1oct.c
234
if ((aos = s2i_ASN1_OCTET_STRING(NULL, NULL, test->in)) == NULL) {
regress/lib/libcrypto/asn1/asn1oct.c
236
errx(1, "%s: s2i_ASN1_OCTET_STRING", test->desc);
regress/lib/libcrypto/asn1/asn1oct.c
241
errx(1, "%s: i2s_ASN1_OCTET_STRING", test->desc);
regress/lib/libcrypto/asn1/asn1oct.c
243
assert(test->want != NULL);
regress/lib/libcrypto/asn1/asn1oct.c
244
if (strcmp(test->want, got) != 0) {
regress/lib/libcrypto/asn1/asn1oct.c
246
__func__, test->desc, test->want, got);
regress/lib/libcrypto/asn1/asn1oct.c
80
test_i2s_ASN1_OCTET_STRING(const struct i2s_asn1_octet_string_test *test)
regress/lib/libcrypto/asn1/asn1oct.c
83
int should_fail = test->want == NULL;
regress/lib/libcrypto/asn1/asn1oct.c
90
if (!ASN1_STRING_set(aos, (void *)test->buf, test->len))
regress/lib/libcrypto/asn1/asn1oct.c
98
if (!should_fail && strcmp(test->want, got) != 0) {
regress/lib/libcrypto/bn/bn_gcd.c
3488
const struct gcd_test_fn *test = &gcd_fn[i];
regress/lib/libcrypto/bn/bn_gcd.c
3491
if (test->fails_on_zero && BN_is_zero(b))
regress/lib/libcrypto/bn/bn_gcd.c
3497
if (!test->fn(got, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_gcd.c
3499
test->name, testcase->a, testcase->b);
regress/lib/libcrypto/bn/bn_gcd.c
3507
test->name, i, signs, testcase->r);
regress/lib/libcrypto/bn/bn_gcd.c
3540
bn_binomial_gcd_test(const struct gcd_test_fn *test, int k, BIGNUM *a,
regress/lib/libcrypto/bn/bn_gcd.c
3550
errx(1, "%s: gcd = BN_CTX_get(ctx)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3555
if (test->fails_on_zero && BN_is_zero(b))
regress/lib/libcrypto/bn/bn_gcd.c
3561
if (!test->fn(gcd, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_gcd.c
3563
test->name, k, shift, signs);
regress/lib/libcrypto/bn/bn_gcd.c
3569
test->name, k, shift, signs);
regress/lib/libcrypto/bn/bn_gcd.c
3576
test->name, k, shift, signs);
regress/lib/libcrypto/bn/bn_gcd.c
3586
errx(1, "%s: BN_lshift1(a, a)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3588
errx(1, "%s: BN_lshift1(b, b)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3616
const struct gcd_test_fn *test = &gcd_fn[i];
regress/lib/libcrypto/bn/bn_gcd.c
3624
errx(1, "%s: BN_set_bit(a, 2 * k)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3626
errx(1, "%s: BN_sub_word(a, 1)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3630
errx(1, "%s: BN_set_bit(a, k)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3632
errx(1, "%s: BN_sub_word(a, 1)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3634
failed |= bn_binomial_gcd_test(test, k, a, b, ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3641
errx(1, "%s: BN_set_bit(a, 2 * k)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3643
errx(1, "%s: BN_sub_word(a, 1)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3647
errx(1, "%s: BN_set_bit(a, k)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3649
errx(1, "%s: BN_add_word(a, 1)", test->name);
regress/lib/libcrypto/bn/bn_gcd.c
3651
failed |= bn_binomial_gcd_test(test, k, a, b, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
100
bn_mod_exp_zero_test(const struct mod_exp_test *test, BN_CTX *ctx,
regress/lib/libcrypto/bn/bn_mod_exp.c
130
if (test->mod_exp_fn != NULL) {
regress/lib/libcrypto/bn/bn_mod_exp.c
131
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
133
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
137
fprintf(stderr, "%s failed\n", test->name);
regress/lib/libcrypto/bn/bn_mod_exp.c
143
print_zero_test_failure(got, a, m, test->name);
regress/lib/libcrypto/bn/bn_mod_exp.c
339
const BIGNUM *m, BN_CTX *ctx, const struct mod_exp_test *test)
regress/lib/libcrypto/bn/bn_mod_exp.c
350
if (test->mod_exp_fn != NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
351
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
353
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
356
errx(1, "%s() failed", test->name);
regress/lib/libcrypto/bn/bn_mod_exp.c
359
dump_results(a, p, NULL, NULL, m, want, got, test->name);
regress/lib/libcrypto/bn/bn_mod_exp.c
390
const struct mod_exp_test *test = &mod_exp_fn[j];
regress/lib/libcrypto/bn/bn_mod_exp.c
392
if (!test_mod_exp(want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
612
BN_CTX *ctx, const struct mod_exp_test *test)
regress/lib/libcrypto/bn/bn_mod_exp.c
619
if (test->mod_exp_fn != NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
620
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
622
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
625
warnx("%s() %s aliased with result failed", test->name, alias);
regress/lib/libcrypto/bn/bn_mod_exp.c
633
dump_results(a, p, NULL, NULL, m, want, got, test->name);
regress/lib/libcrypto/bn/bn_mod_exp.c
647
test_bn_mod_exp_aliasing_test(const struct mod_exp_test *test,
regress/lib/libcrypto/bn/bn_mod_exp.c
650
int modulus_alias_works = test->mod_exp_fn != BN_mod_exp_simple;
regress/lib/libcrypto/bn/bn_mod_exp.c
659
test))
regress/lib/libcrypto/bn/bn_mod_exp.c
662
if (!test_mod_exp_aliased("a", 1, a, want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
665
if (!test_mod_exp_aliased("p", 1, p, want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
669
a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
701
const struct mod_exp_test *test = &mod_exp_fn[i];
regress/lib/libcrypto/bn/bn_mod_exp.c
702
failed |= test_bn_mod_exp_aliasing_test(test, a, p, m,
regress/lib/libcrypto/bn/bn_mod_inverse.c
277
bn_mod_inverse_test(const struct mod_inv_test *test, BN_CTX *ctx, int flags)
regress/lib/libcrypto/bn/bn_mod_inverse.c
305
if (BN_hex2bn(&i, test->i) == 0)
regress/lib/libcrypto/bn/bn_mod_inverse.c
306
errx(1, "BN_hex2bn(%s)", test->i);
regress/lib/libcrypto/bn/bn_mod_inverse.c
307
if (BN_hex2bn(&a, test->a) == 0)
regress/lib/libcrypto/bn/bn_mod_inverse.c
308
errx(1, "BN_hex2bn(%s)", test->a);
regress/lib/libcrypto/bn/bn_mod_inverse.c
309
if (BN_hex2bn(&m, test->m) == 0)
regress/lib/libcrypto/bn/bn_mod_inverse.c
310
errx(1, "BN_hex2bn(%s)", test->m);
regress/lib/libcrypto/bn/bn_mod_inverse.c
323
flags, test->i, test->a, test->m);
regress/lib/libcrypto/bn/bn_mod_inverse.c
336
flags, test->i, test->a, test->m);
regress/lib/libcrypto/bn/bn_mod_inverse.c
349
flags, test->i, test->a, test->m);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2834
mod_sqrt_test(struct mod_sqrt_test *test, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2852
if (!BN_hex2bn(&a, test->a))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2853
errx(1, "BN_hex2bn(%s)", test->a);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2854
if (!BN_hex2bn(&p, test->p))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2855
errx(1, "BN_hex2bn(%s)", test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2858
failed = test->sqrt != NULL;
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2861
test->a, test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2865
if (!BN_hex2bn(&want, test->sqrt))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2866
errx(1, "BN_hex2bn(%s)", test->sqrt);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2871
fprintf(stderr, "a: %s\n", test->a);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2872
fprintf(stderr, "p: %s\n", test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2873
fprintf(stderr, "want: %s\n", test->sqrt);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4434
bn_mod_sqrt_p_is_1_mod_8_test(const struct p_is_1_mod_8_tests *test,
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4438
const char *const *sqrts = test->sqrt;
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4455
if (!BN_hex2bn(&p, test->p))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4463
if (i < test->first_non_square || sqrts[i] != NULL) {
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4465
i, test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4472
fprintf(stderr, "sqrt(%d) (mod %s): ", i, test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4487
fprintf(stderr, "p: %s\n", test->p);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4514
const struct p_is_1_mod_8_tests *test = &p_is_1_mod_8_tests[i];
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4516
failed |= bn_mod_sqrt_p_is_1_mod_8_test(test, ctx);
regress/lib/libcrypto/bn/bn_print.c
153
bn_print_testcase(const BIGNUM *bn, const struct print_test *test)
regress/lib/libcrypto/bn/bn_print.c
170
if ((want_len = strlen(test->want)) != (size_t)got_len) {
regress/lib/libcrypto/bn/bn_print.c
172
test->desc, want_len, got_len);
regress/lib/libcrypto/bn/bn_print.c
176
if (strncmp(got, test->want, want_len) != 0) {
regress/lib/libcrypto/bn/bn_print.c
177
fprintf(stderr, "%s: strings differ\n", test->desc);
regress/lib/libcrypto/bn/bn_print.c
179
test->want, (int)got_len, got);
regress/lib/libcrypto/bn/bn_print.c
193
const struct print_test *test;
regress/lib/libcrypto/bn/bn_print.c
203
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
204
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
211
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
212
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
218
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
219
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
226
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
227
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
233
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
234
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
241
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
242
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
248
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
249
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
256
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
257
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
263
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
264
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
271
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
272
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
278
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
279
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
287
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
288
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_print.c
294
test = &bn_print_tests[testcase++];
regress/lib/libcrypto/bn/bn_print.c
295
failed |= bn_print_testcase(bn, test);
regress/lib/libcrypto/bn/bn_to_string.c
233
struct bn_to_string_tests *test;
regress/lib/libcrypto/bn/bn_to_string.c
238
for (test = testcases; test->input != NULL; test++) {
regress/lib/libcrypto/bn/bn_to_string.c
239
if ((aint = s2i_ASN1_INTEGER(NULL, test->input)) == NULL)
regress/lib/libcrypto/bn/bn_to_string.c
240
errx(1, "s2i_ASN1_INTEGER(%s)", test->input);
regress/lib/libcrypto/bn/bn_to_string.c
242
errx(1, "i2s_ASN1_INTEGER(%s)", test->input);
regress/lib/libcrypto/bn/bn_to_string.c
243
if (strcmp(got, test->want) != 0) {
regress/lib/libcrypto/bn/bn_to_string.c
244
warnx("want: %s, got: %s", test->want, got);
regress/lib/libcrypto/ec/ec_point_conversion.c
500
const struct point_conversion *test)
regress/lib/libcrypto/ec/ec_point_conversion.c
514
"to fail, got %zu\n", test->description, form, ret);
regress/lib/libcrypto/ec/ec_point_conversion.c
525
test->description, ret);
regress/lib/libcrypto/ec/ec_point_conversion.c
530
if (memcmp(buf, test->octets, test->octets_len) != 0) {
regress/lib/libcrypto/ec/ec_point_conversion.c
532
test->description, test->octets[0], buf[0]);
regress/lib/libcrypto/ec/ec_point_conversion.c
542
point_conversion_form_y_bit(const struct point_conversion *test)
regress/lib/libcrypto/ec/ec_point_conversion.c
549
if ((group = EC_GROUP_new_by_curve_name(test->nid)) == NULL)
regress/lib/libcrypto/ec/ec_point_conversion.c
554
ret = EC_POINT_oct2point(group, point, test->octets, test->octets_len,
regress/lib/libcrypto/ec/ec_point_conversion.c
556
if (ret != test->valid) {
regress/lib/libcrypto/ec/ec_point_conversion.c
557
fprintf(stderr, "%s want %d got %d\n", test->description,
regress/lib/libcrypto/ec/ec_point_conversion.c
558
test->valid, ret);
regress/lib/libcrypto/ec/ec_point_conversion.c
562
if (test->valid && test->point_at_infinity) {
regress/lib/libcrypto/ec/ec_point_conversion.c
563
failed |= check_point_at_infinity(group, point, test);
regress/lib/libcrypto/ec/ec_point_conversion.c
564
} else if (test->valid) {
regress/lib/libcrypto/ec/ec_point_conversion.c
566
uint8_t form = test->octets[0] & 0x06;
regress/lib/libcrypto/ec/ec_point_conversion.c
571
if (len != test->octets_len) {
regress/lib/libcrypto/ec/ec_point_conversion.c
573
test->description, test->octets_len, len);
regress/lib/libcrypto/ec/ec_point_conversion.c
577
if (memcmp(test->octets, buf, len) != 0) {
regress/lib/libcrypto/ec/ec_point_conversion.c
579
test->description);
regress/lib/libcrypto/ec/ec_point_conversion.c
580
hexdump(test->octets, test->octets_len);
regress/lib/libcrypto/ecdh/ecc_cdh.c
2163
run_ecc_cdh_test(const struct ecc_cdh_test *test)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2176
if (test->nid != last_nid) {
regress/lib/libcrypto/ecdh/ecc_cdh.c
2177
last_nid = test->nid;
regress/lib/libcrypto/ecdh/ecc_cdh.c
2199
if ((key = EC_KEY_new_by_curve_name(test->nid)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2200
errx(1, "EC_KEY_new_by_curve_name(%d)", test->nid);
regress/lib/libcrypto/ecdh/ecc_cdh.c
2202
if (!BN_hex2bn(&peer_x, test->peer_x))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2204
if (!BN_hex2bn(&peer_y, test->peer_y))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2216
if (!BN_hex2bn(&priv, test->priv))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2218
if (!BN_hex2bn(&pub_x, test->pub_x))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2220
if (!BN_hex2bn(&pub_y, test->pub_y))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2237
if (!BN_hex2bn(&shared, test->want))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2248
OBJ_nid2sn(test->nid), count);
regress/lib/libcrypto/evp/evp_test.c
1026
do_tls_prf_evp_test(int test_no, const struct tls_prf_test *test)
regress/lib/libcrypto/evp/evp_test.c
1043
if (EVP_PKEY_CTX_set_tls1_prf_md(pkey_ctx, test->md()) <= 0)
regress/lib/libcrypto/evp/evp_test.c
1075
if (memcmp(test->out, out, out_len) != 0) {
regress/lib/libcrypto/evp/evp_test.c
1081
hexdump(test->out, len);
regress/lib/libcrypto/evp/evp_test.c
467
evp_pkey_iv_len_testcase(const struct evp_iv_len_test *test)
regress/lib/libcrypto/evp/evp_test.c
469
const EVP_CIPHER *cipher = test->cipher();
regress/lib/libcrypto/evp/evp_test.c
489
if ((ret = EVP_CIPHER_CTX_iv_length(ctx)) != test->iv_len) {
regress/lib/libcrypto/evp/evp_test.c
491
" want %d, got %d\n", name, test->iv_len, ret);
regress/lib/libcrypto/evp/evp_test.c
495
test->setlen, NULL)) != test->expect) {
regress/lib/libcrypto/evp/evp_test.c
497
" want %d, got %d\n", name, test->expect, ret);
regress/lib/libcrypto/evp/evp_test.c
500
if (test->expect == 0)
regress/lib/libcrypto/evp/evp_test.c
502
if ((ret = EVP_CIPHER_CTX_iv_length(ctx)) != test->setlen) {
regress/lib/libcrypto/evp/evp_test.c
504
" want %d, got %d\n", name, test->setlen, ret);
regress/lib/libcrypto/hkdf/hkdf_test.c
254
const HKDFTestVector *test = &kTests[i];
regress/lib/libcrypto/hkdf/hkdf_test.c
258
if (!HKDF_extract(prk, &prk_len, test->md_func(), test->ikm,
regress/lib/libcrypto/hkdf/hkdf_test.c
259
test->ikm_len, test->salt, test->salt_len)) {
regress/lib/libcrypto/hkdf/hkdf_test.c
264
if (prk_len != test->prk_len ||
regress/lib/libcrypto/hkdf/hkdf_test.c
265
memcmp(prk, test->prk, test->prk_len) != 0) {
regress/lib/libcrypto/hkdf/hkdf_test.c
270
if (!HKDF_expand(buf, test->out_len, test->md_func(), prk, prk_len,
regress/lib/libcrypto/hkdf/hkdf_test.c
271
test->info, test->info_len)) {
regress/lib/libcrypto/hkdf/hkdf_test.c
276
if (memcmp(buf, test->out, test->out_len) != 0) {
regress/lib/libcrypto/hkdf/hkdf_test.c
283
if (!HKDF(buf, test->out_len, test->md_func(), test->ikm,
regress/lib/libcrypto/hkdf/hkdf_test.c
284
test->ikm_len, test->salt, test->salt_len, test->info,
regress/lib/libcrypto/hkdf/hkdf_test.c
285
test->info_len)) {
regress/lib/libcrypto/hkdf/hkdf_test.c
290
if (memcmp(buf, test->out, test->out_len) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
155
test[i].key, test[i].key_len,
regress/lib/libcrypto/hmac/hmactest.c
156
test[i].data, test[i].data_len, buf, NULL),
regress/lib/libcrypto/hmac/hmactest.c
159
if (strcmp(p, (char *)test[i].digest) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
161
printf("got %s instead of %s\n", p, test[i].digest);
regress/lib/libcrypto/hmac/hmactest.c
178
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
188
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
196
if (HMAC_Init_ex(ctx, test[4].key, test[4].key_len, NULL, NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
201
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
206
if (HMAC_Init_ex(ctx, test[4].key, -1, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
211
if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
216
if (!HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
227
if (strcmp(p, (char *)test[4].digest) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
229
printf("got %s instead of %s\n", p, test[4].digest);
regress/lib/libcrypto/hmac/hmactest.c
238
if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
243
if (!HMAC_Update(ctx, test[5].data, test[5].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
254
if (strcmp(p, (char *)test[5].digest) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
256
printf("got %s instead of %s\n", p, test[5].digest);
regress/lib/libcrypto/hmac/hmactest.c
260
if (!HMAC_Init_ex(ctx, test[6].key, test[6].key_len, NULL, NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
265
if (!HMAC_Update(ctx, test[6].data, test[6].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
276
if (strcmp(p, (char *)test[6].digest) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
278
printf("got %s instead of %s\n", p, test[6].digest);
regress/lib/libcrypto/hmac/hmactest.c
285
if (!HMAC_Init_ex(ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
290
if (!HMAC_Update(ctx, test[7].data, test[7].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
310
if (strcmp(p, (char *)test[7].digest) != 0) {
regress/lib/libcrypto/hmac/hmactest.c
312
printf("got %s instead of %s\n", p, test[7].digest);
regress/lib/libcrypto/hmac/hmactest.c
75
} test[8] = {
regress/lib/libcrypto/md/md_test.c
202
test_md_tv(struct test *t, const void *arg)
regress/lib/libcrypto/md/md_test.c
276
test_md(struct test *t, const void *arg)
regress/lib/libcrypto/md/md_test.c
295
test_md5_large(struct test *t, const void *arg)
regress/lib/libcrypto/md/md_test.c
338
struct test *t = test_init();
regress/lib/libcrypto/mlkem/mlkem_tests.c
686
run_mlkem_test(const char *test, const char *fn)
regress/lib/libcrypto/mlkem/mlkem_tests.c
688
if (strcmp(test, "mlkem768_decap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
690
if (strcmp(test, "mlkem768_nist_decap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
692
if (strcmp(test, "mlkem1024_decap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
694
if (strcmp(test, "mlkem1024_nist_decap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
697
if (strcmp(test, "mlkem768_encap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
699
if (strcmp(test, "mlkem1024_encap_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
702
if (strcmp(test, "mlkem768_keygen_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
704
if (strcmp(test, "mlkem768_nist_keygen_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
706
if (strcmp(test, "mlkem1024_keygen_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
708
if (strcmp(test, "mlkem1024_nist_keygen_tests") == 0)
regress/lib/libcrypto/mlkem/mlkem_tests.c
711
errx(1, "unknown test %s (test file %s)", test, fn);
regress/lib/libcrypto/mlkem/parse_test_file.c
116
ps->test = 1;
regress/lib/libcrypto/mlkem/parse_test_file.c
170
ps->test++;
regress/lib/libcrypto/mlkem/parse_test_file.c
262
return p->state.test;
regress/lib/libcrypto/mlkem/parse_test_file.c
295
p->fn, line(p), test(p), name(p));
regress/lib/libcrypto/mlkem/parse_test_file.c
95
size_t test;
regress/lib/libcrypto/pbkdf2/pbkdf2.c
132
test_p5_pbkdf2(unsigned int n, const char *digestname, const testdata *test,
regress/lib/libcrypto/pbkdf2/pbkdf2.c
164
r = PKCS5_PBKDF2_HMAC(test->pass, test->passlen,
regress/lib/libcrypto/pbkdf2/pbkdf2.c
165
(const unsigned char *)test->salt, test->saltlen,
regress/lib/libcrypto/pbkdf2/pbkdf2.c
166
test->iter, digest, keylen, out);
regress/lib/libcrypto/pbkdf2/pbkdf2.c
189
const testdata *test = test_cases;
regress/lib/libcrypto/pbkdf2/pbkdf2.c
193
for (n = 0; test->pass != NULL; n++, test++) {
regress/lib/libcrypto/pbkdf2/pbkdf2.c
194
test_p5_pbkdf2(n, "sha1", test, sha1_results[n]);
regress/lib/libcrypto/pbkdf2/pbkdf2.c
195
test_p5_pbkdf2(n, "sha256", test, sha256_results[n]);
regress/lib/libcrypto/pbkdf2/pbkdf2.c
196
test_p5_pbkdf2(n, "sha512", test, sha512_results[n]);
regress/lib/libcrypto/sha/sha_test.c
738
test_sha_tv(struct test *t, const void *arg)
regress/lib/libcrypto/sha/sha_test.c
814
test_sha(struct test *t, const void *arg)
regress/lib/libcrypto/sha/sha_test.c
833
test_sha_repetition_tv(struct test *t, const void *arg)
regress/lib/libcrypto/sha/sha_test.c
890
test_sha_repetition(struct test *t, const void *arg)
regress/lib/libcrypto/sha/sha_test.c
912
struct test *t = test_init();
regress/lib/libcrypto/test/test.c
104
test_fail(struct test *t)
regress/lib/libcrypto/test/test.c
114
test_vprintf(struct test *t, const char *fmt, va_list ap)
regress/lib/libcrypto/test/test.c
121
test_printf(struct test *t, const char *fmt, ...)
regress/lib/libcrypto/test/test.c
131
test_vlogf_internal(struct test *t, const char *label, const char *func,
regress/lib/libcrypto/test/test.c
158
test_logf_internal(struct test *t, const char *label, const char *func,
regress/lib/libcrypto/test/test.c
169
test_skip(struct test *t, const char *reason)
regress/lib/libcrypto/test/test.c
176
test_skipf(struct test *t, const char *fmt, ...)
regress/lib/libcrypto/test/test.c
190
test_run(struct test *pt, const char *name, test_run_func *fn, const void *arg)
regress/lib/libcrypto/test/test.c
192
struct test *t = test_new(pt, name);
regress/lib/libcrypto/test/test.c
28
struct test *parent;
regress/lib/libcrypto/test/test.c
35
static struct test *
regress/lib/libcrypto/test/test.c
36
test_new(struct test *pt, const char *name)
regress/lib/libcrypto/test/test.c
38
struct test *t;
regress/lib/libcrypto/test/test.c
55
struct test *
regress/lib/libcrypto/test/test.c
58
struct test *t;
regress/lib/libcrypto/test/test.c
84
test_cleanup(struct test *t)
regress/lib/libcrypto/test/test.c
91
test_result(struct test *t)
regress/lib/libcrypto/test/test.h
107
void test_skip(struct test *_t, const char *_reason);
regress/lib/libcrypto/test/test.h
113
void test_skipf(struct test *_t, const char *_fmt, ...)
regress/lib/libcrypto/test/test.h
124
void test_run(struct test *_t, const char *_name, test_run_func *_fn, const void *_arg);
regress/lib/libcrypto/test/test.h
129
void test_hexdump(struct test *_t, const unsigned char *_buf, size_t _len);
regress/lib/libcrypto/test/test.h
135
void test_hexdiff(struct test *_t, const uint8_t *_buf, size_t _len, const uint8_t *_compare);
regress/lib/libcrypto/test/test.h
24
struct test;
regress/lib/libcrypto/test/test.h
34
struct test *test_init(void);
regress/lib/libcrypto/test/test.h
40
int test_result(struct test *_t);
regress/lib/libcrypto/test/test.h
46
typedef void (test_run_func)(struct test *_t, const void *_arg);
regress/lib/libcrypto/test/test.h
51
void test_fail(struct test *_t);
regress/lib/libcrypto/test/test.h
60
void test_printf(struct test *_t, const char *_fmt, ...)
regress/lib/libcrypto/test/test.h
75
void test_logf_internal(struct test *_t, const char *_label, const char *_func,
regress/lib/libcrypto/test/test_util.c
25
test_hexdump(struct test *t, const unsigned char *buf, size_t len)
regress/lib/libcrypto/test/test_util.c
37
test_hexdiff(struct test *t, const uint8_t *buf, size_t len, const uint8_t *compare)
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
28
primality_test(struct wycheproof_testcase *test)
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
35
if (!BN_hex2bn(&value, test->value))
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
36
errx(1, "%d: failed to set value \"%s\"", test->id, test->value);
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
38
if ((len = strlen(test->value)) > INT_MAX / 4)
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
39
errx(1, "%d: overlong test string %zu", test->id, len);
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
41
if (len > 0 && test->value[0] >= '8') {
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
57
errx(1, "%d: BN_is_prime_ex errored", test->id);
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
59
if (ret != test->result && !test->acceptable) {
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
60
fprintf(stderr, "%d failed, want %d, got %d\n", test->id,
regress/lib/libcrypto/wycheproof/wycheproof-primes.c
61
test->result, ret);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1002
p = test->der;
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1003
if ((parsed = d2i_IPAddrBlocks(NULL, &p, test->der_len)) == NULL) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1005
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1010
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1017
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1021
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1477
build_asid_test(const struct ASIdentifiers_build_test *test)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1485
if ((asid = build_asid(test->delegations)) == NULL) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1486
if (!test->should_build) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1491
test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1495
if (!test->canonical) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1498
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1501
if (X509v3_asid_canonize(asid) != test->should_canonize) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1503
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1506
if (!test->should_canonize) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1526
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1531
memcmp_failed = (size_t)out_len != test->der_len;
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1533
memcmp_failed = memcmp(out, test->der, test->der_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1535
report_hexdump(__func__, test->description, "memcmp DER failed",
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1536
test->der, test->der_len, out, out_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1543
if (X509v3_asid_inherits(asid) != test->inherits) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1545
__func__, test->description, test->inherits);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1961
asid_subset_test(const struct ASIdentifiers_subset_test *test)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1966
if ((asidA = build_asid(test->delegationsA)) == NULL)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1968
if ((asidB = build_asid(test->delegationsB)) == NULL)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1971
if (X509v3_asid_subset(asidA, asidB) != test->is_subset) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1973
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1977
if (!test->is_subset) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1983
test->is_subset_if_canonized) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
1985
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
245
test_IPAddressOrRange(const struct IPAddressOrRange_test *test)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
260
p = &test->der[0];
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
261
if ((aor = d2i_IPAddressOrRange(NULL, &p, test->der_len)) == NULL) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
263
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
271
afi_len = afi_size(test->afi);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
273
if (X509v3_addr_get_range(aor, test->afi, min, max, sizeof min) !=
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
276
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
284
if (memcmp(min, test->min, afi_len) != 0) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
286
report_hexdump(__func__, test->description, "memcmp min failed",
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
287
test->min, afi_len, min, afi_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
289
if (memcmp(max, test->max, afi_len) != 0) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
291
report_hexdump(__func__, test->description, "memcmp max failed",
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
292
test->max, afi_len, max, afi_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
305
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
309
memcmp_failed = (size_t)out_len != test->der_len;
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
311
memcmp_failed = memcmp(test->der, out, out_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
314
report_hexdump(__func__, test->description, "memcmp DER failed",
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
315
test->der, test->der_len, out, out_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
923
build_addr_block_test(const struct build_addr_block_test_data *test)
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
936
if (!addr_block_add_addrs(addrs, test->addrs))
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
939
if (X509v3_addr_is_canonical(addrs) != test->is_canonical) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
941
__func__, test->description, test->is_canonical);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
947
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
953
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
959
__func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
963
memcmp_failed = (size_t)out_len != test->der_len;
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
965
memcmp_failed = memcmp(out, test->der, test->der_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
967
report_hexdump(__func__, test->description, "memcmp DER failed",
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
968
test->der, test->der_len, out, out_len);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
972
if (X509v3_addr_inherits(addrs) != test->inherits) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
974
__func__, test->description, test->inherits);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
978
for (i = 0; i < sk_IPAddressFamily_num(addrs) && i < test->afi_len; i++) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
986
" failed\n", __func__, test->description);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
989
if (test->afis[i] != afi){
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
992
test->description, i, test->afis[i], afi);
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
996
if (i != test->afi_len) {
regress/lib/libcrypto/x509/rfc3779/rfc3779.c
998
__func__, test->description, i, test->afi_len);
regress/lib/libcrypto/x509/x509_asn1.c
522
const struct testcase *test = testCases + i;
regress/lib/libcrypto/x509/x509_asn1.c
536
if (!X509_NAME_ENTRY_set_data(entry, test->encode_type,
regress/lib/libcrypto/x509/x509_asn1.c
537
test->data, test->len))
regress/lib/libcrypto/x509/x509_asn1.c
541
if (test->len_to_pass == -1)
regress/lib/libcrypto/x509/x509_asn1.c
546
textbuf, test->len_to_pass);
regress/lib/libcrypto/x509/x509_asn1.c
547
if (result != test->expected_result) {
regress/lib/libcrypto/x509/x509_asn1.c
550
"expected %d\n", i, result, test->expected_result);
regress/lib/libcrypto/x509/x509_asn1.c
554
strcmp(test->expected_string, textbuf) != 0) {
regress/lib/libcrypto/x509/x509_name_test.c
211
x509_name_compat_testcase(const struct x509_name_legacy *test)
regress/lib/libcrypto/x509/x509_name_test.c
223
p = test->der;
regress/lib/libcrypto/x509/x509_name_test.c
224
if ((name = d2i_X509_NAME(NULL, &p, test->der_len)) == NULL)
regress/lib/libcrypto/x509/x509_name_test.c
233
if (test->der_len != (size_t)der_len) {
regress/lib/libcrypto/x509/x509_name_test.c
235
__func__, test->der_len, der_len);
regress/lib/libcrypto/x509/x509_name_test.c
239
if (memcmp(test->der, der, test->der_len) != 0) {
regress/lib/libcrypto/x509/x509_name_test.c
255
if (strcmp(test->compat, got) != 0) {
regress/lib/libcrypto/x509/x509_name_test.c
257
__func__, test->compat, got);
regress/lib/libcrypto/x509/x509_name_test.c
264
if (strcmp(test->oneline, buf) != 0) {
regress/lib/libcrypto/x509/x509_name_test.c
266
__func__, test->compat, got);
regress/lib/libevent/test-eof.c
64
const char *test = "test string";
regress/lib/libevent/test-eof.c
71
send(pair[0], test, strlen(test)+1, 0);
regress/lib/libevent/test-weof.c
41
const char *test = "test string";
regress/lib/libevent/test-weof.c
44
len = send(fd, test, strlen(test) + 1, 0);
regress/lib/libm/complex/complex.c
33
assert(test(r, 1.150127, -2.256295));
regress/lib/libm/complex/complex.c
35
assert(test(r, -1.150127, -0.685498));
regress/lib/libm/complex/complex.c
37
assert(test(r, -0.381870, -1.071985));
regress/lib/libm/msun/atf-c.c
37
int test;
regress/lib/libm/msun/atf-c.c
42
int ch, test;
regress/lib/libm/msun/atf-c.c
73
test = strtonum(num, 1, INT_MAX, &errstr);
regress/lib/libm/msun/atf-c.c
80
ATF_CLEANUP(test);
regress/lib/libm/msun/atf-c.c
82
ATF_RUN(test);
regress/lib/libm/msun/atf-c.c
84
ATF_INSPECT(test);
regress/lib/libm/msun/cexp_test.c
208
test(cexp, CMPLXL(finites[i], 0.0),
regress/lib/libm/msun/cexp_test.c
211
test(cexp, CMPLXL(finites[i], -0.0),
regress/lib/libm/msun/cexp_test.c
229
test(cexp, CMPLXL(0.0, finites[i]),
regress/lib/libm/msun/cexp_test.c
232
test(cexp, CMPLXL(-0.0, finites[i]),
regress/lib/libm/msun/cexp_test.c
88
test(cexp, x, result, exceptmask, excepts, checksign); \
regress/lib/libm/msun/ctrig_test.c
103
test(func, x, result, exceptmask, excepts, checksign); \
regress/lib/libm/msun/ctrig_test.c
104
test(func##f, x, result, exceptmask, excepts, checksign); \
regress/lib/libm/msun/exponential_test.c
70
test(exp, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
71
test(expf, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
72
test(exp2, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
73
test(exp2f, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
82
test(exp2l, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
88
test(expm1, x, result, exceptmask, excepts); \
regress/lib/libm/msun/exponential_test.c
89
test(expm1f, x, result, exceptmask, excepts); \
regress/lib/libm/msun/fma_test.c
115
test(fmaf, -FLT_MIN, FLT_MIN, 0.0, -0.0,
regress/lib/libm/msun/fma_test.c
117
test(fma, -DBL_MIN, DBL_MIN, 0.0, -0.0,
regress/lib/libm/msun/fma_test.c
119
test(fmal, -LDBL_MIN, LDBL_MIN, 0.0, -0.0,
regress/lib/libm/msun/fma_test.c
150
test(fmaf, FLT_MAX, FLT_MAX, -INFINITY, -INFINITY, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
151
test(fma, DBL_MAX, DBL_MAX, -INFINITY, -INFINITY, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
152
test(fmal, LDBL_MAX, LDBL_MAX, -INFINITY, -INFINITY,
regress/lib/libm/msun/fma_test.c
154
test(fmaf, FLT_MAX, -FLT_MAX, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
155
test(fma, DBL_MAX, -DBL_MAX, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
156
test(fmal, LDBL_MAX, -LDBL_MAX, INFINITY, INFINITY,
regress/lib/libm/msun/fma_test.c
171
test(fmaf, FLT_MIN, FLT_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
172
test(fma, DBL_MIN, DBL_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
173
test(fmal, LDBL_MIN, LDBL_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
174
test(fmaf, FLT_MAX, FLT_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
175
test(fma, DBL_MAX, DBL_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
176
test(fmal, LDBL_MAX, LDBL_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/fma_test.c
187
test(fmaf, one, one, 0x1.0p-100, 1.0 + FLT_EPSILON,
regress/lib/libm/msun/fma_test.c
189
test(fma, one, one, 0x1.0p-200, 1.0 + DBL_EPSILON,
regress/lib/libm/msun/fma_test.c
191
test(fmal, one, one, 0x1.0p-200, 1.0 + LDBL_EPSILON,
regress/lib/libm/msun/fma_test.c
200
test(fmaf, -one, one, -0x1.0p-100, -(1.0 + FLT_EPSILON),
regress/lib/libm/msun/fma_test.c
202
test(fma, -one, one, -0x1.0p-200, -(1.0 + DBL_EPSILON),
regress/lib/libm/msun/fma_test.c
204
test(fmal, -one, one, -0x1.0p-200, -(1.0 + LDBL_EPSILON),
regress/lib/libm/msun/fma_test.c
213
test(fmaf, one, one, -0x1.0p-100, 1.0 - FLT_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
215
test(fma, one, one, -0x1.0p-200, 1.0 - DBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
217
test(fmal, one, one, -0x1.0p-200, 1.0 - LDBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
226
test(fmaf, -one, one, 0x1.0p-100, -1.0 + FLT_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
228
test(fma, -one, one, 0x1.0p-200, -1.0 + DBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
230
test(fmal, -one, one, 0x1.0p-200, -1.0 + LDBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
246
test(fmaf, 0x1.0p-50, 0x1.0p-50, 1.0, 1.0 + FLT_EPSILON,
regress/lib/libm/msun/fma_test.c
248
test(fma, 0x1.0p-100, 0x1.0p-100, 1.0, 1.0 + DBL_EPSILON,
regress/lib/libm/msun/fma_test.c
250
test(fmal, 0x1.0p-100, 0x1.0p-100, 1.0, 1.0 + LDBL_EPSILON,
regress/lib/libm/msun/fma_test.c
259
test(fmaf, -0x1.0p-50, 0x1.0p-50, -1.0, -(1.0 + FLT_EPSILON),
regress/lib/libm/msun/fma_test.c
261
test(fma, -0x1.0p-100, 0x1.0p-100, -1.0, -(1.0 + DBL_EPSILON),
regress/lib/libm/msun/fma_test.c
263
test(fmal, -0x1.0p-100, 0x1.0p-100, -1.0, -(1.0 + LDBL_EPSILON),
regress/lib/libm/msun/fma_test.c
272
test(fmaf, -0x1.0p-50, -0x1.0p-50, -1.0,
regress/lib/libm/msun/fma_test.c
274
test(fma, -0x1.0p-100, -0x1.0p-100, -1.0,
regress/lib/libm/msun/fma_test.c
276
test(fmal, -0x1.0p-100, -0x1.0p-100, -1.0,
regress/lib/libm/msun/fma_test.c
285
test(fmaf, 0x1.0p-50, -0x1.0p-50, 1.0, 1.0 - FLT_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
287
test(fma, 0x1.0p-100, -0x1.0p-100, 1.0, 1.0 - DBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
289
test(fmal, 0x1.0p-100, -0x1.0p-100, 1.0, 1.0 - LDBL_EPSILON / 2,
regress/lib/libm/msun/fma_test.c
435
test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
regress/lib/libm/msun/fma_test.c
439
test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
regress/lib/libm/msun/fma_test.c
443
test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
regress/lib/libm/msun/fma_test.c
448
test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200002p+1,
regress/lib/libm/msun/fma_test.c
451
test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200002p+1,
regress/lib/libm/msun/fma_test.c
454
test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200004p+1,
regress/lib/libm/msun/fma_test.c
459
test(fmal, 0x1.4p+0L, 0x1.0000000000000004p+0L, 0x1p-128L,
regress/lib/libm/msun/fma_test.c
462
test(fmal, 0x1.8000000000000000000000000001p+0L,
regress/lib/libm/msun/fma_test.c
64
test(fma, (double)(x), (double)(y), (double)(z), \
regress/lib/libm/msun/fma_test.c
66
test(fmaf, (float)(x), (float)(y), (float)(z), \
regress/lib/libm/msun/fma_test.c
68
test(fmal, (x), (y), (z), (result), (exceptmask), (excepts)); \
regress/lib/libm/msun/fma_test.c
74
test((func), (x), (y), (z), (rn), (exceptmask), (excepts)); \
regress/lib/libm/msun/fma_test.c
76
test((func), (x), (y), (z), (ru), (exceptmask), (excepts)); \
regress/lib/libm/msun/fma_test.c
78
test((func), (x), (y), (z), (rd), (exceptmask), (excepts)); \
regress/lib/libm/msun/fma_test.c
80
test((func), (x), (y), (z), (rz), (exceptmask), (excepts)); \
regress/lib/libm/msun/invctrig_test.c
91
test(func, x, result, exceptmask, excepts, checksign); \
regress/lib/libm/msun/invctrig_test.c
92
test(func##f, x, result, exceptmask, excepts, checksign); \
regress/lib/libm/msun/logarithm_test.c
161
test(log, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
162
test(logf, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
163
test(log2, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
164
test(log2f, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
165
test(log10, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
166
test(log10f, 1.0, 0.0, ALL_STD_EXCEPT, 0);
regress/lib/libm/msun/logarithm_test.c
77
test(log, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
78
test(logf, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
79
test(logl, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
80
test(log2, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
81
test(log2f, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
82
test(log2l, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
83
test(log10, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
84
test(log10f, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
85
test(log10l, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
90
test(log1p, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
91
test(log1pf, x, result, exceptmask, excepts); \
regress/lib/libm/msun/logarithm_test.c
92
test(log1pl, x, result, exceptmask, excepts); \
regress/lib/libm/msun/lrint_test.c
100
test(lrint, 0x8000000000000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
101
test(lrintf, 0x8000000000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
102
test(lrint, 0x7ffffffffffffc00.0p0, 0x7ffffffffffffc00l, 0);
regress/lib/libm/msun/lrint_test.c
103
test(lrintf, 0x7fffff8000000000.0p0f, 0x7fffff8000000000l, 0);
regress/lib/libm/msun/lrint_test.c
104
test(lrint, -0x8000000000000800.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
105
test(lrintf, -0x8000010000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
106
test(lrint, -0x8000000000000000.0p0, (long long)-0x8000000000000000ul, 0);
regress/lib/libm/msun/lrint_test.c
107
test(lrintf, -0x8000000000000000.0p0f, (long long)-0x8000000000000000ul, 0);
regress/lib/libm/msun/lrint_test.c
114
test(llrint, 0x8000000000000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
115
test(llrintf, 0x8000000000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
116
test(llrint, 0x7ffffffffffffc00.0p0, 0x7ffffffffffffc00ll, 0);
regress/lib/libm/msun/lrint_test.c
117
test(llrintf, 0x7fffff8000000000.0p0f, 0x7fffff8000000000ll, 0);
regress/lib/libm/msun/lrint_test.c
118
test(llrint, -0x8000000000000800.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
119
test(llrintf, -0x8000010000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
120
test(llrint, -0x8000000000000000.0p0, (long long)-0x8000000000000000ull, 0);
regress/lib/libm/msun/lrint_test.c
121
test(llrintf, -0x8000000000000000.0p0f, (long long)-0x8000000000000000ull, 0);
regress/lib/libm/msun/lrint_test.c
50
test(lrint, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
51
test(lrintf, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
52
test(lrintl, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
53
test(llrint, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
54
test(llrintf, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
55
test(llrintl, x, result, excepts); \
regress/lib/libm/msun/lrint_test.c
82
test(lrint, 0x7fffffff.8p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
83
test(lrint, -0x80000000.4p0, (long)-0x80000000l, FE_INEXACT);
regress/lib/libm/msun/lrint_test.c
86
test(lrint, -0x80000000.8p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
87
test(lrint, 0x80000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
88
test(lrint, 0x7fffffff.4p0, 0x7fffffffl, FE_INEXACT);
regress/lib/libm/msun/lrint_test.c
89
test(lrintf, 0x80000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
90
test(lrintf, 0x7fffff80.0p0f, 0x7fffff80l, 0);
regress/lib/libm/msun/lrint_test.c
93
test(lrint, 0x7fffffff.8p0, 0x7fffffffl, FE_INEXACT);
regress/lib/libm/msun/lrint_test.c
94
test(lrint, -0x80000000.8p0, -0x80000000l, FE_INEXACT);
regress/lib/libm/msun/lrint_test.c
95
test(lrint, 0x80000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
96
test(lrintf, 0x80000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lrint_test.c
97
test(lrintf, 0x7fffff80.0p0f, 0x7fffff80l, 0);
regress/lib/libm/msun/lround_test.c
102
test(llround, 0x8000000000000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
103
test(llroundf, 0x8000000000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
104
test(llround, 0x7ffffffffffffc00.0p0, 0x7ffffffffffffc00ll, 0);
regress/lib/libm/msun/lround_test.c
105
test(llroundf, 0x7fffff8000000000.0p0f, 0x7fffff8000000000ll, 0);
regress/lib/libm/msun/lround_test.c
106
test(llround, -0x8000000000000800.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
107
test(llroundf, -0x8000010000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
108
test(llround, -0x8000000000000000.0p0, (long long)-0x8000000000000000ll, 0);
regress/lib/libm/msun/lround_test.c
109
test(llroundf, -0x8000000000000000.0p0f, (long long)-0x8000000000000000ll, 0);
regress/lib/libm/msun/lround_test.c
59
test(lround, x, result, excepts); \
regress/lib/libm/msun/lround_test.c
60
test(lroundf, x, result, excepts); \
regress/lib/libm/msun/lround_test.c
61
test(llround, x, result, excepts); \
regress/lib/libm/msun/lround_test.c
62
test(llroundf, x, result, excepts); \
regress/lib/libm/msun/lround_test.c
81
test(lround, 0x7fffffff.8p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
82
test(lround, -0x80000000.8p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
83
test(lround, 0x80000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
84
test(lround, 0x7fffffff.4p0, 0x7fffffffl, FE_INEXACT);
regress/lib/libm/msun/lround_test.c
85
test(lround, -0x80000000.4p0, -0x80000000l, FE_INEXACT);
regress/lib/libm/msun/lround_test.c
86
test(lroundf, 0x80000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
87
test(lroundf, 0x7fffff80.0p0f, 0x7fffff80l, 0);
regress/lib/libm/msun/lround_test.c
89
test(lround, 0x8000000000000000.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
90
test(lroundf, 0x8000000000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
91
test(lround, 0x7ffffffffffffc00.0p0, 0x7ffffffffffffc00l, 0);
regress/lib/libm/msun/lround_test.c
92
test(lroundf, 0x7fffff8000000000.0p0f, 0x7fffff8000000000l, 0);
regress/lib/libm/msun/lround_test.c
93
test(lround, -0x8000000000000800.0p0, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
94
test(lroundf, -0x8000010000000000.0p0f, IGNORE, FE_INVALID);
regress/lib/libm/msun/lround_test.c
95
test(lround, -0x8000000000000000.0p0, (long)-0x8000000000000000l, 0);
regress/lib/libm/msun/lround_test.c
96
test(lroundf, -0x8000000000000000.0p0f, (long)-0x8000000000000000l, 0);
regress/lib/libm/msun/next_test.c
102
test##prec(copysign##prec(1.0, nextafter##prec(0.0, -0.0)), -1.0, 0); \
regress/lib/libm/msun/next_test.c
103
test##prec(copysign##prec(1.0, nextafter##prec(-0.0, 0.0)), 1.0, 0); \
regress/lib/libm/msun/next_test.c
104
test##prec(copysign##prec(1.0, nexttoward##prec(0.0, -0.0)), -1.0, 0);\
regress/lib/libm/msun/next_test.c
105
test##prec(copysign##prec(1.0, nexttoward##prec(-0.0, 0.0)), 1.0, 0)
regress/lib/libm/msun/next_test.c
113
test##prec(next(-0.0, 42.0), eps, ex_under); \
regress/lib/libm/msun/next_test.c
114
test##prec(next(0.0, -42.0), -eps, ex_under); \
regress/lib/libm/msun/next_test.c
115
test##prec(next(0.0, INFINITY), eps, ex_under); \
regress/lib/libm/msun/next_test.c
116
test##prec(next(-0.0, -INFINITY), -eps, ex_under)
regress/lib/libm/msun/next_test.c
163
test(nexttoward(1.0, 1.0 + ldbl_eps), 1.0 + DBL_EPSILON, 0);
regress/lib/libm/msun/next_test.c
229
test(idd(nextafter(DBL_MAX, INFINITY)), INFINITY, ex_over);
regress/lib/libm/msun/next_test.c
230
test(idd(nextafter(INFINITY, 0.0)), DBL_MAX, 0);
regress/lib/libm/msun/next_test.c
231
test(idd(nexttoward(DBL_MAX, DBL_MAX * 2.0L)), INFINITY, ex_over);
regress/lib/libm/msun/next_test.c
233
test(idd(nexttoward(INFINITY, DBL_MAX * 2.0L)), DBL_MAX, 0);
regress/lib/libm/msun/next_test.c
62
test##prec(nextafter##prec((arg1), (arg2)), (ans), (ex)); \
regress/lib/libm/msun/next_test.c
63
test##prec(nexttoward##prec((arg1), (arg2)), (ans), (ex)); \
regress/lib/libm/msun/rem_test.c
101
test(0x1.66666cp+120, 0x1p+71, 0.0, 1476395008);
regress/lib/libm/msun/rem_test.c
66
test(4, 4, 0, 1);
regress/lib/libm/msun/rem_test.c
67
test(0, 3.0, 0, 0);
regress/lib/libm/msun/rem_test.c
70
test(3.0, 4, -1, 1);
regress/lib/libm/msun/rem_test.c
71
test(3.0, -4, -1, -1);
regress/lib/libm/msun/rem_test.c
73
test(4.5 * 7.5, 4.5, -2.25, 8); /* we should get the even one */
regress/lib/libm/msun/rem_test.c
93
test(0x1.fp100, 0x1.ep-40, -0x1.cp-41, 143165577);
regress/lib/libm/msun/trig_test.c
72
test(prefix, x, (double)result, exceptmask, excepts); \
regress/lib/libm/msun/trig_test.c
73
test(prefix##f, x, (float)result, exceptmask, excepts); \
regress/lib/libm/msun/trig_test.c
74
test(prefix##l, x, result, exceptmask, excepts); \
regress/lib/libm/msun/trig_test.c
78
test(prefix, x, (double)result, exceptmask, excepts); \
regress/lib/libm/msun/trig_test.c
79
test(prefix##f, x, (float)result, exceptmask, excepts); \
regress/lib/libm/nextafter/nextafter.c
18
assert(test(nextafter(0.0, 0.0), 0.0));
regress/lib/libm/nextafter/nextafter.c
19
assert(test(nextafter(-0.0, 0.0), 0.0));
regress/lib/libm/nextafter/nextafter.c
20
assert(test(nextafter(0.0, -0.0), -0.0));
regress/lib/libm/nextafter/nextafter.c
21
assert(test(nextafter(-0.0, -0.0), -0.0));
regress/lib/libm/nextafter/nextafter.c
23
assert(test(nextafterf(0.0F, 0.0F), 0.0F));
regress/lib/libm/nextafter/nextafter.c
24
assert(test(nextafterf(-0.0F, 0.0F), 0.0F));
regress/lib/libm/nextafter/nextafter.c
25
assert(test(nextafterf(0.0F, -0.0F), -0.0F));
regress/lib/libm/nextafter/nextafter.c
26
assert(test(nextafterf(-0.0F, -0.0F), -0.0F));
regress/lib/libm/nextafter/nextafter.c
28
assert(test(nextafterl(0.0L, 0.0L), 0.0L));
regress/lib/libm/nextafter/nextafter.c
29
assert(test(nextafterl(-0.0L, 0.0L), 0.0L));
regress/lib/libm/nextafter/nextafter.c
30
assert(test(nextafterl(0.0L, -0.0L), -0.0L));
regress/lib/libm/nextafter/nextafter.c
31
assert(test(nextafterf(-0.0L, -0.0L), -0.0L));
regress/lib/libm/nextafter/nextafter.c
33
assert(test(nextafter(NAN, 1.0), NAN));
regress/lib/libm/nextafter/nextafter.c
34
assert(test(nextafter(1.0, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
35
assert(test(nextafter(NAN, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
37
assert(test(nextafterf(NAN, 1.0F), NAN));
regress/lib/libm/nextafter/nextafter.c
38
assert(test(nextafterf(1.0F, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
39
assert(test(nextafterf(NAN, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
41
assert(test(nextafterl(NAN, 1.0L), NAN));
regress/lib/libm/nextafter/nextafter.c
42
assert(test(nextafterl(1.0L, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
43
assert(test(nextafterl(NAN, NAN), NAN));
regress/lib/libm/nextafter/nextafter.c
45
assert(test(nextafter(0x1.fffffffffffffp+0, INFINITY), 0x1p1));
regress/lib/libm/nextafter/nextafter.c
46
assert(test(nextafter(0x1p1, -INFINITY), 0x1.fffffffffffffp+0));
regress/lib/libm/nextafter/nextafter.c
48
assert(test(nextafterf(0x1.fffffep+0f, INFINITY), 0x1p1f));
regress/lib/libm/nextafter/nextafter.c
49
assert(test(nextafterf(0x1p1f, -INFINITY), 0x1.fffffep+0f));
regress/lib/libpthread/dlopen/dlopen.c
171
run_sig(const struct test_spec *test)
regress/lib/libpthread/dlopen/dlopen.c
176
if (test->init != NULL)
regress/lib/libpthread/dlopen/dlopen.c
177
test->init();
regress/lib/libpthread/dlopen/dlopen.c
181
test->run(retval);
regress/lib/libpthread/dlopen/dlopen.c
182
finish(test->name, retval, &before);
regress/lib/libpthread/dlopen/dlopen.c
183
if (test->fini != NULL)
regress/lib/libpthread/dlopen/dlopen.c
184
test->fini();
regress/lib/libpthread/dlopen/dlopen.c
194
run_cancel(const struct test_spec *test)
regress/lib/libpthread/dlopen/dlopen.c
203
if (test->init != NULL)
regress/lib/libpthread/dlopen/dlopen.c
204
test->init();
regress/lib/libpthread/dlopen/dlopen.c
216
if ((r = p_create(&tester, NULL, test->run, retval)))
regress/lib/libpthread/dlopen/dlopen.c
239
finish(test->name, retval, &before);
regress/lib/libpthread/dlopen/dlopen.c
240
if (test->fini != NULL)
regress/lib/libpthread/dlopen/dlopen.c
241
test->fini();
regress/lib/libpthread/dlopen/dlopen.c
569
struct test_spec *test;
regress/lib/libpthread/dlopen/dlopen.c
580
for (test = test_specs; test->flag; test++)
regress/lib/libpthread/dlopen/dlopen.c
581
if (test->flag == flag) {
regress/lib/libpthread/dlopen/dlopen.c
582
run(test);
regress/lib/libpthread/group/group.c
167
CHECKr(pthread_create(&thread[gid], NULL, test, (void *)n));
regress/lib/libssl/bytestring/bytestringtest.c
786
const ASN1_UINT64_TEST *test = &kAsn1Uint64Tests[i];
regress/lib/libssl/bytestring/bytestringtest.c
791
CBS_init(&cbs, (const uint8_t *)test->encoding,
regress/lib/libssl/bytestring/bytestringtest.c
792
test->encoding_len);
regress/lib/libssl/bytestring/bytestringtest.c
796
CHECK(value == test->value);
regress/lib/libssl/bytestring/bytestringtest.c
800
CHECK_GOTO(CBB_add_asn1_uint64(&cbb, test->value));
regress/lib/libssl/bytestring/bytestringtest.c
804
CHECK_GOTO(len == test->encoding_len);
regress/lib/libssl/bytestring/bytestringtest.c
805
CHECK_GOTO(memcmp(out, test->encoding, len) == 0);
regress/lib/libssl/bytestring/bytestringtest.c
812
const ASN1_INVALID_UINT64_TEST *test =
regress/lib/libssl/bytestring/bytestringtest.c
817
CBS_init(&cbs, (const uint8_t *)test->encoding,
regress/lib/libssl/bytestring/bytestringtest.c
818
test->encoding_len);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
386
check_shared_ciphers(const struct ssl_shared_ciphers_test_data *test,
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
389
const char *want = test->shared_ciphers;
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
393
test->shared_ciphers_without_aesni != NULL)
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
394
want = test->shared_ciphers_without_aesni;
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
400
test->description, want, got);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
406
test_get_shared_ciphers(const struct ssl_shared_ciphers_test_data *test)
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
413
if ((client_ctx = peer_config_to_ssl_ctx(&test->client_config)) == NULL)
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
415
if ((server_ctx = peer_config_to_ssl_ctx(&test->server_config)) == NULL)
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
420
test->description);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
425
test->description);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
429
if (!connect_peers(client_ssl, server_ssl, test->description))
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
432
if (!handshake(client_ssl, server_ssl, test->description))
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
437
test->description);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
441
if (!shutdown_peers(client_ssl, server_ssl, test->description))
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
444
failed = check_shared_ciphers(test, buf);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
409
select_next_proto_testcase(const struct select_next_proto_test *test)
regress/lib/libssl/unit/ssl_set_alpn_protos.c
416
ret = SSL_select_next_proto(&out, &out_len, test->peer_list,
regress/lib/libssl/unit/ssl_set_alpn_protos.c
417
test->peer_list_len, test->supported_list, test->supported_list_len);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
419
if (ret != test->want_ret || out_len != test->want_out_len ||
regress/lib/libssl/unit/ssl_set_alpn_protos.c
420
(out == NULL && test->want_out != NULL) ||
regress/lib/libssl/unit/ssl_set_alpn_protos.c
421
(out != NULL && test->want_out == NULL) ||
regress/lib/libssl/unit/ssl_set_alpn_protos.c
422
(out != NULL && test->want_out != NULL &&
regress/lib/libssl/unit/ssl_set_alpn_protos.c
423
memcmp(out, test->want_out, out_len) != 0)) {
regress/lib/libssl/unit/ssl_set_alpn_protos.c
425
ret, test->want_ret, out_len, test->want_out_len);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
429
hexdump(test->want_out, test->want_out_len);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
431
hexdump(test->peer_list, test->peer_list_len);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
433
hexdump(test->supported_list, test->supported_list_len);
regress/lib/libssl/verify/verify.c
310
test_ssl_wildcards(const struct ssl_wildcard_test_data *test)
regress/lib/libssl/verify/verify.c
317
if ((client_ctx = peer_config_to_ssl_ctx(&test->client_config)) == NULL)
regress/lib/libssl/verify/verify.c
319
if ((server_ctx = peer_config_to_ssl_ctx(&test->server_config)) == NULL)
regress/lib/libssl/verify/verify.c
324
test->description);
regress/lib/libssl/verify/verify.c
329
test->description);
regress/lib/libssl/verify/verify.c
333
if (!connect_peers(client_ssl, server_ssl, test->description))
regress/lib/libssl/verify/verify.c
336
if (!handshake(client_ssl, server_ssl, test->description))
regress/lib/libssl/verify/verify.c
341
if (test->verify_result == verify_result) {
regress/lib/libssl/verify/verify.c
343
fprintf(stderr, "%s: ok\n", test->description);
regress/lib/libssl/verify/verify.c
346
test->description, test->verify_result, verify_result);
regress/lib/libssl/verify/verify.c
348
if (!shutdown_peers(client_ssl, server_ssl, test->description))
regress/lib/libutil/bcrypt_pbkdf/bcrypt_pbkdf_test.c
130
struct test *t;
regress/lib/libutil/bcrypt_pbkdf/bcrypt_pbkdf_test.c
34
struct test tests[] = {
regress/lib/libutil/ber/ber_test.c
733
if (test(i) != 0) {
regress/sbin/isakmpd/hmac/hmactest.c
66
test_hmac(char *test, struct hash *hash, char *key, int klen,
regress/sbin/isakmpd/hmac/hmactest.c
72
printf("Testing %s: ", test);
regress/sbin/isakmpd/prf/prftest.c
78
test_prf (char *test, enum hashes hash, char *key, int klen,
regress/sbin/isakmpd/prf/prftest.c
86
printf ("Testing %s: ", test);
regress/sys/arch/amd64/ddb/disasm.c
61
error |= test("\x90", "nop");
regress/sys/arch/amd64/ddb/disasm.c
62
error |= test("\x00", "addb %al,0(%rax)");
regress/sys/arch/amd64/ddb/disasm.c
63
error |= test("\xf2\x48\xa5", "repne movsq (%rsi),%es:(%rdi)");
regress/sys/arch/amd64/ddb/disasm.c
64
error |= test("\xf3\x48\xa5", "repe movsq (%rsi),%es:(%rdi)");
regress/sys/arch/amd64/ddb/disasm.c
65
error |= test("\xf3\x0f\x1e\xfa", "endbr64");
regress/sys/crypto/aes/aestest.c
177
int blocksize, keysize, test;
regress/sys/crypto/aes/aestest.c
184
blocksize = keysize = test = -1;
regress/sys/crypto/aes/aestest.c
249
if (test != -1)
regress/sys/crypto/aes/aestest.c
255
fail += do_tests(filename, test, key, keylen,
regress/sys/crypto/aes/aestest.c
258
test = (int)strtonum(cp, 0, 65536, &errstr);
regress/sys/dev/wscons/sigio.c
307
struct test tests[] = {
regress/sys/dev/wscons/util.c
31
dotest(int argc, char *argv[], const struct test *tests)
regress/sys/dev/wscons/util.c
33
const struct test *test;
regress/sys/dev/wscons/util.c
54
for (test = tests; test->t_name != NULL; test++) {
regress/sys/dev/wscons/util.c
55
if (strcmp(argv[0], test->t_name) == 0)
regress/sys/dev/wscons/util.c
58
if (test->t_name == NULL)
regress/sys/dev/wscons/util.c
61
return test->t_func(fd);
regress/sys/dev/wscons/util.h
24
int dotest(int argc, char *argv[], const struct test *tests);
regress/sys/dev/wscons/wscons.c
47
struct test tests[] = {
regress/sys/kern/flock/flock.c
1859
static struct test tests[] = {
regress/sys/kern/flock/lockf.c
103
static struct test tests[] = {
regress/sys/kern/flock/util.h
19
#define FAIL(test) do { \
regress/sys/kern/flock/util.h
20
if (test) { \
regress/sys/kern/flock/util.h
23
__func__, __LINE__, #test); \
regress/sys/kern/ptrace/xstate/xstate.c
249
int (*test)(struct xstate *);
regress/sys/kern/ptrace/xstate/xstate.c
262
return tests[i].test(&xstate);
regress/sys/kern/ptrace2/atf-c.c
22
int test;
regress/sys/kern/ptrace2/atf-c.c
27
int ch, test;
regress/sys/kern/ptrace2/atf-c.c
58
test = strtonum(num, 1, INT_MAX, &errstr);
regress/sys/kern/ptrace2/atf-c.c
65
ATF_CLEANUP(test);
regress/sys/kern/ptrace2/atf-c.c
67
ATF_RUN(test);
regress/sys/kern/ptrace2/atf-c.c
69
ATF_INSPECT(test);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
28
struct ch_group test;
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
32
test.cg_meta = 0;
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
34
test.cg_data[i] = (void *)(0xc0ffee00L + i);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
35
cg_meta_set_hash(&test, i, hash[i]);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
42
rv = ch_meta_locate(&test, mask);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
51
if (cg_meta_set_flags(&test, CH_EVER_FULL) != 0 ||
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
52
cg_meta_set_flags(&test, CH_EVER_FULL) == 0) {
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
57
rv = ch_meta_locate(&test, mask);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
66
cg_meta_clear_flags(&test, 0xff);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
67
cg_meta_set_flags(&test, 0x7f);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
68
rv = ch_meta_locate(&test, mask);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
77
cg_meta_clear_flags(&test, 0xff);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
78
cg_meta_set_flags(&test, 0x73 | CH_EVER_FULL);
regress/usr.sbin/bgpd/unittests/chash_sub_test.c
79
rv = ch_meta_locate(&test, mask);
regress/usr.sbin/bgpd/unittests/chash_test.c
105
CH_FOREACH(pp, test, &head, &iter) {
regress/usr.sbin/bgpd/unittests/chash_test.c
112
CH_DESTROY(test, &head);
regress/usr.sbin/bgpd/unittests/chash_test.c
115
if (CH_INSERT(test, &head, &peers[0], NULL) != 1)
regress/usr.sbin/bgpd/unittests/chash_test.c
121
CH_GENERATE(test, peer, peer_cmp, peer_hash);
regress/usr.sbin/bgpd/unittests/chash_test.c
69
CH_HEAD(test, peer);
regress/usr.sbin/bgpd/unittests/chash_test.c
70
CH_PROTOTYPE(test, peer, peer_hash);
regress/usr.sbin/bgpd/unittests/chash_test.c
78
struct test head = CH_INITIALIZER(head);
regress/usr.sbin/bgpd/unittests/chash_test.c
85
if (CH_INSERT(test, &head, &peers[i], NULL) != 1)
regress/usr.sbin/bgpd/unittests/chash_test.c
91
if ((pp = CH_FIND(test, &head, &peers[i])) != &peers[i])
regress/usr.sbin/bgpd/unittests/chash_test.c
99
if (CH_FIND(test, &head, &p) != NULL)
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
280
test(&test_pfx[0].p, &test_pfx[i].p, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
284
test(&test_pfx[0].p, NULL, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
287
test(&med_pfx1, &med_pfx2, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
289
test(&med_pfx1, &med_pfx3, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
291
test(&med_pfx4, &med_pfx1, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
295
test(&med_pfx1, &med_pfx2, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
297
test(&med_pfx3, &med_pfx1, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
299
test(&med_pfx1, &med_pfx4, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
302
test(&age_pfx1, &age_pfx2, 1);
regress/usr.sbin/bgpd/unittests/rde_decide_test.c
305
test(&age_pfx2, &age_pfx1, 1);
regress/usr.sbin/rpki-client/test-ip.c
100
test("10.5.0.0/23",
regress/usr.sbin/rpki-client/test-ip.c
103
test("2001:0:200::/39",
regress/usr.sbin/rpki-client/test-ip.c
106
test("2001::/38",
regress/usr.sbin/rpki-client/test-ip.c
109
test("0.0.0.0/0",
regress/usr.sbin/rpki-client/test-ip.c
112
test("10.64.0.0/12",
regress/usr.sbin/rpki-client/test-ip.c
115
test("10.64.0.0/20",
regress/usr.sbin/rpki-client/test-ip.c
118
test("128.0.0.0/4",
regress/usr.sbin/rpki-client/test-ip.c
120
test("129.64.0.0/10",
regress/usr.sbin/rpki-client/test-ip.c
84
test("10.5.0.4/32",
regress/usr.sbin/rpki-client/test-ip.c
87
test("10.5.0.0/23",
regress/usr.sbin/rpki-client/test-ip.c
90
test("2001:0:200:3::1/128",
regress/usr.sbin/rpki-client/test-ip.c
94
test("2001:0:200::/39",
regress/usr.sbin/rpki-client/test-ip.c
97
test("10.5.0.0/16",
regress/usr.sbin/rpki-client/test-seqnum.c
120
seqnum_testcase(const struct seqnum *test)
regress/usr.sbin/rpki-client/test-seqnum.c
127
p = test->der;
regress/usr.sbin/rpki-client/test-seqnum.c
128
if ((aint = d2i_ASN1_INTEGER(NULL, &p, test->der_len)) == NULL) {
regress/usr.sbin/rpki-client/test-seqnum.c
129
fprintf(stderr, "FAIL: %s d2i_ASN1_INTEGER\n", test->descr);
regress/usr.sbin/rpki-client/test-seqnum.c
133
s = x509_convert_seqnum(__func__, test->descr, aint);
regress/usr.sbin/rpki-client/test-seqnum.c
135
if (s == NULL && test->valid) {
regress/usr.sbin/rpki-client/test-seqnum.c
137
test->descr);
regress/usr.sbin/rpki-client/test-seqnum.c
140
if (s != NULL && !test->valid) {
regress/usr.sbin/rpki-client/test-seqnum.c
142
test->descr);
regress/usr.sbin/snmpd/agentx.c
2398
agentx_get_handle(const char *test, const void *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
2412
errx(1, "%s: unexpected pdu message size received: %zu", test, len);
regress/usr.sbin/snmpd/agentx.c
2414
errx(1, "%s: invalid pdu version", test);
regress/usr.sbin/snmpd/agentx.c
2416
errx(1, "%s: invalid pdu type received (%hhu/5)", test, header->type);
regress/usr.sbin/snmpd/agentx.c
2419
test, header->flags, flags);
regress/usr.sbin/snmpd/agentx.c
2421
errx(1, "%s: invalid get pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2423
errx(1, "%s: unexpected get pdu sessionid (%u/%u)", test,
regress/usr.sbin/snmpd/agentx.c
2427
test);
regress/usr.sbin/snmpd/agentx.c
2437
sublen = poid(test, header, buf, len, &start);
regress/usr.sbin/snmpd/agentx.c
2440
sublen = poid(test, header, buf, len, &end);
regress/usr.sbin/snmpd/agentx.c
2445
errx(1, "%s: unexpected searchrange end: (%s/%s)", test,
regress/usr.sbin/snmpd/agentx.c
2450
test, oid_print(&start, oid1, sizeof(oid1)));
regress/usr.sbin/snmpd/agentx.c
2456
warnx("%s: unexpected searchrange start: " "(%s)", test,
regress/usr.sbin/snmpd/agentx.c
2466
agentx_getnext_handle(const char *test, const void *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
2480
errx(1, "%s: unexpected pdu message size received: %zu", test, len);
regress/usr.sbin/snmpd/agentx.c
2482
errx(1, "%s: invalid pdu version", test);
regress/usr.sbin/snmpd/agentx.c
2484
errx(1, "%s: invalid pdu type received (%hhu/6)", test, header->type);
regress/usr.sbin/snmpd/agentx.c
2487
test, header->flags, flags);
regress/usr.sbin/snmpd/agentx.c
2489
errx(1, "%s: invalid get pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2491
errx(1, "%s: unexpected get pdu sessionid (%u/%u)", test,
regress/usr.sbin/snmpd/agentx.c
2495
test);
regress/usr.sbin/snmpd/agentx.c
2505
sublen = poid(test, header, buf, len, &start);
regress/usr.sbin/snmpd/agentx.c
2508
sublen = poid(test, header, buf, len, &end);
regress/usr.sbin/snmpd/agentx.c
2515
test, oid_print(&start, oid1, sizeof(oid1)),
regress/usr.sbin/snmpd/agentx.c
2538
test,
regress/usr.sbin/snmpd/agentx.c
2547
"(%s-%s/%s-%s)", test,
regress/usr.sbin/snmpd/agentx.c
2567
agentx_getbulk_handle(const char *test, const void *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
2582
errx(1, "%s: unexpected pdu message size received: %zu", test, len);
regress/usr.sbin/snmpd/agentx.c
2584
errx(1, "%s: invalid pdu version", test);
regress/usr.sbin/snmpd/agentx.c
2588
test, header->type);
regress/usr.sbin/snmpd/agentx.c
2591
test, header->flags, flags);
regress/usr.sbin/snmpd/agentx.c
2593
errx(1, "%s: invalid get pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2595
errx(1, "%s: unexpected get pdu sessionid (%u/%u)", test,
regress/usr.sbin/snmpd/agentx.c
2599
test);
regress/usr.sbin/snmpd/agentx.c
2618
sublen = poid(test, header, buf, len, &start);
regress/usr.sbin/snmpd/agentx.c
2621
sublen = poid(test, header, buf, len, &end);
regress/usr.sbin/snmpd/agentx.c
2628
test, oid_print(&start, oid1, sizeof(oid1)),
regress/usr.sbin/snmpd/agentx.c
2651
test,
regress/usr.sbin/snmpd/agentx.c
2662
agentx_close_validate(const char *test, const void *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
2671
errx(1, "%s: unexpected pdu message size received: %zu", test, len);
regress/usr.sbin/snmpd/agentx.c
2673
errx(1, "%s: invalid pdu version", test);
regress/usr.sbin/snmpd/agentx.c
2675
errx(1, "%s: invalid pdu type received (%hhu/2)", test, header->type);
regress/usr.sbin/snmpd/agentx.c
2678
test, header->flags, flags);
regress/usr.sbin/snmpd/agentx.c
2680
errx(1, "%s: invalid close pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2683
test);
regress/usr.sbin/snmpd/agentx.c
2688
test, u8[0], reason);
regress/usr.sbin/snmpd/agentx.c
2690
errx(1, "%s: invalid close pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2694
agentx_response_validate(const char *test, const void *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
2706
errx(1, "%s: unexpected pdu message size received: %zu", test, len);
regress/usr.sbin/snmpd/agentx.c
2708
errx(1, "%s: invalid pdu version", test);
regress/usr.sbin/snmpd/agentx.c
2710
errx(1, "%s: invalid pdu type received (%hhu/18)", test, header->type);
regress/usr.sbin/snmpd/agentx.c
2713
test, header->flags, flags);
regress/usr.sbin/snmpd/agentx.c
2715
errx(1, "%s: invalid response pdu reserved received", test);
regress/usr.sbin/snmpd/agentx.c
2717
errx(1, "%s: invalid response pdu packetid received", test);
regress/usr.sbin/snmpd/agentx.c
2724
test);
regress/usr.sbin/snmpd/agentx.c
2731
test);
regress/usr.sbin/snmpd/agentx.c
2736
test, p16toh(header, u16), error);
regress/usr.sbin/snmpd/agentx.c
2741
test, p16toh(header, u16), index);
regress/usr.sbin/snmpd/agentx.c
2748
"%s: invalid response pdu varbind length", test);
regress/usr.sbin/snmpd/agentx.c
2752
errx(1, "%s: invalid response pdu varbind type", test);
regress/usr.sbin/snmpd/agentx.c
2758
test);
regress/usr.sbin/snmpd/agentx.c
2761
sublen = poid(test, header, buf, len, &name);
regress/usr.sbin/snmpd/agentx.c
2763
errx(1, "%s: invalid response pdu varbind name", test);
regress/usr.sbin/snmpd/agentx.c
2771
test);
regress/usr.sbin/snmpd/agentx.c
2777
"varbind integer", test);
regress/usr.sbin/snmpd/agentx.c
2781
errx(1, "%s: Regress test not implemented: %d", test, type);
regress/usr.sbin/snmpd/agentx.c
2787
test, i, nvarbind);
regress/usr.sbin/snmpd/agentx.c
3076
poid(const char *test, const struct header *header, const uint8_t *buf, size_t len,
regress/usr.sbin/snmpd/agentx.c
3083
errx(1, "%s: incomplete oid", test);
regress/usr.sbin/snmpd/agentx.c
3091
errx(1, "%s: invalid oid reserved (%hhx)", test, buf[3]);
regress/usr.sbin/snmpd/agentx.c
3095
errx(1, "%s: too many n_subid in oid", test);
regress/usr.sbin/snmpd/agentx.c
3097
errx(1, "%s: incomplete oid: (%zu/%zu)", test,
sbin/fdisk/part.c
865
print_menu(int (*test)(const unsigned int), const unsigned int columns)
sbin/fdisk/part.c
871
j += test(i) == 0;
sbin/fdisk/part.c
876
mi = nth_menu_item(test, i + j * rows);
sbin/fdisk/part.c
886
nth_menu_item(int (*test)(const unsigned int), unsigned int n)
sbin/fdisk/part.c
891
if (test(i) == 0) {
sbin/pfctl/pfctl_parser.c
1887
append_addr(struct pfr_buffer *b, char *s, int test, int opts)
sbin/pfctl/pfctl_parser.c
1930
rv = append_addr_host(b, n, test, not);
sbin/pfctl/pfctl_parser.c
1947
append_addr_host(struct pfr_buffer *b, struct node_host *n, int test, int not)
sbin/pfctl/pfctl_parser.c
1981
if ((test && (not || addr.pfra_net != bits)) ||
sys/arch/hppa/dev/com_dino.c
105
regs->test = COM_DINO_CLK_SEL;
sys/arch/hppa/dev/com_dino.c
52
u_int8_t test;
sys/dev/ic/bwi.c
4293
uint32_t test_lim, test;
sys/dev/ic/bwi.c
4434
test = 0;
sys/dev/ic/bwi.c
4473
test += PHY_READ(mac, 0x2d);
sys/dev/ic/bwi.c
4484
++test;
sys/dev/ic/bwi.c
4485
test >>= 8;
sys/dev/ic/bwi.c
4487
if (test > test_lim)
sys/dev/ic/stireg.h
387
STI_DEP(test);
sys/dev/pci/bktr/bktr_reg.h
168
BTBYTE (test); /* 54, 55,56,57 */
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1783
union dmub_gpint_data_register reg, test;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1799
test = (union dmub_gpint_data_register)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1802
if (test.all == reg.all)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
194
uint32_t test = 0;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn20.c
376
union dmub_gpint_data_register test;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn20.c
379
test.all = REG_READ(DMCUB_GPINT_DATAIN1);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn20.c
381
return test.all == reg.all;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn31.c
325
union dmub_gpint_data_register test;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn31.c
328
test.all = REG_READ(DMCUB_GPINT_DATAIN1);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn31.c
330
return test.all == reg.all;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.c
350
union dmub_gpint_data_register test;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.c
353
test.all = REG_READ(DMCUB_GPINT_DATAIN1);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.c
355
return test.all == reg.all;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.c
356
union dmub_gpint_data_register test;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.c
359
test.all = REG_READ(DMCUB_GPINT_DATAIN1);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.c
361
return test.all == reg.all;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn401.c
336
union dmub_gpint_data_register test;
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn401.c
339
test.all = REG_READ(DMCUB_GPINT_DATAIN1);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn401.c
341
return test.all == reg.all;
sys/dev/pci/drm/radeon/radeon_drv.c
175
MODULE_PARM_DESC(test, "Run tests");
sys/dev/pci/drm/radeon/radeon_drv.c
176
module_param_named(test, radeon_testing, int, 0444);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
101
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
104
KUNIT_ASSERT_EQ(test, err, -EBUSY);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
109
static void ttm_bo_reserve_double_resv(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
119
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
122
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
129
KUNIT_ASSERT_EQ(test, err, -EALREADY);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
139
static void ttm_bo_reserve_deadlock(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
147
bo1 = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
148
bo2 = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
161
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
164
KUNIT_ASSERT_EQ(test, err, -EDEADLK);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
211
static void ttm_bo_reserve_interrupted(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
217
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
222
KUNIT_FAIL(test, "Couldn't create ttm bo reserve task\n");
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
233
KUNIT_ASSERT_EQ(test, err, -ERESTARTSYS);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
237
static void ttm_bo_unreserve_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
239
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
249
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
251
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
252
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
255
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
258
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
262
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
273
KUNIT_ASSERT_EQ(test,
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
280
static void ttm_bo_unreserve_pinned(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
282
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
290
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
291
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
294
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
297
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
298
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
304
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
309
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
310
KUNIT_ASSERT_EQ(test,
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
314
KUNIT_ASSERT_EQ(test,
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
321
static void ttm_bo_unreserve_bulk(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
323
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
337
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
339
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
340
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
342
resv = kunit_kzalloc(test, sizeof(*resv), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
343
KUNIT_ASSERT_NOT_NULL(test, resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
346
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
351
bo1 = ttm_bo_kunit_init(test, test->priv, BO_SIZE, resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
352
bo2 = ttm_bo_kunit_init(test, test->priv, BO_SIZE, resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
359
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
367
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
374
KUNIT_ASSERT_PTR_EQ(test, res1, pos->last);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
382
static void ttm_bo_put_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
384
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
392
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
394
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
395
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
398
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
401
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
405
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
411
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
426
static void ttm_bo_put_shared_resv(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
428
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
437
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
438
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
441
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
444
external_resv = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
445
KUNIT_ASSERT_NOT_NULL(test, external_resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
449
fence = kunit_kzalloc(test, sizeof(*fence), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
450
KUNIT_ASSERT_NOT_NULL(test, fence);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
462
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
469
static void ttm_bo_pin_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
471
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
477
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
478
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
481
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
484
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
492
KUNIT_ASSERT_EQ(test, bo->pin_count, no_pins);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
495
static void ttm_bo_pin_unpin_resource(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
497
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
510
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
512
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
513
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
516
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
519
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
522
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
532
KUNIT_ASSERT_EQ(test, bo->pin_count, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
533
KUNIT_ASSERT_NULL(test, pos->first);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
534
KUNIT_ASSERT_NULL(test, pos->last);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
540
KUNIT_ASSERT_PTR_EQ(test, res, pos->last);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
541
KUNIT_ASSERT_EQ(test, bo->pin_count, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
546
static void ttm_bo_multiple_pin_one_unpin(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
548
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
561
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
563
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
564
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
567
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
570
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
573
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
587
KUNIT_ASSERT_EQ(test, bo->pin_count, 2);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
588
KUNIT_ASSERT_NULL(test, pos->first);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
589
KUNIT_ASSERT_NULL(test, pos->last);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
59
static void ttm_bo_reserve_optimistic_no_ticket(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
595
KUNIT_ASSERT_EQ(test, bo->pin_count, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
596
KUNIT_ASSERT_NULL(test, pos->first);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
597
KUNIT_ASSERT_NULL(test, pos->last);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
61
const struct ttm_bo_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
65
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
68
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
73
static void ttm_bo_reserve_locked_no_sleep(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
80
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
88
KUNIT_ASSERT_EQ(test, err, -EBUSY);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
91
static void ttm_bo_reserve_no_wait_ticket(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1004
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1005
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1007
bo_init = kunit_kzalloc(test, sizeof(*bo_init), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1008
KUNIT_ASSERT_NOT_NULL(test, bo_init);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1014
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1017
bo_val = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1024
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1025
KUNIT_EXPECT_EQ(test, bo_init->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1026
KUNIT_EXPECT_NULL(test, bo_val->resource);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1035
static void ttm_bo_validate_evict_gutting(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1039
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
104
static void ttm_bo_init_reserved_sys_man(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1048
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1049
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1051
bo_evict = kunit_kzalloc(test, sizeof(*bo_evict), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1052
KUNIT_ASSERT_NOT_NULL(test, bo_evict);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1058
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
106
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1061
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1068
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1069
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
107
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1070
KUNIT_ASSERT_NULL(test, bo_evict->resource);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1071
KUNIT_ASSERT_TRUE(test, bo_evict->ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1079
static void ttm_bo_validate_recrusive_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1086
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1093
place_tt = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1094
place_mock = ttm_place_kunit_init(test, mem_type_evict, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1096
placement_tt = ttm_placement_kunit_init(test, place_tt, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1097
placement_mock = ttm_placement_kunit_init(test, place_mock, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1099
bo_tt = kunit_kzalloc(test, sizeof(*bo_tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1100
KUNIT_ASSERT_NOT_NULL(test, bo_tt);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1102
bo_mock = kunit_kzalloc(test, sizeof(*bo_mock), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1103
KUNIT_ASSERT_NOT_NULL(test, bo_mock);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1109
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1116
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1119
bo_val = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
1126
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
116
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
117
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
119
place = ttm_place_kunit_init(test, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
120
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
129
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
130
KUNIT_EXPECT_EQ(test, kref_read(&bo->kref), 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
131
KUNIT_EXPECT_PTR_EQ(test, bo->bdev, priv->ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
132
KUNIT_EXPECT_EQ(test, bo->type, bo_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
133
KUNIT_EXPECT_EQ(test, bo->page_alignment, PAGE_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
134
KUNIT_EXPECT_PTR_EQ(test, bo->destroy, &dummy_ttm_bo_destroy);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
135
KUNIT_EXPECT_EQ(test, bo->pin_count, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
136
KUNIT_EXPECT_NULL(test, bo->bulk_move);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
137
KUNIT_EXPECT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
138
KUNIT_EXPECT_FALSE(test, ttm_tt_is_populated(bo->ttm));
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
139
KUNIT_EXPECT_NOT_NULL(test, (void *)bo->base.resv->fences);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
140
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
143
KUNIT_EXPECT_TRUE(test,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
150
static void ttm_bo_init_reserved_mock_man(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
152
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
154
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
165
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
166
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
168
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
169
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
178
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
179
KUNIT_EXPECT_EQ(test, kref_read(&bo->kref), 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
180
KUNIT_EXPECT_PTR_EQ(test, bo->bdev, priv->ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
181
KUNIT_EXPECT_EQ(test, bo->type, bo_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
182
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
185
KUNIT_EXPECT_TRUE(test,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
193
static void ttm_bo_init_reserved_resv(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
196
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
205
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
206
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
208
place = ttm_place_kunit_init(test, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
209
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
220
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
221
KUNIT_EXPECT_PTR_EQ(test, bo->base.resv, &resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
227
static void ttm_bo_validate_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
229
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
233
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
241
fst_place = ttm_place_kunit_init(test, fst_mem, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
242
fst_placement = ttm_placement_kunit_init(test, fst_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
244
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
245
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
252
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
254
snd_place = ttm_place_kunit_init(test, snd_mem, DRM_BUDDY_TOPDOWN_ALLOCATION);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
255
snd_placement = ttm_placement_kunit_init(test, snd_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
260
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
261
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, bo->base.size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
262
KUNIT_EXPECT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
263
KUNIT_EXPECT_TRUE(test, ttm_tt_is_populated(bo->ttm));
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
264
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, snd_mem);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
265
KUNIT_EXPECT_EQ(test, bo->resource->placement,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
272
static void ttm_bo_validate_invalid_placement(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
28
static struct ttm_placement *ttm_placement_kunit_init(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
283
place = ttm_place_kunit_init(test, unknown_mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
284
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
286
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
293
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
298
static void ttm_bo_validate_failed_alloc(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
301
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
310
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
315
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
316
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
322
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
328
static void ttm_bo_validate_pinned(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
339
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
34
placement = kunit_kzalloc(test, sizeof(*placement), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
340
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
342
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
35
KUNIT_ASSERT_NOT_NULL(test, placement);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
350
KUNIT_EXPECT_EQ(test, err, -EINVAL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
373
static void ttm_bo_validate_same_placement(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
375
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
377
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
384
place = ttm_place_kunit_init(test, params->mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
385
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
390
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
391
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
398
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
403
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
404
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
412
static void ttm_bo_validate_busy_placement(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
418
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
428
init_place = ttm_place_kunit_init(test, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
429
placement_init = ttm_placement_kunit_init(test, init_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
431
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
432
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
439
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
443
placement_val = ttm_placement_kunit_init(test, places, 2);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
450
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
451
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, bo->base.size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
452
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, snd_mem);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
453
KUNIT_ASSERT_TRUE(test, list_is_singular(&man->lru[bo->priority]));
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
460
static void ttm_bo_validate_multihop(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
462
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
466
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
475
fst_place = ttm_place_kunit_init(test, fst_mem, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
476
placement_init = ttm_placement_kunit_init(test, fst_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
478
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
479
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
486
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
488
final_place = ttm_place_kunit_init(test, final_mem, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
489
placement_val = ttm_placement_kunit_init(test, final_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
494
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
495
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
496
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, final_mem);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
517
static void ttm_bo_validate_no_placement_signaled(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
519
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
521
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
53
static struct dma_fence *alloc_mock_fence(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
533
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
536
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
545
placement = kunit_kzalloc(test, sizeof(*placement), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
546
KUNIT_ASSERT_NOT_NULL(test, placement);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
551
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
552
KUNIT_ASSERT_EQ(test, man->usage, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
557
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
558
KUNIT_ASSERT_EQ(test, man->usage, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
559
KUNIT_ASSERT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
560
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
565
KUNIT_ASSERT_PTR_EQ(test, bo->ttm, old_tt);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
566
KUNIT_ASSERT_FALSE(test, flags & TTM_TT_FLAG_PRIV_POPULATED);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
567
KUNIT_ASSERT_TRUE(test, flags & TTM_TT_FLAG_ZERO_ALLOC);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
57
fence = kunit_kzalloc(test, sizeof(*fence), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
58
KUNIT_ASSERT_NOT_NULL(test, fence);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
589
static void ttm_bo_validate_no_placement_not_signaled(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
591
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
602
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
604
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
608
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
610
placement = kunit_kzalloc(test, sizeof(*placement), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
611
KUNIT_ASSERT_NOT_NULL(test, placement);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
615
dma_resv_kunit_active_fence_init(test, bo->base.resv, usage);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
619
KUNIT_FAIL(test, "Couldn't create dma resv signal task\n");
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
626
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
627
KUNIT_ASSERT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
628
KUNIT_ASSERT_NULL(test, bo->resource);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
629
KUNIT_ASSERT_NULL(test, bo->bulk_move);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
630
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
633
KUNIT_ASSERT_PTR_EQ(test, bo->base.resv, &bo->base._resv);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
641
static void ttm_bo_validate_move_fence_signaled(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
644
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
65
static void dma_resv_kunit_active_fence_init(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
657
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
660
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
661
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
667
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
668
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
669
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
698
static void ttm_bo_validate_move_fence_not_signaled(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
700
const struct ttm_bo_validate_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
706
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
71
fence = alloc_mock_fence(test);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
714
init_place = ttm_place_kunit_init(test, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
715
placement_init = ttm_placement_kunit_init(test, init_place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
717
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
718
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
725
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
732
placement_val = ttm_placement_kunit_init(test, places, 2);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
736
man->move = alloc_mock_fence(test);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
740
KUNIT_FAIL(test, "Couldn't create move fence signal task\n");
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
748
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
749
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
752
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, snd_mem);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
754
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, fst_mem);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
761
static void ttm_bo_validate_happy_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
770
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
780
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
781
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
783
bos = kunit_kmalloc_array(test, bo_no, sizeof(*bos), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
784
KUNIT_ASSERT_NOT_NULL(test, bos);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
795
bo_val = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
802
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
803
KUNIT_EXPECT_EQ(test, bos[0].resource->mem_type, mem_type_evict);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
804
KUNIT_EXPECT_TRUE(test, bos[0].ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
805
KUNIT_EXPECT_TRUE(test, bos[0].ttm->page_flags & TTM_TT_FLAG_PRIV_POPULATED);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
806
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, small * 2 + BO_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
807
KUNIT_EXPECT_EQ(test, bos[1].resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
817
static void ttm_bo_validate_all_pinned_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
822
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
831
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
832
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
834
bo_big = kunit_kzalloc(test, sizeof(*bo_big), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
835
KUNIT_ASSERT_NOT_NULL(test, bo_big);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
841
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
846
bo_small = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
853
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
866
static void ttm_bo_validate_allowed_only_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
873
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
882
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
883
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
885
bo_pinned = kunit_kzalloc(test, sizeof(*bo_pinned), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
886
KUNIT_ASSERT_NOT_NULL(test, bo_pinned);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
892
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
896
bo_evictable = kunit_kzalloc(test, sizeof(*bo_evictable), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
897
KUNIT_ASSERT_NOT_NULL(test, bo_evictable);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
903
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
906
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
913
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
914
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
915
KUNIT_EXPECT_EQ(test, bo_pinned->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
916
KUNIT_EXPECT_EQ(test, bo_evictable->resource->mem_type, mem_type_evict);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
917
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2 + BO_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
931
static void ttm_bo_validate_deleted_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
937
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
947
place = ttm_place_kunit_init(test, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
948
placement = ttm_placement_kunit_init(test, place, 1);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
950
bo_big = kunit_kzalloc(test, sizeof(*bo_big), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
951
KUNIT_ASSERT_NOT_NULL(test, bo_big);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
957
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
958
KUNIT_EXPECT_EQ(test, ttm_resource_manager_usage(man), big);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
963
bo_small = ttm_bo_kunit_init(test, test->priv, small, NULL);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
970
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
971
KUNIT_EXPECT_EQ(test, bo_small->resource->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
972
KUNIT_EXPECT_EQ(test, ttm_resource_manager_usage(man), small);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
973
KUNIT_EXPECT_NULL(test, bo_big->ttm);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
974
KUNIT_EXPECT_NULL(test, bo_big->resource);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
981
static void ttm_bo_validate_busy_domain_evict(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
986
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
998
err = ttm_device_kunit_init_bad_evict(test->priv, priv->ttm_dev, false, false);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
999
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
105
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
106
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
113
KUNIT_EXPECT_EQ(test, err, -EINVAL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
153
static void ttm_device_init_pools(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
155
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
156
const struct ttm_device_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
162
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
163
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
168
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
171
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
172
KUNIT_EXPECT_PTR_EQ(test, pool->dev, priv->dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
173
KUNIT_EXPECT_EQ(test, pool->use_dma_alloc, params->use_dma_alloc);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
174
KUNIT_EXPECT_EQ(test, pool->use_dma32, params->use_dma32);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
18
static void ttm_device_init_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
180
KUNIT_EXPECT_PTR_EQ(test, pt.pool, pool);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
181
KUNIT_EXPECT_EQ(test, pt.caching, i);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
182
KUNIT_EXPECT_EQ(test, pt.order, j);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
185
KUNIT_ASSERT_FALSE(test,
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
20
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
25
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
26
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
29
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
31
KUNIT_EXPECT_PTR_EQ(test, ttm_dev->funcs, &ttm_dev_funcs);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
32
KUNIT_ASSERT_NOT_NULL(test, ttm_dev->wq);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
33
KUNIT_ASSERT_NOT_NULL(test, ttm_dev->man_drv[TTM_PL_SYSTEM]);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
36
KUNIT_ASSERT_NOT_NULL(test, ttm_sys_man);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
37
KUNIT_EXPECT_TRUE(test, ttm_sys_man->use_tt);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
38
KUNIT_EXPECT_TRUE(test, ttm_sys_man->use_type);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
39
KUNIT_ASSERT_NOT_NULL(test, ttm_sys_man->func);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
41
KUNIT_EXPECT_PTR_EQ(test, ttm_dev->dev_mapping,
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
47
static void ttm_device_init_multiple(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
49
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
54
ttm_devs = kunit_kcalloc(test, num_dev, sizeof(*ttm_devs), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
55
KUNIT_ASSERT_NOT_NULL(test, ttm_devs);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
59
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
61
KUNIT_EXPECT_PTR_EQ(test, ttm_devs[i].dev_mapping,
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
63
KUNIT_ASSERT_NOT_NULL(test, ttm_devs[i].wq);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
64
KUNIT_EXPECT_PTR_EQ(test, ttm_devs[i].funcs, &ttm_dev_funcs);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
65
KUNIT_ASSERT_NOT_NULL(test, ttm_devs[i].man_drv[TTM_PL_SYSTEM]);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
68
KUNIT_ASSERT_EQ(test, list_count_nodes(&ttm_devs[0].device_list), num_dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
74
static void ttm_device_fini_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
76
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
81
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
82
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
85
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
88
KUNIT_ASSERT_NOT_NULL(test, man);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
92
KUNIT_ASSERT_FALSE(test, man->use_type);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
93
KUNIT_ASSERT_TRUE(test, list_empty(&man->lru[0]));
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
94
KUNIT_ASSERT_NULL(test, ttm_dev->man_drv[TTM_PL_SYSTEM]);
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
97
static void ttm_device_init_no_vma_man(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_device_test.c
99
struct ttm_test_devices *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
173
struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
182
bo = kunit_kzalloc(test, sizeof(*bo), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
183
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
191
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
202
struct ttm_place *ttm_place_kunit_init(struct kunit *test, u32 mem_type, u32 flags)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
206
place = kunit_kzalloc(test, sizeof(*place), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
207
KUNIT_ASSERT_NOT_NULL(test, place);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
222
struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
226
devs = kunit_kzalloc(test, sizeof(*devs), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
227
KUNIT_ASSERT_NOT_NULL(test, devs);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
229
devs->dev = drm_kunit_helper_alloc_device(test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
230
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, devs->dev);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
235
devs->drm = __drm_kunit_helper_alloc_drm_device(test, devs->dev,
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
238
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, devs->drm);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
244
struct ttm_test_devices *ttm_test_devices_all(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
250
devs = ttm_test_devices_basic(test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
252
ttm_dev = kunit_kzalloc(test, sizeof(*ttm_dev), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
253
KUNIT_ASSERT_NOT_NULL(test, ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
256
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
264
void ttm_test_devices_put(struct kunit *test, struct ttm_test_devices *devs)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
269
drm_kunit_helper_free_device(test, devs->dev);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
273
int ttm_test_devices_init(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
277
priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
278
KUNIT_ASSERT_NOT_NULL(test, priv);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
280
priv = ttm_test_devices_basic(test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
281
test->priv = priv;
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
287
int ttm_test_devices_all_init(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
291
priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
292
KUNIT_ASSERT_NOT_NULL(test, priv);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
294
priv = ttm_test_devices_all(test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
295
test->priv = priv;
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
301
void ttm_test_devices_fini(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
303
ttm_test_devices_put(test, test->priv);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
37
struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
41
struct ttm_place *ttm_place_kunit_init(struct kunit *test, u32 mem_type,
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
45
struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
46
struct ttm_test_devices *ttm_test_devices_all(struct kunit *test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
48
void ttm_test_devices_put(struct kunit *test, struct ttm_test_devices *devs);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
51
int ttm_test_devices_init(struct kunit *test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
52
int ttm_test_devices_all_init(struct kunit *test);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.h
53
void ttm_test_devices_fini(struct kunit *test);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
134
static void ttm_pool_alloc_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
136
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
138
const struct ttm_pool_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
147
tt = ttm_tt_kunit_init(test, 0, caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
148
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
150
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
151
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
156
KUNIT_ASSERT_PTR_EQ(test, pool->dev, devs->dev);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
157
KUNIT_ASSERT_EQ(test, pool->nid, NUMA_NO_NODE);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
158
KUNIT_ASSERT_EQ(test, pool->use_dma_alloc, params->use_dma_alloc);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
161
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
162
KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
169
KUNIT_ASSERT_NOT_NULL(test, (void *)fst_page->private);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
170
KUNIT_ASSERT_NOT_NULL(test, (void *)last_page->private);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
172
KUNIT_ASSERT_EQ(test, fst_page->private, params->order);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
176
KUNIT_ASSERT_NOT_NULL(test, (void *)fst_page->private);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
177
KUNIT_ASSERT_NULL(test, (void *)last_page->private);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
183
KUNIT_ASSERT_EQ(test, fst_page->private,
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
186
KUNIT_ASSERT_EQ(test, last_page->private, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
195
static void ttm_pool_alloc_basic_dma_addr(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
197
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
199
const struct ttm_pool_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
209
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
210
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
212
bo = ttm_bo_kunit_init(test, devs, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
213
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
216
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
218
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
219
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
224
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
225
KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
230
KUNIT_ASSERT_NOT_NULL(test, (void *)(uintptr_t)dma1);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
231
KUNIT_ASSERT_NOT_NULL(test, (void *)(uintptr_t)dma2);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
238
static void ttm_pool_alloc_order_caching_match(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
248
pool = ttm_pool_pre_populated(test, size, caching);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
251
KUNIT_ASSERT_FALSE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
253
tt = ttm_tt_kunit_init(test, 0, caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
254
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
257
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
259
KUNIT_ASSERT_TRUE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
266
static void ttm_pool_alloc_caching_mismatch(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
277
pool = ttm_pool_pre_populated(test, size, pool_caching);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
282
tt = ttm_tt_kunit_init(test, 0, tt_caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
283
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
285
KUNIT_ASSERT_FALSE(test, list_empty(&pt_pool->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
286
KUNIT_ASSERT_TRUE(test, list_empty(&pt_tt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
289
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
294
KUNIT_ASSERT_FALSE(test, list_empty(&pt_pool->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
295
KUNIT_ASSERT_FALSE(test, list_empty(&pt_tt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
30
static int ttm_pool_test_init(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
300
static void ttm_pool_alloc_order_mismatch(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
311
pool = ttm_pool_pre_populated(test, fst_size, caching);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
316
tt = ttm_tt_kunit_init(test, 0, caching, snd_size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
317
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
319
KUNIT_ASSERT_FALSE(test, list_empty(&pt_pool->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
320
KUNIT_ASSERT_TRUE(test, list_empty(&pt_tt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
323
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
328
KUNIT_ASSERT_FALSE(test, list_empty(&pt_pool->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
329
KUNIT_ASSERT_FALSE(test, list_empty(&pt_tt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
334
static void ttm_pool_free_dma_alloc(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
336
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
34
priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
345
tt = ttm_tt_kunit_init(test, 0, caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
346
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
348
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
349
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
35
KUNIT_ASSERT_NOT_NULL(test, priv);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
355
KUNIT_ASSERT_TRUE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
360
KUNIT_ASSERT_FALSE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
365
static void ttm_pool_free_no_dma_alloc(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
367
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
37
priv->devs = ttm_test_devices_basic(test);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
376
tt = ttm_tt_kunit_init(test, 0, caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
377
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
379
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
38
test->priv = priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
380
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
386
KUNIT_ASSERT_TRUE(test, list_is_singular(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
391
KUNIT_ASSERT_TRUE(test, list_is_singular(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
396
static void ttm_pool_fini_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
404
pool = ttm_pool_pre_populated(test, size, caching);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
407
KUNIT_ASSERT_FALSE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
411
KUNIT_ASSERT_TRUE(test, list_empty(&pt->pages));
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
43
static void ttm_pool_test_fini(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
45
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
47
ttm_test_devices_put(test, priv->devs);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
50
static struct ttm_tt *ttm_tt_kunit_init(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
55
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
60
bo = ttm_bo_kunit_init(test, priv->devs, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
61
KUNIT_ASSERT_NOT_NULL(test, bo);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
64
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
65
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
68
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
73
static struct ttm_pool *ttm_pool_pre_populated(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
77
struct ttm_pool_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
83
tt = ttm_tt_kunit_init(test, 0, caching, size);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
84
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
86
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
87
KUNIT_ASSERT_NOT_NULL(test, pool);
sys/dev/pci/drm/ttm/tests/ttm_pool_test.c
92
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
107
static void ttm_resource_init_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
109
const struct ttm_resource_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
110
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
117
ttm_init_test_mocks(test, priv, params->mem_type, params->flags);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
122
ttm_init_test_manager(test, priv, params->mem_type);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
124
res = kunit_kzalloc(test, sizeof(*res), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
125
KUNIT_ASSERT_NOT_NULL(test, res);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
130
KUNIT_ASSERT_TRUE(test, list_empty(&man->lru[bo->priority]));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
134
KUNIT_ASSERT_EQ(test, res->start, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
135
KUNIT_ASSERT_EQ(test, res->size, RES_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
136
KUNIT_ASSERT_EQ(test, res->mem_type, place->mem_type);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
137
KUNIT_ASSERT_EQ(test, res->placement, place->flags);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
138
KUNIT_ASSERT_PTR_EQ(test, res->bo, bo);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
140
KUNIT_ASSERT_NULL(test, res->bus.addr);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
141
KUNIT_ASSERT_EQ(test, res->bus.offset, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
142
KUNIT_ASSERT_FALSE(test, res->bus.is_iomem);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
143
KUNIT_ASSERT_EQ(test, res->bus.caching, ttm_cached);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
144
KUNIT_ASSERT_EQ(test, man->usage, expected_usage);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
146
KUNIT_ASSERT_TRUE(test, list_is_singular(&man->lru[bo->priority]));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
151
static void ttm_resource_init_pinned(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
153
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
159
ttm_init_test_mocks(test, priv, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
165
res = kunit_kzalloc(test, sizeof(*res), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
166
KUNIT_ASSERT_NOT_NULL(test, res);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
167
KUNIT_ASSERT_TRUE(test, list_empty(&bo->bdev->unevictable));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
172
KUNIT_ASSERT_TRUE(test, list_is_singular(&bo->bdev->unevictable));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
178
KUNIT_ASSERT_TRUE(test, list_empty(&bo->bdev->unevictable));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
181
static void ttm_resource_fini_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
183
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
189
ttm_init_test_mocks(test, priv, TTM_PL_SYSTEM, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
195
res = kunit_kzalloc(test, sizeof(*res), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
196
KUNIT_ASSERT_NOT_NULL(test, res);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
201
KUNIT_ASSERT_TRUE(test, list_empty(&res->lru.link));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
202
KUNIT_ASSERT_EQ(test, man->usage, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
205
static void ttm_resource_manager_init_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
207
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
211
man = kunit_kzalloc(test, sizeof(*man), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
212
KUNIT_ASSERT_NOT_NULL(test, man);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
216
KUNIT_ASSERT_PTR_EQ(test, man->bdev, priv->devs->ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
217
KUNIT_ASSERT_EQ(test, man->size, size);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
218
KUNIT_ASSERT_EQ(test, man->usage, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
219
KUNIT_ASSERT_NULL(test, man->move);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
220
KUNIT_ASSERT_NOT_NULL(test, &man->move_lock);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
223
KUNIT_ASSERT_TRUE(test, list_empty(&man->lru[i]));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
226
static void ttm_resource_manager_usage_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
228
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
235
ttm_init_test_mocks(test, priv, TTM_PL_SYSTEM, TTM_PL_FLAG_TOPDOWN);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
239
res = kunit_kzalloc(test, sizeof(*res), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
240
KUNIT_ASSERT_NOT_NULL(test, res);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
247
KUNIT_ASSERT_EQ(test, actual_usage, RES_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
252
static void ttm_resource_manager_set_used_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
254
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
258
KUNIT_ASSERT_TRUE(test, man->use_type);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
26
static int ttm_resource_test_init(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
261
KUNIT_ASSERT_FALSE(test, man->use_type);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
264
static void ttm_sys_man_alloc_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
266
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
274
ttm_init_test_mocks(test, priv, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
281
KUNIT_ASSERT_EQ(test, ret, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
282
KUNIT_ASSERT_EQ(test, res->size, RES_SIZE);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
283
KUNIT_ASSERT_EQ(test, res->mem_type, mem_type);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
284
KUNIT_ASSERT_PTR_EQ(test, res->bo, bo);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
289
static void ttm_sys_man_free_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
291
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
298
ttm_init_test_mocks(test, priv, mem_type, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
30
priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
302
res = kunit_kzalloc(test, sizeof(*res), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
303
KUNIT_ASSERT_NOT_NULL(test, res);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
31
KUNIT_ASSERT_NOT_NULL(test, priv);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
310
KUNIT_ASSERT_TRUE(test, list_empty(&man->lru[bo->priority]));
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
311
KUNIT_ASSERT_EQ(test, man->usage, 0);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
33
priv->devs = ttm_test_devices_all(test);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
34
KUNIT_ASSERT_NOT_NULL(test, priv->devs);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
36
test->priv = priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
41
static void ttm_resource_test_fini(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
43
struct ttm_resource_test_priv *priv = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
45
ttm_test_devices_put(test, priv->devs);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
48
static void ttm_init_test_mocks(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
55
KUNIT_ASSERT_NOT_NULL(test, priv->devs->ttm_dev);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
57
priv->bo = ttm_bo_kunit_init(test, priv->devs, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
58
priv->place = ttm_place_kunit_init(test, mem_type, flags);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
61
static void ttm_init_test_manager(struct kunit *test,
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
69
man = kunit_kzalloc(test, sizeof(*man), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_resource_test.c
70
KUNIT_ASSERT_NOT_NULL(test, man);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
100
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
103
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
104
KUNIT_ASSERT_NOT_NULL(test, tt->pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
107
KUNIT_ASSERT_NULL(test, tt->pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
110
static void ttm_tt_fini_sg(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
117
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
118
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
120
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
123
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
124
KUNIT_ASSERT_NOT_NULL(test, tt->dma_address);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
127
KUNIT_ASSERT_NULL(test, tt->dma_address);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
130
static void ttm_tt_fini_shmem(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
138
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
139
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
141
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
144
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
150
KUNIT_ASSERT_NULL(test, tt->swap_storage);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
153
static void ttm_tt_create_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
158
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
165
KUNIT_EXPECT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
166
KUNIT_EXPECT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
172
static void ttm_tt_create_invalid_bo_type(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
177
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
184
KUNIT_EXPECT_EQ(test, err, -EINVAL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
185
KUNIT_EXPECT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
188
static void ttm_tt_create_ttm_exists(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
195
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
196
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
198
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
201
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
209
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
210
KUNIT_ASSERT_PTR_EQ(test, tt, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
223
static void ttm_tt_create_failed(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
225
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
229
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
238
KUNIT_ASSERT_EQ(test, err, -ENOMEM);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
241
static void ttm_tt_destroy_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
243
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
247
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
253
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
254
KUNIT_ASSERT_NOT_NULL(test, bo->ttm);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
259
static void ttm_tt_populate_null_ttm(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
261
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
266
KUNIT_ASSERT_EQ(test, err, -EINVAL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
269
static void ttm_tt_populate_populated_ttm(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
271
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
278
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
280
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
281
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
284
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
287
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
291
KUNIT_ASSERT_PTR_EQ(test, populated_page, *tt->pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
294
static void ttm_tt_unpopulate_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
296
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
302
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
304
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
305
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
308
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
311
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
312
KUNIT_ASSERT_TRUE(test, ttm_tt_is_populated(tt));
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
315
KUNIT_ASSERT_FALSE(test, ttm_tt_is_populated(tt));
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
318
static void ttm_tt_unpopulate_empty_ttm(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
320
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
325
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
327
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
328
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
331
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
337
static void ttm_tt_swapin_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
339
const struct ttm_test_devices *devs = test->priv;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
346
bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
348
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
349
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
352
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
355
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
356
KUNIT_ASSERT_TRUE(test, ttm_tt_is_populated(tt));
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
359
KUNIT_ASSERT_EQ(test, num_pages, expected_num_pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
360
KUNIT_ASSERT_NOT_NULL(test, tt->swap_storage);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
361
KUNIT_ASSERT_TRUE(test, tt->page_flags & TTM_TT_FLAG_SWAPPED);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
365
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
368
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
369
KUNIT_ASSERT_NULL(test, tt->swap_storage);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
370
KUNIT_ASSERT_FALSE(test, tt->page_flags & TTM_TT_FLAG_SWAPPED);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
39
static void ttm_tt_init_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
41
const struct ttm_tt_test_case *params = test->param_value;
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
50
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
51
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
53
bo = ttm_bo_kunit_init(test, test->priv, params->size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
56
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
58
KUNIT_ASSERT_EQ(test, tt->num_pages, num_pages + extra_pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
60
KUNIT_ASSERT_EQ(test, tt->page_flags, page_flags);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
61
KUNIT_ASSERT_EQ(test, tt->caching, caching);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
63
KUNIT_ASSERT_NULL(test, tt->dma_address);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
64
KUNIT_ASSERT_NULL(test, tt->swap_storage);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
67
static void ttm_tt_init_misaligned(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
76
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
77
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
79
bo = ttm_bo_kunit_init(test, test->priv, size, NULL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
85
KUNIT_ASSERT_EQ(test, err, 0);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
87
KUNIT_ASSERT_EQ(test, tt->num_pages, num_pages);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
90
static void ttm_tt_fini_basic(struct kunit *test)
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
97
tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
98
KUNIT_ASSERT_NOT_NULL(test, tt);
sys/dev/pci/if_icevar.h
4286
ice_bitstr_t test;
sys/dev/pci/if_icevar.h
4296
test = mask ^ *curbitstr;
sys/dev/pci/if_icevar.h
4298
test &= ice_bit_make_mask(start, ICE_BITSTR_BITS - 1);
sys/dev/pci/if_icevar.h
4299
while (test == 0 && curbitstr < stopbitstr)
sys/dev/pci/if_icevar.h
4300
test = mask ^ *(++curbitstr);
sys/dev/pci/if_icevar.h
4302
value = ((curbitstr - bitstr) * ICE_BITSTR_BITS) + ffs(test) - 1;
sys/dev/pci/if_icevar.h
4303
if (test == 0 ||
sys/dev/pci/if_icevar.h
4314
ice_bitstr_t *curbitstr, mask, test;
sys/dev/pci/if_icevar.h
4325
test = ~(ICE_BITSTR_MASK << ice_bit_offset(start));
sys/dev/pci/if_icevar.h
4326
for (last = size - 1, test |= mask ^ *curbitstr;
sys/dev/pci/if_icevar.h
4328
(test & ice_bit_make_mask(0, last)) == 0);
sys/dev/pci/if_icevar.h
4329
last -= ICE_BITSTR_BITS, test = mask ^ *++curbitstr) {
sys/dev/pci/if_icevar.h
4330
if (test == 0)
sys/dev/pci/if_icevar.h
4333
for (shft = maxshft; shft > 1 && (test & (test + 1)) != 0;
sys/dev/pci/if_icevar.h
4335
test |= test >> shft / 2;
sys/dev/pci/if_icevar.h
4337
last = ffs(~(test >> 1));
sys/dev/pci/if_myx.c
557
struct myx_dmamem test;
sys/dev/pci/if_myx.c
579
if (myx_dmamem_alloc(sc, &test, 4096, 4096) != 0)
sys/dev/pci/if_myx.c
581
map = test.mxm_map;
sys/dev/pci/if_myx.c
615
myx_dmamem_free(sc, &test);
sys/dev/pci/if_myx.c
621
myx_dmamem_free(sc, &test);
sys/dev/sbus/cgtwelvereg.h
200
u_int32_t test;
sys/net/radix.c
242
int test, b, rn_b;
sys/net/radix.c
276
test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */
sys/net/radix.c
277
for (b = 7; (test >>= 1) > 0;)
sys/net/wg_cookie.c
443
#define T_FAILED_ITER(test) do { \
sys/net/wg_cookie.c
444
printf("%s %s: failed. iter: %d\n", __func__, test, i); \
sys/net/wg_cookie.c
447
#define T_FAILED(test) do { \
sys/net/wg_cookie.c
448
printf("%s %s: failed.\n", __func__, test); \
sys/net/wg_noise.c
983
#define T_FAILED(test) do { \
sys/net/wg_noise.c
984
printf("%s %s: failed\n", __func__, test); \
sys/uvm/uvm_map.c
2644
uvm_tree_assert(struct vm_map *map, int test, char *test_str,
sys/uvm/uvm_map.c
2649
if (test)
usr.bin/openssl/s_client.c
1141
BIO *test;
usr.bin/openssl/s_client.c
1143
test = BIO_new(BIO_f_nbio_test());
usr.bin/openssl/s_client.c
1144
sbio = BIO_push(test, sbio);
usr.bin/openssl/s_server.c
1537
BIO *test;
usr.bin/openssl/s_server.c
1539
test = BIO_new(BIO_f_nbio_test());
usr.bin/openssl/s_server.c
1540
sbio = BIO_push(test, sbio);
usr.bin/openssl/s_server.c
1935
BIO *test;
usr.bin/openssl/s_server.c
1937
test = BIO_new(BIO_f_nbio_test());
usr.bin/openssl/s_server.c
1938
sbio = BIO_push(test, sbio);
usr.bin/rsync/rmatch.c
122
switch (classmatch(pattern, test, &pattern)) {
usr.bin/rsync/rmatch.c
147
if (c <= test && test <= c2)
usr.bin/rsync/rmatch.c
149
} else if (c == test)
usr.bin/rsync/rmatch.c
64
classmatch(const char *pattern, char test, const char **ep)
usr.bin/rsync/rmatch.c
85
if (cc->isctype((unsigned char)test))
usr.bin/rsync/rmatch.c
97
rangematch(const char **pp, char test)
usr.bin/ssh/libcrux_mlkem768_sha3.h
142
#define EURYDICE_ASSERT(test, msg) \
usr.bin/ssh/libcrux_mlkem768_sha3.h
144
if (!(test)) { \
usr.bin/ssh/servconf.c
1061
if (ci == NULL || (ci->test && ci->user == NULL)) {
usr.bin/ssh/servconf.c
1073
if (ci == NULL || (ci->test && ci->user == NULL)) {
usr.bin/ssh/servconf.c
1087
if (ci == NULL || (ci->test && ci->host == NULL)) {
usr.bin/ssh/servconf.c
1099
if (ci == NULL || (ci->test && ci->address == NULL)) {
usr.bin/ssh/servconf.c
1122
if (ci == NULL || (ci->test && ci->laddress == NULL)) {
usr.bin/ssh/servconf.c
1154
if (ci == NULL || (ci->test && ci->lport == -1)) {
usr.bin/ssh/servconf.c
1168
if (ci == NULL || (ci->test && ci->rdomain == NULL)) {
usr.bin/ssh/servconf.h
266
int test; /* test mode, allow some attributes to be
usr.bin/ssh/sshd.c
1249
connection_info->test = 1;
usr.bin/tic/tic.c
1338
char *test = (strchr) (list, ch);
usr.bin/tic/tic.c
1339
if (test != 0)
usr.bin/tic/tic.c
1340
result = (long) (test - list);
usr.bin/tic/tic.c
1601
long test;
usr.bin/tic/tic.c
1603
for (k = 0, kk = -1, test = 100; k < 5; ++k) {
usr.bin/tic/tic.c
1605
list[k] < test) {
usr.bin/tic/tic.c
1606
test = list[k];
usr.bin/tic/tic.c
1610
last = test;
usr.bin/tic/tic.c
2639
char *test;
usr.bin/tic/tic.c
2642
test = TIPARM_9(set_attributes,
usr.bin/tic/tic.c
2652
if (test != 0) {
usr.bin/tic/tic.c
2654
if (!similar_sgr(num, test, cap)) {
usr.bin/tic/tic.c
2658
num, _nc_visbuf2(2, test));
usr.bin/tic/tic.c
2660
} else if (_nc_capcmp(test, zero)) {
usr.bin/tic/tic.c
2667
return test;
usr.bin/tic/tic.c
2836
const char *test = table[k].xcurses;
usr.bin/tic/tic.c
2837
size_t size = strlen(test);
usr.bin/tic/tic.c
2839
if (!strncmp(find, test, size) && strcmp(find, test)) {
usr.bin/tic/tic.c
2846
: test), find);
usr.bin/tic/tic.c
2870
check_exit_attribute(const char *name, char *test, char *trimmed, char *untrimmed)
usr.bin/tic/tic.c
2872
if (VALID_STRING(test) && (trimmed != 0)) {
usr.bin/tic/tic.c
2873
if (similar_sgr(-1, trimmed, test) ||
usr.bin/tic/tic.c
2874
similar_sgr(-1, untrimmed, test)) {
usr.bin/tic/tic.c
2919
char *test = tgoto(value, 0, 0);
usr.bin/tic/tic.c
2920
if (is_sgr_string(test)) {
usr.bin/tic/tic.c
2928
while (*test != 0) {
usr.bin/tic/tic.c
2929
if (isdigit(UChar(*test))) {
usr.bin/tic/tic.c
2930
param = 10 * param + (*test - '0');
usr.bin/tic/tic.c
2945
++test;
usr.bin/tmux/tty-acs.c
189
int test = *(u_char *)key;
usr.bin/tmux/tty-acs.c
191
return (test - entry->key);
usr.bin/tmux/tty-acs.c
198
const char *test = key;
usr.bin/tmux/tty-acs.c
200
return (strcmp(test, entry->string));
usr.sbin/bgpd/rde_community.c
278
struct community test, mask;
usr.sbin/bgpd/rde_community.c
287
if (fc2c(fc, peer, &test, &mask) == -1)
usr.sbin/bgpd/rde_community.c
291
if (mask_match(&comm->communities[l], &test,
usr.sbin/bgpd/rde_community.c
384
struct community test, mask;
usr.sbin/bgpd/rde_community.c
402
if (fc2c(fc, peer, &test, &mask) == -1)
usr.sbin/bgpd/rde_community.c
406
if (mask_match(&comm->communities[l], &test,
usr.sbin/bgpd/rde_community.c
410
(comm->nentries - l - 1) * sizeof(test));
usr.sbin/lpr/lpr/lpr.c
102
static int test(char *);
usr.sbin/lpr/lpr/lpr.c
326
if ((f = test(arg = *argv++)) < 0)
usr.sbin/makefs/cd9660.c
293
int test;
usr.sbin/makefs/cd9660.c
299
test = cd9660_valid_d_chars(val);
usr.sbin/makefs/cd9660.c
301
test = cd9660_valid_a_chars(val);
usr.sbin/makefs/cd9660.c
302
if (test) {
usr.sbin/makefs/cd9660.c
304
if (test == 2)
usr.sbin/radiusctl/radiusctl.c
244
struct radius_test test = { .res = res };
usr.sbin/radiusctl/radiusctl.c
379
test.ecode = EXIT_FAILURE;
usr.sbin/radiusctl/radiusctl.c
380
test.res = res;
usr.sbin/radiusctl/radiusctl.c
381
test.sock = sock;
usr.sbin/radiusctl/radiusctl.c
382
test.reqpkt = reqpkt;
usr.sbin/radiusctl/radiusctl.c
384
event_set(&test.ev_recv, sock, EV_READ|EV_PERSIST,
usr.sbin/radiusctl/radiusctl.c
385
radius_test_recv, &test);
usr.sbin/radiusctl/radiusctl.c
387
evtimer_set(&test.ev_send, radius_test_send, &test);
usr.sbin/radiusctl/radiusctl.c
388
evtimer_set(&test.ev_timedout, radius_test_timedout, &test);
usr.sbin/radiusctl/radiusctl.c
390
event_add(&test.ev_recv, NULL);
usr.sbin/radiusctl/radiusctl.c
391
evtimer_add(&test.ev_timedout, &res->maxwait);
usr.sbin/radiusctl/radiusctl.c
396
radius_test_send(0, EV_TIMEOUT, &test);
usr.sbin/radiusctl/radiusctl.c
409
return (test.ecode);
usr.sbin/radiusctl/radiusctl.c
415
struct radius_test *test = arg;
usr.sbin/radiusctl/radiusctl.c
416
RADIUS_PACKET *reqpkt = test->reqpkt;
usr.sbin/radiusctl/radiusctl.c
420
rv = send(test->sock,
usr.sbin/radiusctl/radiusctl.c
434
if (++test->tries >= test->res->tries)
usr.sbin/radiusctl/radiusctl.c
437
evtimer_add(&test->ev_send, &test->res->interval);
usr.sbin/radiusctl/radiusctl.c
443
struct radius_test *test = arg;
usr.sbin/radiusctl/radiusctl.c
445
RADIUS_PACKET *reqpkt = test->reqpkt;
usr.sbin/radiusctl/radiusctl.c
465
radius_dump(stdout, respkt, true, test->res->secret);
usr.sbin/radiusctl/radiusctl.c
467
event_del(&test->ev_recv);
usr.sbin/radiusctl/radiusctl.c
468
evtimer_del(&test->ev_send);
usr.sbin/radiusctl/radiusctl.c
469
evtimer_del(&test->ev_timedout);
usr.sbin/radiusctl/radiusctl.c
470
test->ecode = EXIT_SUCCESS;
usr.sbin/radiusctl/radiusctl.c
479
struct radius_test *test = arg;
usr.sbin/radiusctl/radiusctl.c
481
event_del(&test->ev_recv);
usr.sbin/snmpd/parse.y
264
struct agentx_master *master, *test;
usr.sbin/snmpd/parse.y
297
TAILQ_FOREACH(test, &conf->sc_agentx_masters,
usr.sbin/snmpd/parse.y
299
if (strcmp(test->axm_sun.sun_path,
usr.sbin/snmpd/parse.y
302
test->axm_sun.sun_path);