Lines Matching refs:uts
28 static int dm_test_init(struct unit_test_state *uts, bool of_live) in dm_test_init() argument
30 struct dm_test_state *dms = uts->priv; in dm_test_init()
39 gd_set_of_root(of_live ? uts->of_root : NULL); in dm_test_init()
47 static int do_autoprobe(struct unit_test_state *uts) in do_autoprobe() argument
61 static int dm_test_destroy(struct unit_test_state *uts) in dm_test_destroy() argument
81 static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, in dm_do_test() argument
89 ut_assertok(dm_test_init(uts, of_live)); in dm_do_test()
91 uts->start = mallinfo(); in dm_do_test()
95 ut_assertok(do_autoprobe(uts)); in dm_do_test()
107 test->func(uts); in dm_do_test()
111 ut_assertok(dm_test_destroy(uts)); in dm_do_test()
153 struct unit_test_state *uts = &global_dm_test_state; in dm_test_main() local
157 uts->priv = &_global_priv_dm_test_state; in dm_test_main()
158 uts->fail_count = 0; in dm_test_main()
177 uts->of_root = gd_of_root(); in dm_test_main()
189 ut_assertok(dm_do_test(uts, test, true)); in dm_test_main()
200 ut_assertok(dm_do_test(uts, test, false)); in dm_test_main()
209 printf("Failures: %d\n", uts->fail_count); in dm_test_main()
212 gd_set_of_root(uts->of_root); in dm_test_main()
219 return uts->fail_count ? CMD_RET_FAILURE : 0; in dm_test_main()