TC: Expand tc for kernel/clock module API's
1) Adds failure tc: invalid 'clk_id' as input to clock_getres() API.
2) Adds failure tc: invalid input to gettimeofday() API.
@@ -64,6 +64,9 @@ static void tc_clock_clock_getres(void)
TC_ASSERT_EQ("clock_getres", st_res.tv_sec, 0);
TC_ASSERT_EQ("clock_getres", st_res.tv_nsec, NSEC_PER_TICK);
+ ret_chk = clock_getres(33 , &st_res);
+ TC_ASSERT_EQ("clock_getres", ret_chk, ERROR);
+
TC_SUCCESS_RESULT();
}
@@ -135,6 +138,10 @@ static void tc_clock_clock_gettimeofday(void)
if (tv2.tv_sec == tv1.tv_sec + SEC_2) {
TC_ASSERT_GEQ("gettimeofday", tv2.tv_usec, tv1.tv_usec);
}
+#ifdef CONFIG_DEBUG
+ ret_chk = gettimeofday(NULL, NULL);
+ TC_ASSERT_EQ("gettimeofday", ret_chk, ERROR);
+#endif
TC_SUCCESS_RESULT();
}
