Lines Matching +full:test +full:- +full:variants
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * timerfd() test by Davide Libenzi (test app for timerfd)
9 * Test timerfd with the flags:
32 static struct time64_variants variants[] = { variable
44 struct time64_variants *tv = &variants[tst_variant]; in getustime()
45 struct tst_ts tp = {.type = tv->ts_type, }; in getustime()
47 if (tv->clock_gettime((clockid_t) clockid, tst_ts_get(&tp))) { in getustime()
58 struct time64_variants *tv = &variants[tst_variant]; in settime()
63 if (tv->tfd_settime(tfd, tflags, tst_its_get(tmr), NULL)) in settime()
75 if (poll(&pfd, 1, -1) < 0) { in waittmr()
95 struct time64_variants *tv = &variants[tst_variant]; in run()
99 struct tst_its tmr = {.type = tv->ts_type, }; in run()
102 tst_res(TINFO, "testing %s", clks->name); in run()
104 tfd = SAFE_TIMERFD_CREATE(clks->id, 0); in run()
111 tnow = getustime(clks->id); in run()
116 tnow = getustime(clks->id); in run()
120 tmr.type = tv->ts_type; in run()
122 if (tv->tfd_gettime(tfd, tst_its_get(&tmr))) in run()
140 TEST(read(tfd, &uticks, sizeof(uticks))); in run()
153 tst_res(TINFO, "Testing variant: %s", variants[tst_variant].desc); in setup()
156 static struct tst_test test = { variable
157 .test = run,
159 .test_variants = ARRAY_SIZE(variants),