summaryrefslogtreecommitdiff
path: root/testsuites/unit/tc-score-kern-tc.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/unit/tc-score-kern-tc.c')
-rw-r--r--testsuites/unit/tc-score-kern-tc.c171
1 files changed, 5 insertions, 166 deletions
diff --git a/testsuites/unit/tc-score-kern-tc.c b/testsuites/unit/tc-score-kern-tc.c
index 03fe373759..5f9d0ad796 100644
--- a/testsuites/unit/tc-score-kern-tc.c
+++ b/testsuites/unit/tc-score-kern-tc.c
@@ -53,7 +53,6 @@
#endif
#include <rtems/score/timecounter.h>
-#include <rtems/score/todimpl.h>
#include <rtems/test.h>
@@ -65,174 +64,22 @@
*
* @brief Unit tests for the time counter kern_tc part.
*
- * Parts of the file ``cpukit/score/src/kern_tc.c`` are only executed by the
- * POSIX API and certain device driver code. The space qualified code subset
- * does not contain those features. This test exercises the code parts
- * otherwise not reached in order to achieve full code coverage.
+ * Parts of the file ``cpukit/score/src/kern_tc.c`` are only executed by
+ * certain device driver code. The space qualified code subset does not
+ * contain those features. This test exercises the code parts otherwise not
+ * reached in order to achieve full code coverage.
*
* This test case performs the following actions:
*
- * - Call function _Timecounter_Getbintime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Getbinuptime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Getboottime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Getboottimebin().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Getmicrotime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Getmicrouptime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Microuptime().
- *
- * - Check value returned by function call.
- *
- * - Call function _Timecounter_Nanotime().
- *
- * - Check value returned by function call.
- *
* - Call function _Timecounter_Tick_simple().
*
* @{
*/
/**
- * @brief Call function _Timecounter_Getbintime().
- */
-static void ScoreTimecounterUnitKernTc_Action_0( void )
-{
- struct bintime bt;
- _Timecounter_Getbintime( &bt );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( bt.sec, TOD_SECONDS_1970_THROUGH_1988 );
- T_eq_long( bt.frac, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Getbinuptime().
- */
-static void ScoreTimecounterUnitKernTc_Action_1( void )
-{
- struct bintime bt;
- _Timecounter_Getbinuptime( &bt );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( bt.sec, 1 );
- T_eq_long( bt.frac, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Getboottime().
- */
-static void ScoreTimecounterUnitKernTc_Action_2( void )
-{
- struct timeval tv;
- _Timecounter_Getboottime( &tv );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( tv.tv_sec, TOD_SECONDS_1970_THROUGH_1988 - 1 );
- T_eq_long( tv.tv_usec, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Getboottimebin().
- */
-static void ScoreTimecounterUnitKernTc_Action_3( void )
-{
- struct bintime bt;
- _Timecounter_Getboottimebin( &bt );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( bt.sec, TOD_SECONDS_1970_THROUGH_1988 - 1 );
- T_eq_long( bt.frac, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Getmicrotime().
- */
-static void ScoreTimecounterUnitKernTc_Action_4( void )
-{
- struct timeval tv;
- _Timecounter_Getmicrotime( &tv );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( tv.tv_sec, TOD_SECONDS_1970_THROUGH_1988 );
- T_eq_long( tv.tv_usec, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Getmicrouptime().
- */
-static void ScoreTimecounterUnitKernTc_Action_5( void )
-{
- struct timeval tv;
- _Timecounter_Getmicrouptime( &tv );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( tv.tv_sec, 1 );
- T_eq_long( tv.tv_usec, 0 );
-}
-
-/**
- * @brief Call function _Timecounter_Microuptime().
- */
-static void ScoreTimecounterUnitKernTc_Action_6( void )
-{
- struct timeval tv;
- _Timecounter_Microuptime( &tv );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( tv.tv_sec, 1 );
- /* T_eq_long( tv.tv_usec, 0 ); is increased by other sources */
-}
-
-/**
- * @brief Call function _Timecounter_Nanotime().
- */
-static void ScoreTimecounterUnitKernTc_Action_7( void )
-{
- struct timespec ts;
- _Timecounter_Nanotime( &ts );
-
- /*
- * Check value returned by function call.
- */
- T_eq_u64( ts.tv_sec, TOD_SECONDS_1970_THROUGH_1988 );
- /* T_eq_long( ts.tv_nsec, 0 ); is increased by other sources */
-}
-
-/**
* @brief Call function _Timecounter_Tick_simple().
*/
-static void ScoreTimecounterUnitKernTc_Action_8( void )
+static void ScoreTimecounterUnitKernTc_Action_0( void )
{
ISR_lock_Context lock_context;
_Timecounter_Acquire( &lock_context );
@@ -245,14 +92,6 @@ static void ScoreTimecounterUnitKernTc_Action_8( void )
T_TEST_CASE( ScoreTimecounterUnitKernTc )
{
ScoreTimecounterUnitKernTc_Action_0();
- ScoreTimecounterUnitKernTc_Action_1();
- ScoreTimecounterUnitKernTc_Action_2();
- ScoreTimecounterUnitKernTc_Action_3();
- ScoreTimecounterUnitKernTc_Action_4();
- ScoreTimecounterUnitKernTc_Action_5();
- ScoreTimecounterUnitKernTc_Action_6();
- ScoreTimecounterUnitKernTc_Action_7();
- ScoreTimecounterUnitKernTc_Action_8();
}
/** @} */