/* * Copyright (c) 2026 Apidae Systems * * SPDX-License-Identifier: Apache-2.0 */ #include #include #include LOG_MODULE_REGISTER(kernel, LOG_LEVEL_INF); ZTEST_SUITE(kernel, NULL, NULL, NULL, NULL, NULL); ZTEST(kernel, test_uptime_advances) { int64_t t0 = k_uptime_get(); k_sleep(K_MSEC(50)); int64_t t1 = k_uptime_get(); zassert_true(t1 > t0, "uptime did not advance: t0=%lld t1=%lld", t0, t1); zassert_true((t1 - t0) >= 40, "delta %lld ms is implausibly short", (t1 - t0)); } ZTEST(kernel, test_log_subsystem_alive) { LOG_INF("kernel test ran at uptime=%lld ms", k_uptime_get()); } ZTEST(kernel, test_constants_make_sense) { zassert_true(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC > 0, "SYS_CLOCK_HW_CYCLES_PER_SEC=%d", CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC); zassert_true(CONFIG_SYS_CLOCK_TICKS_PER_SEC > 0, "SYS_CLOCK_TICKS_PER_SEC=%d", CONFIG_SYS_CLOCK_TICKS_PER_SEC); }