Changeset 60735a30 in rtems for testsuites/sptests/sp43


Ignore:
Timestamp:
Feb 4, 2008, 5:16:56 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
3ca942a
Parents:
8932955
Message:

2008-02-04 Joel Sherrill <joel.sherrill@…>

  • sp43/init.c, sp43/sp43.scn: Exercise passing as object Id of SELF.
Location:
testsuites/sptests/sp43
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp43/init.c

    r8932955 r60735a30  
    4949
    5050void change_name(
     51  rtems_id    id,
    5152  const char *newName,
    5253  boolean     printable
     
    7374  }
    7475
    75   status = rtems_object_set_name( main_task, newName );
     76  status = rtems_object_set_name( id, newName );
    7677  directive_failed( status, "rtems_object_set_name" );
    7778
    78   status = rtems_object_get_classic_name( main_task, &main_name );
     79  status = rtems_object_get_classic_name( id, &main_name );
    7980  directive_failed( status, "rtems_object_get_classic_name" );
    8081  put_name( main_name, FALSE );
    8182  puts( " - name returned by rtems_object_get_classic_name" );
    8283
    83   ptr = rtems_object_get_name( main_task, 5, name );
     84  ptr = rtems_object_get_name( id, 5, name );
    8485  rtems_test_assert(ptr != NULL);
    8586  printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
     
    140141  directive_failed( status, "rtems_object_get_classic_name" );
    141142  put_name( main_name, FALSE );
    142   puts( " - name returned by rtems_object_get_classic_name" );
     143  puts( " - name returned by rtems_object_get_classic_name for Init task id" );
     144
     145  status = rtems_object_get_classic_name( RTEMS_SELF, &main_name );
     146  directive_failed( status, "rtems_object_get_classic_name" );
     147  put_name( main_name, FALSE );
     148  puts( " - name returned by rtems_object_get_classic_name for RTEMS_SELF" );
    143149
    144150  tmpName = rtems_build_name( 'T', 'E', 'M', 'P' );
     
    172178  ptr = rtems_object_get_name( main_task, 5, name );
    173179  rtems_test_assert(ptr != NULL);
    174   printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
     180  printf( "rtems_object_get_name returned (%s) for init task id\n", ptr );
     181
     182  ptr = rtems_object_get_name( RTEMS_SELF, 5, name );
     183  rtems_test_assert(ptr != NULL);
     184  printf( "rtems_object_get_name returned (%s) for RTEMS_SELF\n", ptr );
    175185
    176186  /*
     
    201211   */
    202212
    203   change_name( "New1", TRUE );
    204   change_name( "Ne1", TRUE );
    205   change_name( "N1", TRUE );
    206   change_name( "N", TRUE );
    207   change_name( "", TRUE );
     213  change_name( main_task,  "New1", TRUE );
     214  change_name( main_task, "Ne1", TRUE );
     215  change_name( main_task, "N1", TRUE );
     216  change_name( main_task, "N", TRUE );
     217  change_name( main_task, "", TRUE );
    208218  tmpNameString[0] = 'N';
    209219  tmpNameString[1] = 0x07;
     
    211221  tmpNameString[3] = '1';
    212222  tmpNameString[4] = '\0';
    213   change_name( tmpNameString, FALSE );
     223  change_name( main_task, tmpNameString, FALSE );
     224
     225  /*
     226   * Change object name using SELF ID
     227   */
     228
     229  change_name( RTEMS_SELF,  "SELF", TRUE );
     230
     231  ptr = rtems_object_get_name( main_task, 5, name );
     232  rtems_test_assert(ptr != NULL);
     233  printf( "rtems_object_get_name returned (%s) for init task id\n", ptr );
     234
    214235
    215236  /*
  • testsuites/sptests/sp43/sp43.scn

    r8932955 r60735a30  
     1
     2
    13*** TEST 43 ***
    24rtems_object_get_classic_name - INVALID_ADDRESS
     
    46rtems_object_get_classic_name - INVALID_ID (unallocated index)
    57rtems_object_get_classic_name - INVALID_ID (bad API)
    6 UI1  - name returned by rtems_object_get_classic_name
     8UI1  - name returned by rtems_object_get_classic_name for Init task id
     9UI1  - name returned by rtems_object_get_classic_name for RTEMS_SELF
    710TEMP - rtems_build_name for TEMP
    811rtems_object_get_name - bad id for class with instances
     
    1013rtems_object_get_name - bad length
    1114rtems_object_get_name - bad pointer
    12 rtems_object_get_name returned (UI1 ) for init task
     15rtems_object_get_name returned (UI1 ) for init task id
     16rtems_object_get_name returned (UI1 ) for RTEMS_SELF
    1317rtems_object_set_name - INVALID_ID (bad API)
    1418rtems_object_set_name - INVALID_ID (bad index)
     
    2832*    - name returned by rtems_object_get_classic_name
    2933rtems_object_get_name returned () for init task
    30 rtems_object_set_name - change name of init task to (N-0x07-0x09-1)
     34rtems_object_set_name - change name of init task to (N--        -1)
    3135N**1 - name returned by rtems_object_get_classic_name
    3236rtems_object_get_name returned (N**1) for init task
     37rtems_object_set_name - change name of init task to (SELF)
     38SELF - name returned by rtems_object_get_classic_name
     39rtems_object_get_name returned (SELF) for init task
     40rtems_object_get_name returned (SELF) for init task id
    3341rtems_build_id - build an id to match init task
    3442rtems_object_id_get_api - OK
Note: See TracChangeset for help on using the changeset viewer.