From af042c211d017f5a1c324fea9e817e33bfd2a475 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Fri, 2 Sep 2022 13:57:54 +0200 Subject: cyclic: Add a simple test Add a test for cyclic function registration and activation. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- test/test-main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/test-main.c') diff --git a/test/test-main.c b/test/test-main.c index 4f1c54b0f9b..ae34002a3d4 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -220,6 +221,7 @@ static int dm_test_restore(struct device_node *of_root) static int test_pre_run(struct unit_test_state *uts, struct unit_test *test) { ut_assertok(event_init()); + ut_assertok(cyclic_init()); if (test->flags & UT_TESTF_DM) ut_assertok(dm_test_pre_run(uts)); @@ -265,6 +267,7 @@ static int test_post_run(struct unit_test_state *uts, struct unit_test *test) ut_unsilence_console(uts); if (test->flags & UT_TESTF_DM) ut_assertok(dm_test_post_run(uts)); + ut_assertok(cyclic_uninit()); ut_assertok(event_uninit()); return 0; -- cgit v1.2.3