Changeset a986c07 in rtems


Ignore:
Timestamp:
Dec 14, 2008, 6:36:00 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
4389287a
Parents:
a660812
Message:

2008-12-14 Joel Sherrill <joel.sherrill@…>

  • sp07/init.c, sp12/init.c, sp12/pridrv.c, sp12/pritask.c, sp12/system.h, sp16/system.h, sp25/system.h, sp26/task1.c, sp28/init.c, sp29/init.c, sp35/priinv.c, sp42/init.c: Run all tests successfully with maxixum number of priorities as 16 instead of 256. This was done by temporarily modifying the score priority.h maximum. This allowed testing of all API code to ensure that it worked properly with a reduced number of priorities. Most modifications were to switch from hard-coded maximum to using the API provided methods to determine maximum number of priority levels.
Location:
testsuites/sptests
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    ra660812 ra986c07  
     12008-12-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sp07/init.c, sp12/init.c, sp12/pridrv.c, sp12/pritask.c,
     4        sp12/system.h, sp16/system.h, sp25/system.h, sp26/task1.c,
     5        sp28/init.c, sp29/init.c, sp35/priinv.c, sp42/init.c: Run all tests
     6        successfully with maxixum number of priorities as 16 instead of 256.
     7        This was done by temporarily modifying the score priority.h maximum.
     8        This allowed testing of all API code to ensure that it worked
     9        properly with a reduced number of priorities. Most modifications were
     10        to switch from hard-coded maximum to using the API provided methods
     11        to determine maximum number of priority levels.
     12
    1132008-12-04      Joel Sherrill <joel.sherrill@oarcorp.com>
    214
  • testsuites/sptests/sp07/init.c

    ra660812 ra986c07  
    1212 *  Output parameters:  NONE
    1313 *
    14  *  COPYRIGHT (c) 1989-2007.
     14 *  COPYRIGHT (c) 1989-2008.
    1515 *  On-Line Applications Research Corporation (OAR).
    1616 *
     
    133133  directive_failed( status, "rtems_task_create of TA2" );
    134134
     135#define TA3_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4)
    135136  status = rtems_task_create(
    136137    Task_name[ 3 ],
    137     250,
     138    TA3_PRIORITY,
    138139    RTEMS_MINIMUM_STACK_SIZE * 2,
    139140    RTEMS_DEFAULT_MODES,
     
    143144  directive_failed( status, "rtems_task_create of TA3" );
    144145
     146#define TA4_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
    145147  status = rtems_task_create(
    146148    Task_name[ 4 ],
    147     254,
     149    TA4_PRIORITY,
    148150    RTEMS_MINIMUM_STACK_SIZE * 2,
    149151    RTEMS_DEFAULT_MODES,
  • testsuites/sptests/sp12/init.c

    ra660812 ra986c07  
    1212 *  Output parameters:  NONE
    1313 *
    14  *  COPYRIGHT (c) 1989-1999.
     14 *  COPYRIGHT (c) 1989-2008.
    1515 *  On-Line Applications Research Corporation (OAR).
    1616 *
     
    8080
    8181  puts( "INIT - Backward priority queue test" );
    82   Priority_test_driver( 32 );
     82  Priority_test_driver( (RTEMS_MAXIMUM_PRIORITY / 2) + 1 );
    8383
    8484rtems_test_pause();
     
    8787
    8888  status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
    89   directive_failed( status, "rtems_semaphore_delete of SM2" );
     89  directive_failed( status, "rtems_semaphore_delete of SM2 #1" );
    9090
    9191  puts( "INIT - rtems_semaphore_create - allocated binary semaphore" );
     
    105105  puts( "INIT - rtems_semaphore_delete - allocated binary semaphore" );
    106106  status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
    107   directive_failed( status, "rtems_semaphore_delete of SM2" );
     107  directive_failed( status, "rtems_semaphore_delete of SM2 #2" );
    108108
    109109  status = rtems_semaphore_create(
     
    116116  directive_failed( status, "rtems_semaphore_create of priority inherit SM2" );
    117117
    118   Priority_test_driver( 64 );
     118  Priority_test_driver( PRIORITY_INHERIT_BASE_PRIORITY );
    119119
    120120rtems_test_pause();
    121121
    122122  status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
    123   directive_failed( status, "rtems_semaphore_delete of SM2" );
     123  directive_failed( status, "rtems_semaphore_delete of SM2 #3" );
    124124
    125125  status = rtems_semaphore_create(
  • testsuites/sptests/sp12/pridrv.c

    ra660812 ra986c07  
    1212 *  Output parameters:  NONE
    1313 *
    14  *  COPYRIGHT (c) 1989-1999.
     14 *  COPYRIGHT (c) 1989-2008.
    1515 *  On-Line Applications Research Corporation (OAR).
    1616 *
     
    2929{
    3030  rtems_task_priority previous_priority;
    31   uint32_t      index;
     31  uint32_t            index;
    3232  rtems_status_code   status;
    3333
     
    7777      directive_failed( status, "rtems_task_wake_after loop" );
    7878
    79       if ( priority_base == 64 ) {
     79      if ( priority_base == PRIORITY_INHERIT_BASE_PRIORITY ) {
    8080        if ( index == 4 ) {
    8181          status = rtems_task_set_priority(
     
    111111  }
    112112
    113   if ( priority_base == 64 ) {
     113  if ( priority_base == PRIORITY_INHERIT_BASE_PRIORITY ) {
    114114    puts( "PDRV - rtems_task_resume - PRI5" );
    115115    status = rtems_task_resume( Priority_task_id[ 5 ] );
  • testsuites/sptests/sp12/pritask.c

    ra660812 ra986c07  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-2007.
     10 *  COPYRIGHT (c) 1989-2008.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    4747  directive_failed( status, "rtems_semaphore_obtain of SM2" );
    4848
    49   if ( its_priority < 64 ) {
     49  if ( its_priority < PRIORITY_INHERIT_BASE_PRIORITY ) {
    5050    printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority );
    5151    rtems_test_exit( 0 );
  • testsuites/sptests/sp12/system.h

    ra660812 ra986c07  
    44 *  function in the test set.
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    1515
    1616#include <tmacros.h>
     17
     18#define PRIORITY_INHERIT_BASE_PRIORITY 5
    1719
    1820/* functions */
  • testsuites/sptests/sp16/system.h

    ra660812 ra986c07  
    44 *  function in the test set.
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    6969TEST_EXTERN uint8_t   Area_4[8192] CPU_STRUCTURE_ALIGNMENT;
    7070
    71 #define BASE_PRIORITY 140
     71#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
    7272
    7373#define Put_address_from_area_1( _to_be_printed ) \
  • testsuites/sptests/sp25/system.h

    ra660812 ra986c07  
    44 *  function in the test set.
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    5353#endif
    5454
    55 #define BASE_PRIORITY 140
     55#define BASE_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
    5656
    5757#define Put_address_from_area_1( _to_be_printed ) \
  • testsuites/sptests/sp26/task1.c

    ra660812 ra986c07  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2008.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    8686
    8787  sc = rtems_task_create (rtems_build_name('S','u','b',c),
    88     100,
     88    RTEMS_MAXIMUM_PRIORITY - 1,
    8989    RTEMS_MINIMUM_STACK_SIZE * 4,
    9090    RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
  • testsuites/sptests/sp28/init.c

    ra660812 ra986c07  
    9797
    9898  sc = rtems_task_create(rtems_build_name ('S', 'R', 'V', arg + 'A'),
    99     100,
     99    RTEMS_MAXIMUM_PRIORITY - 1,
    100100    RTEMS_MINIMUM_STACK_SIZE,
    101101    RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
     
    281281
    282282  sc = rtems_task_create(rtems_build_name ('O', 'T', 'H', 'R'),
    283     100,
     283    RTEMS_MAXIMUM_PRIORITY - 1,
    284284    RTEMS_MINIMUM_STACK_SIZE,
    285285    RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
     
    328328
    329329  sc = rtems_task_create(rtems_build_name ('O', 'T', 'H', 'R'),
    330     100,
     330    RTEMS_MAXIMUM_PRIORITY - 1,
    331331    RTEMS_MINIMUM_STACK_SIZE,
    332332    RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
  • testsuites/sptests/sp29/init.c

    ra660812 ra986c07  
    5050
    5151        sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', 'A'),
    52                 100,
     52                RTEMS_MAXIMUM_PRIORITY - 1,
    5353                RTEMS_MINIMUM_STACK_SIZE * 2,
    5454                RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
  • testsuites/sptests/sp35/priinv.c

    ra660812 ra986c07  
    411411  /* -- Medium-prio Test Tasks --- */
    412412  for (i = 0; i < NofMediumTask_C; i++) {
     413#define MEDIUM_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
    413414    status = rtems_task_create(
    414415      rtems_build_name('M','E','D','0'+i),               /* Name */
    415       100,                                               /* Priority */
     416      MEDIUM_PRIORITY,                                   /* Priority */
    416417      RTEMS_MINIMUM_STACK_SIZE*2,                        /* Stack size (8KB) */
    417418      RTEMS_DEFAULT_MODES | RTEMS_NO_ASR,                /* Mode */
     
    426427
    427428  /* -- High-prio Test Task --- */
     429#define HIGH_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2))
    428430  status = rtems_task_create(
    429431    rtems_build_name('H','I','G','H'),                 /* Name */
    430     10,                                                /* Priority */
     432    HIGH_PRIORITY,                                     /* Priority */
    431433    RTEMS_MINIMUM_STACK_SIZE*2,                        /* Stack size (8KB) */
    432434    RTEMS_DEFAULT_MODES | RTEMS_NO_ASR,                /* Mode */
     
    440442
    441443  /* -- Low-prio Test Task --- */
     444#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
    442445  status = rtems_task_create(
    443446    rtems_build_name('L','O','W',' '),                 /* Name */
    444     200,                                               /* Priority */
     447    LOW_PRIORITY,                                      /* Priority */
    445448    RTEMS_MINIMUM_STACK_SIZE*2,                        /* Stack size (8KB) */
    446449    RTEMS_DEFAULT_MODES | RTEMS_NO_ASR,                /* Mode */
     
    454457
    455458  /* -- HW Simulator Task --- */
     459#define HWTASK_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2)
    456460  status = rtems_task_create(
    457461    rtems_build_name('H','W','S','M'),                 /* Name */
    458     240,                                               /* Priority */
     462    HWTASK_PRIORITY,                                   /* Priority */
    459463    RTEMS_MINIMUM_STACK_SIZE*2,                        /* Stack size (8KB) */
    460464    RTEMS_DEFAULT_MODES | RTEMS_NO_ASR,                /* Mode */
  • testsuites/sptests/sp42/init.c

    ra660812 ra986c07  
    2626 * behavior won't be the same when released.
    2727 */
     28#if (RTEMS_MAXIMUM_PRIORITY >= 64)
    2829rtems_task_priority Priorities[MAX_TASKS] = {
    2930  37, 37, 37, 37,       /* backward - more 2-n */
     
    3435  34, 34, 34, 34,       /* backward - multple on 2-n chain */
    3536};
     37#else
     38rtems_task_priority Priorities[MAX_TASKS] = {
     39  13, 13, 13, 13,       /* backward - more 2-n */
     40  2, 2, 2, 2,           /* forward - multiple are on 2-n chain */
     41  4, 3,                 /* forward - search forward arbitrary */
     42  3, 3, 3, 3,           /* forward - more 2-n */
     43  14, 13,               /* backward - search backward arbitrary */
     44  12, 12, 12, 12,       /* backward - multple on 2-n chain */
     45};
     46#endif
    3647
    3748
Note: See TracChangeset for help on using the changeset viewer.