diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-05-05 16:45:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-05-05 16:45:57 +0000 |
commit | c0d7e23ce943acd34f20fca96540769ab1927ec9 (patch) | |
tree | b148b73f506d1bdb7b007fe71dc1903e6861631f /testsuites/sptests | |
parent | 2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-c0d7e23ce943acd34f20fca96540769ab1927ec9.tar.bz2 |
2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c,
sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c,
spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c,
spsimplesched02/init.c: Remove warnings.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/ChangeLog | 7 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen12.c | 47 | ||||
-rw-r--r-- | testsuites/sptests/sp09/sp09.scn | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp21/Makefile.am | 1 | ||||
-rw-r--r-- | testsuites/sptests/sp35/priinv.c | 24 | ||||
-rw-r--r-- | testsuites/sptests/sp39/init.c | 10 | ||||
-rw-r--r-- | testsuites/sptests/sp50/init.c | 8 | ||||
-rw-r--r-- | testsuites/sptests/sp57/init.c | 3 | ||||
-rw-r--r-- | testsuites/sptests/sp72/init.c | 4 | ||||
-rw-r--r-- | testsuites/sptests/sp73/init.c | 25 | ||||
-rw-r--r-- | testsuites/sptests/spintrcritical01/init.c | 4 | ||||
-rw-r--r-- | testsuites/sptests/spprivenv01/init.c | 17 | ||||
-rw-r--r-- | testsuites/sptests/spsimplesched01/init.c | 38 | ||||
-rw-r--r-- | testsuites/sptests/spsimplesched02/init.c | 6 |
14 files changed, 108 insertions, 88 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 214a11633f..5052c35601 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,10 @@ +2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> + + * sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c, + sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c, + spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c, + spsimplesched02/init.c: Remove warnings. + 2011-04-15 Sebastian Huber <sebastian.huber@embedded-brains.de> * sp09/screen02.c: Use integer value that fits into one character. diff --git a/testsuites/sptests/sp09/screen12.c b/testsuites/sptests/sp09/screen12.c index aecb0624fe..b838a1c9ea 100644 --- a/testsuites/sptests/sp09/screen12.c +++ b/testsuites/sptests/sp09/screen12.c @@ -6,7 +6,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -27,9 +27,6 @@ void Screen12() void *segment_address_1; void *segment_address_2; void *segment_address_3; - uint32_t good_back_flag; - uint32_t good_front_flag; - uint32_t offset; uintptr_t segment_size; rtems_status_code status; Heap_Information_block the_info; @@ -400,48 +397,6 @@ void Screen12() puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" ); rtems_debug_disable( RTEMS_DEBUG_REGION ); -#if 0 - - offset = (segment_address_1 - (void *)Region_good_area) / 4; - -/* bad FRONT_FLAG error */ - - good_front_flag = Region_good_area[ offset - 1 ]; - Region_good_area[ offset - 1 ] = good_front_flag + 2; - - status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 ); - fatal_directive_status( - status, - RTEMS_INVALID_ADDRESS, - "rtems_region_return_segment with back_flag != front_flag" - ); - puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" ); - - Region_good_area[ offset - 1 ] = good_front_flag; - -/* bad FRONT_FLAG error */ - - good_back_flag = Region_good_area[ offset - 2 ]; - Region_good_area[ offset - 2 ] = 1024; - - status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 ); - fatal_directive_status( - status, - RTEMS_INVALID_ADDRESS, - "rtems_region_return_segment with back_flag != front_flag" - ); - puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" ); - - Region_good_area[ offset - 2 ] = good_back_flag; - -#else - offset = 0; - good_front_flag = 0; - good_back_flag = 0; - puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" ); - puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" ); -#endif - puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" ); rtems_debug_enable( RTEMS_DEBUG_REGION ); diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn index 1deb986f54..896b9b0b2a 100644 --- a/testsuites/sptests/sp09/sp09.scn +++ b/testsuites/sptests/sp09/sp09.scn @@ -273,8 +273,6 @@ TA1 - rtems_region_resize_segment - RTEMS_INVALID_ID TA1 - rtems_region_return_segment - RTEMS_INVALID_ID TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION -TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED -TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION TA1 - rtems_region_extend - RTEMS_INVALID_ID TA1 - rtems_region_extend - within heap - RTEMS_INVALID_ADDRESS diff --git a/testsuites/sptests/sp21/Makefile.am b/testsuites/sptests/sp21/Makefile.am index 1b01adb9dc..0be351a9dd 100644 --- a/testsuites/sptests/sp21/Makefile.am +++ b/testsuites/sptests/sp21/Makefile.am @@ -13,6 +13,7 @@ include $(top_srcdir)/../automake/compile.am include $(top_srcdir)/../automake/leaf.am AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -Wno-deprecated-declarations LINK_OBJS = $(sp21_OBJECTS) $(sp21_LDADD) LINK_LIBS = $(sp21_LDLIBS) diff --git a/testsuites/sptests/sp35/priinv.c b/testsuites/sptests/sp35/priinv.c index 46818313f6..c0d9310eb8 100644 --- a/testsuites/sptests/sp35/priinv.c +++ b/testsuites/sptests/sp35/priinv.c @@ -243,17 +243,20 @@ void AccessLocalHw(void) { rtems_status_code Sts; - rtems_task_priority EnterPrio; /* Statistics log */ +#if defined(TEST_PRINT_STATISTICS) rtems_task_priority AccessPrio; /* : */ - rtems_task_priority LeavePrio; /* : */ - uint32_t EnterCnt; /* : */ uint32_t AccessCnt; /* : */ + rtems_task_priority EnterPrio; /* Statistics log */ + uint32_t EnterCnt; /* : */ + rtems_task_priority LeavePrio; /* : */ uint32_t LeaveCnt; /* : */ +#endif +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ EnterPrio = _Thread_Executing->current_priority; EnterCnt = _Thread_Executing->resource_count; - +#endif printf(" AccessLocalHw called by %s\n", CallerName()); @@ -269,18 +272,20 @@ void AccessLocalHw(void) Sts = rtems_semaphore_obtain(LocalHwSync_S, RTEMS_WAIT, RTEMS_NO_TIMEOUT); directive_failed( Sts, "rtems_semaphore_obtain(LocalHwAccess_R...)" ); +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ AccessPrio = _Thread_Executing->current_priority; AccessCnt = _Thread_Executing->resource_count; +#endif Sts = rtems_semaphore_release(LocalHwAccess_R); directive_failed( Sts, "rtems_semaphore_release(LocalHwAccess_R)" ); +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ LeavePrio = _Thread_Executing->current_priority; LeaveCnt = _Thread_Executing->resource_count; -#if defined(TEST_PRINT_STATISTICS) printf( " AccessLocalHw from %s statistics:\n" " - Prio: %d -> %d -> %d\n - Cnt: %d -> %d -> %d\n", @@ -304,17 +309,20 @@ void AccessRemoteHw(void) { rtems_status_code Sts; +#if defined(TEST_PRINT_STATISTICS) rtems_task_priority EnterPrio; /* Statistics log */ rtems_task_priority AccessPrio; /* : */ rtems_task_priority LeavePrio; /* : */ uint32_t EnterCnt; /* : */ uint32_t AccessCnt; /* : */ uint32_t LeaveCnt; /* : */ +#endif +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ EnterPrio = _Thread_Executing->current_priority; EnterCnt = _Thread_Executing->resource_count; - +#endif printf("AccessRemoteHw called by %s\n", CallerName()); @@ -329,18 +337,20 @@ void AccessRemoteHw(void) printf("AccessRemoteHw access local %s\n", CallerName()); AccessLocalHw(); +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ AccessPrio = _Thread_Executing->current_priority; AccessCnt = _Thread_Executing->resource_count; +#endif Sts = rtems_semaphore_release(RemoteHwAccess_R); directive_failed( Sts, "rtems_semaphore_release(RemoreHwAccess_R" ); +#if defined(TEST_PRINT_STATISTICS) /* Store information about the current situation */ LeavePrio = _Thread_Executing->current_priority; LeaveCnt = _Thread_Executing->resource_count; -#if defined(TEST_PRINT_STATISTICS) printf( "\nAccessRemoteHw from %s statistics:\n" " - Prio: %d -> %d -> %d\n - Cnt: %d -> %d -> %d\n", diff --git a/testsuites/sptests/sp39/init.c b/testsuites/sptests/sp39/init.c index 482ee8e6b8..81dcd4f315 100644 --- a/testsuites/sptests/sp39/init.c +++ b/testsuites/sptests/sp39/init.c @@ -1,7 +1,7 @@ /* * Classic API Signal to Task from ISR * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -44,17 +44,20 @@ rtems_timer_service_routine test_event_from_isr( * This event send hits the critical section but sends to * another task so doesn't impact this critical section. */ - rtems_event_send( other_task, 0x02 ); + status = rtems_event_send( other_task, 0x02 ); + directive_failed( status, "event send" ); /* * This event send hits the main task but doesn't satisfy * it's blocking condition so it will still block */ - rtems_event_send( main_task, 0x02 ); + status = rtems_event_send( main_task, 0x02 ); + directive_failed( status, "event send" ); case_hit = TRUE; } status = rtems_event_send( main_task, 0x01 ); + directive_failed( status, "event send" ); } rtems_timer_service_routine test_event_with_timeout_from_isr( @@ -72,6 +75,7 @@ rtems_timer_service_routine test_event_with_timeout_from_isr( case_hit = TRUE; } status = rtems_event_send( main_task, 0x01 ); + directive_failed( status, "event send" ); } rtems_task Init( diff --git a/testsuites/sptests/sp50/init.c b/testsuites/sptests/sp50/init.c index 161fe1fe4e..2eb5599dc0 100644 --- a/testsuites/sptests/sp50/init.c +++ b/testsuites/sptests/sp50/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -20,17 +20,19 @@ volatile bool timerRan; rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored ) { - rtems_status_code sc; + rtems_status_code status; Fired++; timerRan = true; - sc = rtems_timer_server_fire_after( + status = rtems_timer_server_fire_after( id, rtems_clock_get_ticks_per_second(), Timer_Routine, NULL ); + directive_failed( status, "fire after" ); + } rtems_task Init( diff --git a/testsuites/sptests/sp57/init.c b/testsuites/sptests/sp57/init.c index 3938d1b439..9566eff73b 100644 --- a/testsuites/sptests/sp57/init.c +++ b/testsuites/sptests/sp57/init.c @@ -1,6 +1,6 @@ /* Restart a task which is delaying * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -24,6 +24,7 @@ rtems_task Delay_task( puts( "Delay - rtems_task_wake_after - OK" ); status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(2000) ); + directive_failed( status, "wake after" ); puts( "ERROR - delay task woke up!!" ); rtems_test_exit(0); diff --git a/testsuites/sptests/sp72/init.c b/testsuites/sptests/sp72/init.c index fe41e92194..ad053ea094 100644 --- a/testsuites/sptests/sp72/init.c +++ b/testsuites/sptests/sp72/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -30,6 +30,8 @@ rtems_task Test_task( RTEMS_DEFAULT_OPTIONS, rtems_clock_get_ticks_per_second() * 10 ); + directive_failed( status, "obtain" ); + } rtems_task Init( diff --git a/testsuites/sptests/sp73/init.c b/testsuites/sptests/sp73/init.c index a4622396e3..20dfddc2da 100644 --- a/testsuites/sptests/sp73/init.c +++ b/testsuites/sptests/sp73/init.c @@ -31,6 +31,8 @@ rtems_task Test_task( task_index = arg; for ( ; ; ) { status = rtems_clock_get_tod( &time ); + directive_failed( status, "get tod" ); + if ( time.second >= 15 ) { puts( "*** END OF SP73 (YIELD) TEST ***" ); rtems_test_exit( 0 ); @@ -38,11 +40,12 @@ rtems_task Test_task( put_name( Task_name[ task_index ], FALSE ); print_time( " - rtems_clock_get_tod - ", &time, "\n" ); status = rtems_task_wake_after( - task_index * 5 * rtems_clock_get_ticks_per_second() ); + task_index * 5 * rtems_clock_get_ticks_per_second() + ); + directive_failed( status, "wake after" ); } } - rtems_task Init( rtems_task_argument argument ) @@ -71,25 +74,39 @@ rtems_task Init( Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ] ); + directive_failed( status, "create 1" ); + status = rtems_task_create( Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] ); + directive_failed( status, "create 2" ); + status = rtems_task_create( Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] ); + directive_failed( status, "create 3" ); status = rtems_task_start( Task_id[ 1 ], Test_task, 1 ); + directive_failed( status, "start 1" ); rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_start( Task_id[ 2 ], Test_task, 2 ); + directive_failed( status, "start 2" ); rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_start( Task_id[ 3 ], Test_task, 3 ); + directive_failed( status, "start 3" ); - rtems_task_set_priority(Task_id[1], 1, &old); - rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_set_priority(Task_id[1], 1, &old); + directive_failed( status, "set priority" ); + + status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + directive_failed( status, "wake after" ); status = rtems_task_delete( RTEMS_SELF ); + directive_failed( status, "delete" ); } /* configuration information */ diff --git a/testsuites/sptests/spintrcritical01/init.c b/testsuites/sptests/spintrcritical01/init.c index d046702c5f..7f2de2677b 100644 --- a/testsuites/sptests/spintrcritical01/init.c +++ b/testsuites/sptests/spintrcritical01/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -82,7 +82,9 @@ rtems_timer_service_routine test_release_from_isr( if ( getState() == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { case_hit = true; } + status = rtems_semaphore_release( Semaphore ); + directive_failed( status, "release" ); } diff --git a/testsuites/sptests/spprivenv01/init.c b/testsuites/sptests/spprivenv01/init.c index ed6270d692..3bd6958d2b 100644 --- a/testsuites/sptests/spprivenv01/init.c +++ b/testsuites/sptests/spprivenv01/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -20,11 +20,12 @@ rtems_task task_routine( rtems_task_argument not_used ) { - int sc = 0; + rtems_status_code sc; puts( "task_routine - setting up a private environment" ); sc = rtems_libio_set_private_env(); + directive_failed( sc, "set private env" ); sleep( 1 ); rtems_task_delete( RTEMS_SELF ); @@ -34,12 +35,12 @@ rtems_task Init( rtems_task_argument argument ) { - int sc = 0; - bool status = 0; - void *alloc_ptr = (void *)0; - rtems_id current_task_id; - rtems_id task_id; - rtems_name another_task_name; + rtems_status_code sc; + bool status; + void *alloc_ptr; + rtems_id current_task_id; + rtems_id task_id; + rtems_name another_task_name; Heap_Information_block Info; puts( "\n\n*** TEST USER ENVIRONMENT ROUTINE - 01 ***" ); diff --git a/testsuites/sptests/spsimplesched01/init.c b/testsuites/sptests/spsimplesched01/init.c index 95eaaa2b1a..3a05c37a34 100644 --- a/testsuites/sptests/spsimplesched01/init.c +++ b/testsuites/sptests/spsimplesched01/init.c @@ -25,15 +25,18 @@ rtems_task Test_task( rtems_task_argument unused ) { - rtems_id tid; - rtems_time_of_day time; - uint32_t task_index; - rtems_status_code status; + rtems_id tid; + rtems_time_of_day time; + uint32_t task_index; + rtems_status_code status; status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); + directive_failed( status, "task ident" ); + task_index = task_number( tid ); for ( ; ; ) { status = rtems_clock_get_tod( &time ); + directive_failed( status, "clock get tod" ); if ( time.second >= 35 ) { puts( "*** END OF SIMPLE01 TEST ***" ); rtems_test_exit( 0 ); @@ -41,7 +44,9 @@ rtems_task Test_task( put_name( Task_name[ task_index ], FALSE ); print_time( " - rtems_clock_get_tod - ", &time, "\n" ); status = rtems_task_wake_after( - task_index * 5 * rtems_clock_get_ticks_per_second() ); + task_index * 5 * rtems_clock_get_ticks_per_second() + ); + directive_failed( status, "wake after" ); } } @@ -73,28 +78,43 @@ rtems_task Init( Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ] ); + directive_failed( status, "create 1" ); + status = rtems_task_create( Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] ); + directive_failed( status, "create 2" ); + status = rtems_task_create( Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] ); + directive_failed( status, "create 3" ); status = rtems_task_start( Task_id[ 1 ], Test_task, 1 ); + directive_failed( status, "start 1" ); rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_start( Task_id[ 2 ], Test_task, 2 ); + directive_failed( status, "start 2" ); rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_start( Task_id[ 3 ], Test_task, 3 ); + directive_failed( status, "start 3" ); - rtems_task_set_priority(Task_id[1], 2, &old); - rtems_task_set_priority(Task_id[2], 2, &old); - rtems_task_set_priority(Task_id[3], 2, &old); + status = rtems_task_set_priority( Task_id[1], 2, &old ); + directive_failed( status, "set priority 1" ); + status = rtems_task_set_priority( Task_id[2], 2, &old ); + directive_failed( status, "set priority 2" ); + status = rtems_task_set_priority( Task_id[3], 2, &old ); + directive_failed( status, "set priority 3" ); - rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + directive_failed( status, "yield" ); status = rtems_task_delete( RTEMS_SELF ); + directive_failed( status, "delete self" ); } /* configuration information */ diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c index 381d4ca229..c6f3fbb0bd 100644 --- a/testsuites/sptests/spsimplesched02/init.c +++ b/testsuites/sptests/spsimplesched02/init.c @@ -28,14 +28,14 @@ rtems_task Test_task( ) { rtems_id tid; - uint32_t task_index; rtems_status_code status; status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - task_index = task_number( tid ); + directive_failed( status, "wake after" ); for ( ; ; ) { - rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + directive_failed( status, "yield" ); } } |