1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2022 Stefan Roese <sr@denx.de>
9 #include <test/common.h>
10 #include <test/test.h>
13 #include <linux/delay.h>
15 /* Test that cyclic function is called */
16 static bool cyclic_active = false;
18 static void cyclic_test(void *ctx)
23 static int dm_test_cyclic_running(struct unit_test_state *uts)
25 cyclic_active = false;
26 ut_assertnonnull(cyclic_register(cyclic_test, 10 * 1000, "cyclic_demo",
29 /* Execute all registered cyclic functions */
31 ut_asserteq(true, cyclic_active);
35 COMMON_TEST(dm_test_cyclic_running, 0);