Changeset c0d7e23 in rtems


Ignore:
Timestamp:
May 5, 2011, 4:45:57 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
3f42f12c
Parents:
ff7ff62
Message:

2011-05-05 Joel Sherrill <joel.sherrill@…>

  • 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.
Location:
testsuites/sptests
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rff7ff62 rc0d7e23  
     12011-05-05      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sp09/screen12.c, sp09/sp09.scn, sp21/Makefile.am, sp35/priinv.c,
     4        sp39/init.c, sp50/init.c, sp57/init.c, sp72/init.c, sp73/init.c,
     5        spintrcritical01/init.c, spprivenv01/init.c, spsimplesched01/init.c,
     6        spsimplesched02/init.c: Remove warnings.
     7
    182011-04-15      Sebastian Huber <sebastian.huber@embedded-brains.de>
    29
  • testsuites/sptests/sp09/screen12.c

    rff7ff62 rc0d7e23  
    77 *  Output parameters:  NONE
    88 *
    9  *  COPYRIGHT (c) 1989-2009.
     9 *  COPYRIGHT (c) 1989-2011.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    2828  void                   *segment_address_2;
    2929  void                   *segment_address_3;
    30   uint32_t                good_back_flag;
    31   uint32_t                good_front_flag;
    32   uint32_t                offset;
    3330  uintptr_t               segment_size;
    3431  rtems_status_code       status;
     
    401398  rtems_debug_disable( RTEMS_DEBUG_REGION );
    402399
    403 #if 0
    404 
    405   offset = (segment_address_1 - (void *)Region_good_area) / 4;
    406 
    407 /* bad FRONT_FLAG error */
    408 
    409   good_front_flag = Region_good_area[ offset - 1 ];
    410   Region_good_area[ offset - 1 ] = good_front_flag + 2;
    411 
    412   status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
    413   fatal_directive_status(
    414     status,
    415     RTEMS_INVALID_ADDRESS,
    416     "rtems_region_return_segment with back_flag != front_flag"
    417   );
    418   puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
    419 
    420   Region_good_area[ offset - 1 ] = good_front_flag;
    421 
    422 /* bad FRONT_FLAG error */
    423 
    424   good_back_flag = Region_good_area[ offset - 2 ];
    425   Region_good_area[ offset - 2 ] = 1024;
    426 
    427   status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
    428   fatal_directive_status(
    429     status,
    430     RTEMS_INVALID_ADDRESS,
    431     "rtems_region_return_segment with back_flag != front_flag"
    432   );
    433   puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
    434 
    435   Region_good_area[ offset - 2 ] = good_back_flag;
    436 
    437 #else
    438   offset = 0;
    439   good_front_flag = 0;
    440   good_back_flag = 0;
    441   puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
    442   puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
    443 #endif
    444 
    445400  puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
    446401  rtems_debug_enable( RTEMS_DEBUG_REGION );
  • testsuites/sptests/sp09/sp09.scn

    rff7ff62 rc0d7e23  
    274274TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS
    275275TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION
    276 TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
    277 TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
    278276TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION
    279277TA1 - rtems_region_extend - RTEMS_INVALID_ID
  • testsuites/sptests/sp21/Makefile.am

    rff7ff62 rc0d7e23  
    1414
    1515AM_CPPFLAGS += -I$(top_srcdir)/../support/include
     16AM_CPPFLAGS += -Wno-deprecated-declarations
    1617
    1718LINK_OBJS = $(sp21_OBJECTS) $(sp21_LDADD)
  • testsuites/sptests/sp35/priinv.c

    rff7ff62 rc0d7e23  
    244244  rtems_status_code     Sts;
    245245
     246#if defined(TEST_PRINT_STATISTICS)
     247  rtems_task_priority   AccessPrio;  /*      :         */
     248  uint32_t              AccessCnt;   /*      :         */
    246249  rtems_task_priority   EnterPrio;   /* Statistics log */
    247   rtems_task_priority   AccessPrio;  /*      :         */
     250  uint32_t              EnterCnt;    /*      :         */
    248251  rtems_task_priority   LeavePrio;   /*      :         */
    249   uint32_t              EnterCnt;    /*      :         */
    250   uint32_t              AccessCnt;   /*      :         */
    251252  uint32_t              LeaveCnt;    /*      :         */
    252 
     253#endif
     254
     255#if defined(TEST_PRINT_STATISTICS)
    253256  /* Store information about the current situation */
    254257  EnterPrio = _Thread_Executing->current_priority;
    255258  EnterCnt  = _Thread_Executing->resource_count;
    256 
     259#endif
    257260
    258261  printf("  AccessLocalHw called by %s\n", CallerName());
     
    270273  directive_failed( Sts, "rtems_semaphore_obtain(LocalHwAccess_R...)" );
    271274
     275#if defined(TEST_PRINT_STATISTICS)
    272276  /* Store information about the current situation */
    273277  AccessPrio = _Thread_Executing->current_priority;
    274278  AccessCnt  = _Thread_Executing->resource_count;
     279#endif
    275280
    276281  Sts = rtems_semaphore_release(LocalHwAccess_R);
    277282  directive_failed( Sts, "rtems_semaphore_release(LocalHwAccess_R)" );
    278283
     284#if defined(TEST_PRINT_STATISTICS)
    279285  /* Store information about the current situation */
    280286  LeavePrio = _Thread_Executing->current_priority;
    281287  LeaveCnt  = _Thread_Executing->resource_count;
    282288
    283 #if defined(TEST_PRINT_STATISTICS)
    284289  printf(
    285290    "  AccessLocalHw from %s statistics:\n"
     
    305310  rtems_status_code     Sts;
    306311
     312#if defined(TEST_PRINT_STATISTICS)
    307313  rtems_task_priority   EnterPrio;   /* Statistics log */
    308314  rtems_task_priority   AccessPrio;  /*      :         */
     
    311317  uint32_t              AccessCnt;   /*      :         */
    312318  uint32_t              LeaveCnt;    /*      :         */
    313 
     319#endif
     320
     321#if defined(TEST_PRINT_STATISTICS)
    314322  /* Store information about the current situation */
    315323  EnterPrio = _Thread_Executing->current_priority;
    316324  EnterCnt  = _Thread_Executing->resource_count;
    317 
     325#endif
    318326
    319327  printf("AccessRemoteHw called by %s\n", CallerName());
     
    330338  AccessLocalHw();
    331339
     340#if defined(TEST_PRINT_STATISTICS)
    332341  /* Store information about the current situation */
    333342  AccessPrio = _Thread_Executing->current_priority;
    334343  AccessCnt  = _Thread_Executing->resource_count;
     344#endif
    335345
    336346  Sts = rtems_semaphore_release(RemoteHwAccess_R);
    337347  directive_failed( Sts, "rtems_semaphore_release(RemoreHwAccess_R" );
    338348
     349#if defined(TEST_PRINT_STATISTICS)
    339350  /* Store information about the current situation */
    340351  LeavePrio = _Thread_Executing->current_priority;
    341352  LeaveCnt  = _Thread_Executing->resource_count;
    342353
    343 #if defined(TEST_PRINT_STATISTICS)
    344354  printf(
    345355    "\nAccessRemoteHw from %s statistics:\n"
  • testsuites/sptests/sp39/init.c

    rff7ff62 rc0d7e23  
    22 *  Classic API Signal to Task from ISR
    33 *
    4  *  COPYRIGHT (c) 1989-2009.
     4 *  COPYRIGHT (c) 1989-2011.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    4545     *  another task so doesn't impact this critical section.
    4646     */
    47     rtems_event_send( other_task, 0x02 );
     47    status = rtems_event_send( other_task, 0x02 );
     48    directive_failed( status, "event send" );
    4849
    4950    /*
     
    5152     *  it's blocking condition so it will still block
    5253     */
    53     rtems_event_send( main_task, 0x02 );
     54    status = rtems_event_send( main_task, 0x02 );
     55    directive_failed( status, "event send" );
    5456
    5557    case_hit = TRUE;
    5658  }
    5759  status = rtems_event_send( main_task, 0x01 );
     60  directive_failed( status, "event send" );
    5861}
    5962
     
    7376  }
    7477  status = rtems_event_send( main_task, 0x01 );
     78  directive_failed( status, "event send" );
    7579}
    7680
  • testsuites/sptests/sp50/init.c

    rff7ff62 rc0d7e23  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2011.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2121rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored )
    2222{
    23   rtems_status_code sc;
     23  rtems_status_code status;
    2424
    2525  Fired++;
    2626  timerRan = true;
    2727
    28   sc = rtems_timer_server_fire_after(
     28  status = rtems_timer_server_fire_after(
    2929    id,
    3030    rtems_clock_get_ticks_per_second(),
     
    3232    NULL
    3333  );
     34  directive_failed( status, "fire after" );
     35
    3436}
    3537
  • testsuites/sptests/sp57/init.c

    rff7ff62 rc0d7e23  
    11/*  Restart a task which is delaying
    22 *
    3  *  COPYRIGHT (c) 1989-2009.
     3 *  COPYRIGHT (c) 1989-2011.
    44 *  On-Line Applications Research Corporation (OAR).
    55 *
     
    2525  puts( "Delay - rtems_task_wake_after - OK" );
    2626  status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(2000) );
     27  directive_failed( status, "wake after" );
    2728
    2829  puts( "ERROR - delay task woke up!!" );
  • testsuites/sptests/sp72/init.c

    rff7ff62 rc0d7e23  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2011.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    3131    rtems_clock_get_ticks_per_second() * 10
    3232  );
     33  directive_failed( status, "obtain" );
     34
    3335}
    3436
  • testsuites/sptests/sp73/init.c

    rff7ff62 rc0d7e23  
    3232  for ( ; ; ) {
    3333    status = rtems_clock_get_tod( &time );
     34    directive_failed( status, "get tod" );
     35
    3436    if ( time.second >= 15 ) {
    3537      puts( "*** END OF SP73 (YIELD) TEST ***" );
     
    3941    print_time( " - rtems_clock_get_tod - ", &time, "\n" );
    4042    status = rtems_task_wake_after(
    41       task_index * 5 * rtems_clock_get_ticks_per_second() );
     43      task_index * 5 * rtems_clock_get_ticks_per_second()
     44    );
     45    directive_failed( status, "wake after" );
    4246  }
    4347}
    44 
    4548
    4649rtems_task Init(
     
    7275    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
    7376  );
     77  directive_failed( status, "create 1" );
     78
    7479  status = rtems_task_create(
    7580    Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
    7681    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
    7782  );
     83  directive_failed( status, "create 2" );
     84
    7885  status = rtems_task_create(
    7986    Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
    8087    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
    8188  );
     89  directive_failed( status, "create 3" );
    8290
    8391  status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
    84   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    85   status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
    86   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    87   status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
    88 
    89   rtems_task_set_priority(Task_id[1], 1, &old);
     92  directive_failed( status, "start 1" );
    9093  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    9194
     95  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
     96  directive_failed( status, "start 2" );
     97  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     98
     99  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
     100  directive_failed( status, "start 3" );
     101
     102  status = rtems_task_set_priority(Task_id[1], 1, &old);
     103  directive_failed( status, "set priority" );
     104
     105  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     106  directive_failed( status, "wake after" );
     107
    92108  status = rtems_task_delete( RTEMS_SELF );
     109  directive_failed( status, "delete" );
    93110}
    94111
  • testsuites/sptests/spintrcritical01/init.c

    rff7ff62 rc0d7e23  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2011.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    8383    case_hit = true;
    8484  }
     85
    8586  status = rtems_semaphore_release( Semaphore );
     87  directive_failed( status, "release" );
    8688}
    8789
  • testsuites/sptests/spprivenv01/init.c

    rff7ff62 rc0d7e23  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2011.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2121rtems_task task_routine( rtems_task_argument not_used )
    2222{
    23   int sc = 0;
     23  rtems_status_code sc;
    2424
    2525  puts( "task_routine - setting up a private environment" );
    2626
    2727  sc = rtems_libio_set_private_env();
     28  directive_failed( sc, "set private env" );
    2829  sleep( 1 );
    2930
     
    3536)
    3637{
    37   int sc = 0;
    38   bool status = 0;
    39   void *alloc_ptr = (void *)0;
    40   rtems_id current_task_id;
    41   rtems_id task_id;
    42   rtems_name another_task_name;
     38  rtems_status_code       sc;
     39  bool                    status;
     40  void                   *alloc_ptr;
     41  rtems_id                current_task_id;
     42  rtems_id                task_id;
     43  rtems_name              another_task_name;
    4344  Heap_Information_block  Info;
    4445 
  • testsuites/sptests/spsimplesched01/init.c

    rff7ff62 rc0d7e23  
    2626)
    2727{
    28   rtems_id          tid;
    29   rtems_time_of_day time;
    30   uint32_t    task_index;
    31   rtems_status_code status;
     28  rtems_id           tid;
     29  rtems_time_of_day  time;
     30  uint32_t           task_index;
     31  rtems_status_code  status;
    3232
    3333  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
     34  directive_failed( status, "task ident" );
     35
    3436  task_index = task_number( tid );
    3537  for ( ; ; ) {
    3638    status = rtems_clock_get_tod( &time );
     39    directive_failed( status, "clock get tod" );
    3740    if ( time.second >= 35 ) {
    3841      puts( "*** END OF SIMPLE01 TEST ***" );
     
    4245    print_time( " - rtems_clock_get_tod - ", &time, "\n" );
    4346    status = rtems_task_wake_after(
    44       task_index * 5 * rtems_clock_get_ticks_per_second() );
     47      task_index * 5 * rtems_clock_get_ticks_per_second()
     48    );
     49    directive_failed( status, "wake after" );
    4550  }
    4651}
     
    7479    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
    7580  );
     81  directive_failed( status, "create 1" );
     82
    7683  status = rtems_task_create(
    7784    Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
    7885    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
    7986  );
     87  directive_failed( status, "create 2" );
     88
    8089  status = rtems_task_create(
    8190    Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
    8291    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
    8392  );
     93  directive_failed( status, "create 3" );
    8494
    8595  status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
    86   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    87   status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
    88   rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    89   status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
    90 
    91   rtems_task_set_priority(Task_id[1], 2, &old);
    92   rtems_task_set_priority(Task_id[2], 2, &old);
    93   rtems_task_set_priority(Task_id[3], 2, &old);
    94 
     96  directive_failed( status, "start 1" );
    9597  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
    9698
     99  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
     100  directive_failed( status, "start 2" );
     101  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     102
     103  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
     104  directive_failed( status, "start 3" );
     105
     106  status = rtems_task_set_priority( Task_id[1], 2, &old );
     107  directive_failed( status, "set priority 1" );
     108  status = rtems_task_set_priority( Task_id[2], 2, &old );
     109  directive_failed( status, "set priority 2" );
     110  status = rtems_task_set_priority( Task_id[3], 2, &old );
     111  directive_failed( status, "set priority 3" );
     112
     113  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     114  directive_failed( status, "yield" );
     115
    97116  status = rtems_task_delete( RTEMS_SELF );
     117  directive_failed( status, "delete self" );
    98118}
    99119
  • testsuites/sptests/spsimplesched02/init.c

    rff7ff62 rc0d7e23  
    2929{
    3030  rtems_id          tid;
    31   uint32_t    task_index;
    3231  rtems_status_code status;
    3332
    3433  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
    35   task_index = task_number( tid );
     34  directive_failed( status, "wake after" );
    3635
    3736  for ( ; ; ) {
    38     rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     37    status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     38    directive_failed( status, "yield" );
    3939  }
    4040}
Note: See TracChangeset for help on using the changeset viewer.