diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 21:42:36 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-19 21:42:36 +0000 |
commit | 897aa5582ad3d01b577d1f0e1f956922fa09371a (patch) | |
tree | 8185bde48c83949de3780a2dcc05aab55458825f /testsuites/sptests/spwatchdog | |
parent | 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-897aa5582ad3d01b577d1f0e1f956922fa09371a.tar.bz2 |
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* spwatchdog/spwatchdog.scn, spwatchdog/task1.c: Add test for
_Watchdog_Report() when name is not NULL. This case was covered at
-Os on erc32 but at -O2 we had more code.
Diffstat (limited to 'testsuites/sptests/spwatchdog')
-rw-r--r-- | testsuites/sptests/spwatchdog/spwatchdog.scn | 20 | ||||
-rw-r--r-- | testsuites/sptests/spwatchdog/task1.c | 93 |
2 files changed, 22 insertions, 91 deletions
diff --git a/testsuites/sptests/spwatchdog/spwatchdog.scn b/testsuites/sptests/spwatchdog/spwatchdog.scn index 3135c45c0f..622e99e8d2 100644 --- a/testsuites/sptests/spwatchdog/spwatchdog.scn +++ b/testsuites/sptests/spwatchdog/spwatchdog.scn @@ -1,7 +1,7 @@ *** RTEMS WATCHDOG *** INIT - report on empty watchdog chain -Watchdog Chain: Empty Chain 2036184 -Chain is empty +Watchdog Chain: Empty Chain 203753 +Chain is empt INIT - rtems_timer_create - creating timer 1 INIT - timer 1 has id (0x12010001) TA1 - rtems_timer_ident - identing timer 1 @@ -14,9 +14,17 @@ TA1 - rtems_timer_fire_after - timer 1 in 3 seconds TA1 - rtems_task_wake_after - 1 second TA1 - rtems_clock_get_tod - 09:00:04 12/31/1988 TA1 - rtems_timer_reset - timer 1 -Watchdog Chain: _Watchdog_Ticks_chain 202F530 - 300 300 20325D0 20131A0 0x12010001 0 -== end of _Watchdog_Ticks_chain +TA1 - _Watchdog_Report_chain - with name +Watchdog Chain: _Watchdog_Ticks_chain 2030F1 + 300 300 2033B40 201391C 0x12010001 +== end of _Watchdog_Ticks_chain +TA1 - _Watchdog_Report_chain - no name +Watchdog Chain: 2030F1 + 300 300 2033B40 201391C 0x12010001 +== end of +TA1 - _Watchdog_Report - with name +first 300 300 2033B40 201391C 0x12010001 +TA1 - _Watchdog_Report - no name + 299 300 2033B40 201391C 0x12010001 TA1 - timer_deleting - timer 1 *** END OF RTEMS WATCHDOG PROGRAM *** - diff --git a/testsuites/sptests/spwatchdog/task1.c b/testsuites/sptests/spwatchdog/task1.c index 3e2902380e..968e2ec61b 100644 --- a/testsuites/sptests/spwatchdog/task1.c +++ b/testsuites/sptests/spwatchdog/task1.c @@ -74,94 +74,17 @@ rtems_task Task_1( status = rtems_timer_reset( tmid ); directive_failed( status, "rtems_timer_reset" ); + puts( "TA1 - _Watchdog_Report_chain - with name" ); + _Watchdog_Report_chain( "_Watchdog_Ticks_chain", & _Watchdog_Ticks_chain ); + puts( "TA1 - _Watchdog_Report_chain - no name" ); + _Watchdog_Report_chain( NULL, & _Watchdog_Ticks_chain); + puts( "TA1 - _Watchdog_Report - with name" ); + _Watchdog_Report("first", (Watchdog_Control *)(_Watchdog_Ticks_chain.first)); -#if 0 - puts( "TA1 - rtems_task_suspend( RTEMS_SELF )" ); - status = rtems_task_suspend( RTEMS_SELF ); - directive_failed( status, "rtems_task_suspend" ); - - Print_time(); - - rtems_test_pause(); - - /* - * Reset the time since we do not know how long the user waited - * before pressing <cr> at the pause. This insures that the - * actual output matches the screen. - */ - - build_time( &time, 12, 31, 1988, 9, 0, 7, 0 ); - - status = rtems_clock_set( &time ); - directive_failed( status, "rtems_clock_set" ); - -/* after which is canceled */ - - puts( "TA1 - rtems_timer_fire_after - timer 1 in 3 seconds" ); - status = rtems_timer_fire_after( - tmid, - 3 * rtems_clock_get_ticks_per_second(), - Delayed_resume, - NULL - ); - directive_failed( status, "rtems_timer_fire_after" ); - - puts( "TA1 - rtems_timer_cancel - timer 1" ); - status = rtems_timer_cancel( tmid ); - directive_failed( status, "rtems_timer_cancel" ); - -/* when which is allowed to fire */ - - Print_time(); - - status = rtems_clock_get_tod( &time ); - directive_failed( status, "rtems_clock_get_tod" ); - - time.second += 3; - - puts( "TA1 - rtems_timer_fire_when - timer 1 in 3 seconds" ); - status = rtems_timer_fire_when( tmid, &time, Delayed_resume, NULL ); - directive_failed( status, "rtems_timer_fire_when" ); - - puts( "TA1 - rtems_task_suspend( RTEMS_SELF )" ); - status = rtems_task_suspend( RTEMS_SELF ); - directive_failed( status, "rtems_task_suspend" ); - - Print_time(); - -/* when which is canceled */ - - status = rtems_clock_get_tod( &time ); - directive_failed( status, "rtems_clock_get_tod" ); - - time.second += 3; - - puts( "TA1 - rtems_timer_fire_when - timer 1 in 3 seconds" ); - status = rtems_timer_fire_when( tmid, &time, Delayed_resume, NULL ); - directive_failed( status, "rtems_timer_fire_when" ); - - puts( "TA1 - rtems_task_wake_after - 1 second" ); - status = rtems_task_wake_after( 1 * rtems_clock_get_ticks_per_second() ); - directive_failed( status, "rtems_task_wake_after" ); - - Print_time(); - - puts( "TA1 - rtems_timer_cancel - timer 1" ); - status = rtems_timer_cancel( tmid ); - directive_failed( status, "rtems_timer_cancel" ); - -/* delete */ - puts( "TA1 - rtems_task_wake_after - YIELD (only task at priority)" ); - status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); - directive_failed( status, "rtems_task_wake_after" ); -#endif - - _Watchdog_Report_chain( - "_Watchdog_Ticks_chain", - & _Watchdog_Ticks_chain - ); + puts( "TA1 - _Watchdog_Report - no name" ); + _Watchdog_Report( NULL, (Watchdog_Control *)(_Watchdog_Ticks_chain.first) ); puts( "TA1 - timer_deleting - timer 1" ); status = rtems_timer_delete( tmid ); |