Changeset 403c507 in rtems


Ignore:
Timestamp:
Jan 31, 2008, 4:08:52 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
74d0cb44
Parents:
c87593f
Message:

2008-01-31 Joel Sherrill <joel.sherrill@…>

  • sp09/screen01.c, sp09/sp09.scn: Add more bad thread Id cases.
  • sp40/init.c, sp40/sp40.scn: Add message to say test is TBD.
  • sp41/sp41.scn: Now has content.
  • sp43/init.c, sp43/sp43.scn: Enhanced to increase coverage of Object Services recently added to API.
Location:
testsuites/sptests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rc87593f r403c507  
     12008-01-31      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * sp09/screen01.c, sp09/sp09.scn: Add more bad thread Id cases.
     4        * sp40/init.c, sp40/sp40.scn: Add message to say test is TBD.
     5        * sp41/sp41.scn: Now has content.
     6        * sp43/init.c, sp43/sp43.scn: Enhanced to increase coverage of
     7        Object Services recently added to API.
     8
    192008-01-29      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • testsuites/sptests/sp09/screen01.c

    rc87593f r403c507  
    77 *  Output parameters:  NONE
    88 *
    9  *  COPYRIGHT (c) 1989-1999.
     9 *  COPYRIGHT (c) 1989-2008.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    5050  puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
    5151
    52   status = rtems_task_get_note( _RTEMS_tasks_Information.maximum_id, RTEMS_NOTEPAD_LAST, &notepad_value );
     52  status = rtems_task_get_note(
     53    _RTEMS_tasks_Information.maximum_id,
     54    RTEMS_NOTEPAD_LAST,
     55    &notepad_value
     56  );
    5357  fatal_directive_status(
    5458    status,
     
    6872    "rtems_task_get_note with illegal id"
    6973  );
    70   puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
    71 
     74
     75  status = rtems_task_get_note(
     76    rtems_build_id( OBJECTS_CLASSIC_API, 2, 1, 1 ),
     77    RTEMS_NOTEPAD_LAST,
     78    &notepad_value
     79  );
     80  fatal_directive_status(
     81    status,
     82    RTEMS_INVALID_ID,
     83    "rtems_task_get_note with non-task ID"
     84  );
     85
     86  puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID (no tasks in API)" );
     87  status = rtems_task_get_note(
     88    rtems_build_id( OBJECTS_ITRON_API, OBJECTS_ITRON_TASKS, 1, 1 ),
     89    RTEMS_NOTEPAD_LAST,
     90    &notepad_value
     91  );
     92  #ifdef RTEMS_ITRON_API
     93    directive_failed( status,
     94  #else
     95    fatal_directive_status( status, RTEMS_INVALID_ID,
     96  #endif
     97    "rtems_task_get_note with no tasks in API"
     98  );
    7299
    73100  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id );
  • testsuites/sptests/sp09/sp09.scn

    rc87593f r403c507  
    66TA1 - rtems_task_get_note - RTEMS_INVALID_ID
    77TA1 - rtems_task_get_note - RTEMS_INVALID_ID
    8 TA1 - rtems_task_get_note - RTEMS_INVALID_ID
     8TA1 - rtems_task_get_note - RTEMS_INVALID_ID (no tasks in API)
    99TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
    1010TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
  • testsuites/sptests/sp40/init.c

    rc87593f r403c507  
    2121  puts( "\n\n*** TEST 40 ***" );
    2222
     23  puts( "TBD - Write test case matching this description" );
     24
    2325  /*
    2426   *  Register two drivers to fill up the table
  • testsuites/sptests/sp40/sp40.scn

    rc87593f r403c507  
     1*** TEST 40 ***
     2TBD - Write test case matching this description
     3*** END OF TEST 40 ***
  • testsuites/sptests/sp41/sp41.scn

    rc87593f r403c507  
     1*** TEST 41 ***
     2Release from ISR hitting synchronization point has occurred
     3Release from ISR (with timeout) hitting synchronization point has occurred
     4Run multiple times in attempt to hit threadq timeout synchronization point
  • testsuites/sptests/sp43/init.c

    rc87593f r403c507  
    2323#undef rtems_object_id_get_index
    2424#undef rtems_object_id_get_node
     25
     26rtems_id         main_task;
     27rtems_name       main_name;
    2528
    2629void print_class_info(
     
    4548}
    4649
     50void change_name(
     51  const char *newName
     52)
     53{
     54  rtems_status_code    status;
     55  char                 name[ 5 ];
     56  char                *ptr;
     57
     58  puts( "rtems_object_set_name - change name of init task" );
     59  status = rtems_object_set_name( main_task, newName );
     60  directive_failed( status, "rtems_object_set_name" );
     61
     62  status = rtems_object_get_classic_name( main_task, &main_name );
     63  directive_failed( status, "rtems_object_get_classic_name" );
     64  put_name( main_name, FALSE );
     65  puts( " - name returned by rtems_object_get_classic_name" );
     66
     67  ptr = rtems_object_get_name( main_task, 5, name );
     68  rtems_test_assert(ptr != NULL);
     69  printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
     70}
     71
    4772rtems_task Init(
    4873  rtems_task_argument argument
     
    5075{
    5176  rtems_status_code                   status;
    52   rtems_id                            main_task;
    53   rtems_name                          main_name;
    5477  rtems_id                            tmpId;
    5578  rtems_name                          tmpName;
     
    6083  rtems_object_api_class_information  info;
    6184
    62 
    6385  puts( "\n\n*** TEST 43 ***" );
    6486
     
    7092    status,
    7193    RTEMS_INVALID_ADDRESS,
    72     "rtems_object_get_classic_name"
    73   );
    74 
    75   puts( "rtems_object_get_classic_name - INVALID_ID" );
    76   status = rtems_object_get_classic_name( main_task + 5, &tmpId );
    77   fatal_directive_status(
    78     status,
    79     RTEMS_INVALID_ID,
    80     "rtems_object_get_classic_name"
     94    "rtems_object_get_classic_name #1"
     95  );
     96
     97  puts( "rtems_object_get_classic_name - INVALID_ID (bad index)" );
     98  status = rtems_object_get_classic_name( main_task + 5, &main_name );
     99  fatal_directive_status(
     100    status,
     101    RTEMS_INVALID_ID,
     102    "rtems_object_get_classic_name #2"
     103  );
     104
     105  puts( "rtems_object_get_classic_name - INVALID_ID (unallocated index)" );
     106  status = rtems_object_get_classic_name( main_task + 1, &main_name );
     107  fatal_directive_status(
     108    status,
     109    RTEMS_INVALID_ID,
     110    "rtems_object_get_classic_name #4"
     111  );
     112
     113  puts( "rtems_object_get_classic_name - INVALID_ID (bad API)" );
     114  tmpId = rtems_build_id( 0xff, OBJECTS_RTEMS_TASKS, 1, 1 ),
     115  status = rtems_object_get_classic_name( tmpId, &main_name );
     116  fatal_directive_status(
     117    status,
     118    RTEMS_INVALID_ID,
     119    "rtems_object_get_classic_name #5"
    81120  );
    82121
     
    119158
    120159  /*
    121    * rtems_object_set_name - change name of init task
    122    */
    123 
    124   puts( "rtems_object_set_name - change name of init task" );
    125   status = rtems_object_set_name( main_task, newName );
    126   directive_failed( status, "rtems_object_set_name" );
    127 
    128   status = rtems_object_get_classic_name( main_task, &main_name );
    129   directive_failed( status, "rtems_object_get_classic_name" );
    130   put_name( main_name, FALSE );
    131   puts( " - name returned by rtems_object_get_classic_name" );
    132 
    133   ptr = rtems_object_get_name( main_task, 5, name );
    134   rtems_test_assert(ptr != NULL);
    135   printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
     160   * rtems_object_set_name - errors
     161   */
     162
     163  puts( "rtems_object_set_name - INVALID_ID (bad API)" );
     164  tmpId = rtems_build_id( 0xff, OBJECTS_RTEMS_TASKS, 1, 1 ),
     165  status = rtems_object_set_name( tmpId, newName );
     166  fatal_directive_status(
     167    status,
     168    RTEMS_INVALID_ID,
     169    "rtems_object_set_name #1"
     170  );
     171
     172  puts( "rtems_object_set_name - INVALID_ID (bad index)" );
     173  status = rtems_object_set_name( main_task + 10, newName );
     174  fatal_directive_status(
     175    status,
     176    RTEMS_INVALID_ID,
     177    "rtems_object_set_name #2"
     178  );
     179
     180  /*
     181   * rtems_object_set_name - change name of init task in various ways.
     182   *
     183   * This is strange but pushes the SuperCore code to do different things.
     184   */
     185
     186  change_name( "New1" );
     187  change_name( "Ne1" );
     188  change_name( "N1" );
     189  change_name( "N" );
     190  change_name( "" );
    136191
    137192  /*
     
    178233  printf( "rtems_object_api_maximum_class(0) returned %d\n",
    179234          rtems_object_api_maximum_class(0) );
     235  printf( "rtems_object_api_minimum_class(255) returned %d\n",
     236          rtems_object_api_minimum_class(255) );
     237  printf( "rtems_object_api_maximum_class(255) returned %d\n",
     238          rtems_object_api_maximum_class(255) );
    180239
    181240  printf( "rtems_object_api_minimum_class(OBJECTS_INTERNAL_API) returned %d\n",
     
    189248          rtems_object_api_maximum_class(OBJECTS_CLASSIC_API) );
    190249
    191   printf( "rtems_object_api_minimum_class(OBJECTS_POSIX_API) returned %d\n",
    192           rtems_object_api_minimum_class(OBJECTS_POSIX_API) );
    193   printf( "rtems_object_api_maximum_class(OBJECTS_POSIX_API) returned %d\n",
    194           rtems_object_api_maximum_class(OBJECTS_POSIX_API) );
    195 
    196250  printf( "rtems_object_api_minimum_class(OBJECTS_ITRON_API) returned %d\n",
    197251          rtems_object_api_minimum_class(OBJECTS_ITRON_API) );
     
    199253          rtems_object_api_maximum_class(OBJECTS_ITRON_API) );
    200254
    201 
    202255  /*
    203256   *  Another screen break for the API and class name tests
     
    206259 
    207260  printf( "rtems_object_get_api_name(0) = %s\n", rtems_object_get_api_name(0) );
    208   printf( "rtems_object_get_api_name(255) = %s\n", rtems_object_get_api_name(255));
     261  printf( "rtems_object_get_api_name(255) = %s\n",
     262    rtems_object_get_api_name(255));
    209263
    210264  printf( "rtems_object_get_api_name(INTERNAL_API) = %s\n",
     
    212266  printf( "rtems_object_get_api_name(CLASSIC_API) = %s\n",
    213267     rtems_object_get_api_name(OBJECTS_CLASSIC_API) );
    214   printf( "rtems_object_get_api_name(POSIX_API) = %s\n",
    215      rtems_object_get_api_name(OBJECTS_POSIX_API) );
    216268  printf( "rtems_object_get_api_name(ITRON_API) = %s\n",
    217269     rtems_object_get_api_name(OBJECTS_ITRON_API) );
     
    221273  printf( "rtems_object_get_api_class_name(CLASSIC_API, 0) = %s\n",
    222274    rtems_object_get_api_class_name( OBJECTS_CLASSIC_API, 0 ) );
    223   printf( "rtems_object_get_api_class_name(CLASSIC_API, RTEMS_BARRIERS) = %s\n",
    224     rtems_object_get_api_class_name(OBJECTS_CLASSIC_API, OBJECTS_RTEMS_BARRIERS));
     275  printf("rtems_object_get_api_class_name(INTERNAL_API, MUTEXES) = %s\n",
     276    rtems_object_get_api_class_name(
     277       OBJECTS_INTERNAL_API, OBJECTS_INTERNAL_MUTEXES));
     278  printf("rtems_object_get_api_class_name(CLASSIC_API, RTEMS_BARRIERS) = %s\n",
     279    rtems_object_get_api_class_name(
     280       OBJECTS_CLASSIC_API, OBJECTS_RTEMS_BARRIERS));
    225281
    226282  /*
     
    240296
    241297  puts( "rtems_object_get_class_information - INVALID_NUMBER (bad API)" );
    242   status = rtems_object_get_class_information(0, OBJECTS_INTERNAL_THREADS, &info);
     298  status =
     299    rtems_object_get_class_information(0, OBJECTS_INTERNAL_THREADS, &info);
    243300  fatal_directive_status(
    244301    status,
     
    248305
    249306  puts( "rtems_object_get_class_information - INVALID_NUMBER (bad class)" );
    250   status = rtems_object_get_class_information( OBJECTS_INTERNAL_API, 0, &info );
     307  status =
     308    rtems_object_get_class_information( OBJECTS_INTERNAL_API, 0, &info );
    251309  fatal_directive_status(
    252310    status,
  • testsuites/sptests/sp43/sp43.scn

    rc87593f r403c507  
    11*** TEST 43 ***
    22rtems_object_get_classic_name - INVALID_ADDRESS
    3 rtems_object_get_classic_name - INVALID_ID
     3rtems_object_get_classic_name - INVALID_ID (bad index)
     4rtems_object_get_classic_name - INVALID_ID (unallocated index)
     5rtems_object_get_classic_name - INVALID_ID (bad API)
    46UI1  - name returned by rtems_object_get_classic_name
    57TEMP - rtems_build_name for TEMP
     
    911rtems_object_get_name - bad pointer
    1012rtems_object_get_name returned (UI1 ) for init task
     13rtems_object_set_name - INVALID_ID (bad API)
     14rtems_object_set_name - INVALID_ID (bad index)
    1115rtems_object_set_name - change name of init task
    1216New1 - name returned by rtems_object_get_classic_name
    1317rtems_object_get_name returned (New1) for init task
     18rtems_object_set_name - change name of init task
     19Ne1 - name returned by rtems_object_get_classic_name
     20rtems_object_get_name returned (Ne1) for init task
     21rtems_object_set_name - change name of init task
     22N1  - name returned by rtems_object_get_classic_name
     23rtems_object_get_name returned (N1) for init task
     24rtems_object_set_name - change name of init task
     25N   - name returned by rtems_object_get_classic_name
     26rtems_object_get_name returned (N) for init task
     27rtems_object_set_name - change name of init task
     28    - name returned by rtems_object_get_classic_name
     29rtems_object_get_name returned () for init task
    1430rtems_build_id - build an id to match init task
    1531rtems_object_id_get_api - OK
     
    2440rtems_object_api_minimum_class(0) returned -1
    2541rtems_object_api_maximum_class(0) returned -1
     42rtems_object_api_minimum_class(255) returned -1
     43rtems_object_api_maximum_class(255) returned -1
    2644rtems_object_api_minimum_class(OBJECTS_INTERNAL_API) returned 1
    2745rtems_object_api_maximum_class(OBJECTS_INTERNAL_API) returned 2
    2846rtems_object_api_minimum_class(OBJECTS_CLASSIC_API) returned 1
    2947rtems_object_api_maximum_class(OBJECTS_CLASSIC_API) returned 10
    30 rtems_object_api_minimum_class(OBJECTS_POSIX_API) returned 1
    31 rtems_object_api_maximum_class(OBJECTS_POSIX_API) returned 12
    3248rtems_object_api_minimum_class(OBJECTS_ITRON_API) returned 1
    3349rtems_object_api_maximum_class(OBJECTS_ITRON_API) returned 8
     
    3753rtems_object_get_api_name(INTERNAL_API) = Internal
    3854rtems_object_get_api_name(CLASSIC_API) = Classic
    39 rtems_object_get_api_name(POSIX_API) = POSIX
    4055rtems_object_get_api_name(ITRON_API) = ITRON
    4156rtems_object_get_api_class_name(0, RTEMS_TASKS) = BAD API
    4257rtems_object_get_api_class_name(CLASSIC_API, 0) = BAD CLASS
     58rtems_object_get_api_class_name(INTERNAL_API, MUTEXES) = Mutex
    4359rtems_object_get_api_class_name(CLASSIC_API, RTEMS_BARRIERS) = Barrier
    4460<pause>
Note: See TracChangeset for help on using the changeset viewer.