From 7d02645fe4c07efe253f68d2d6134922e7c5323e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 4 Mar 2022 08:43:01 -0700 Subject: event: Add a simple test Add a test for event registration and activation. Signed-off-by: Simon Glass --- test/test-main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/test-main.c') diff --git a/test/test-main.c b/test/test-main.c index 8fcb02e..ee38d1f 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -218,6 +219,8 @@ 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()); + if (test->flags & UT_TESTF_DM) ut_assertok(dm_test_pre_run(uts)); @@ -260,6 +263,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(event_uninit()); return 0; } -- cgit v1.1