Changeset 916b0f30 in rtems for testsuites/sptests/sp43


Ignore:
Timestamp:
Jan 31, 2008, 5:30:40 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
1dd2318
Parents:
9602045
Message:

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

  • sp43/init.c, sp43/sp43.scn: Add test case for unprintable names.
Location:
testsuites/sptests/sp43
Files:
2 edited

Legend:

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

    r9602045 r916b0f30  
    4949
    5050void change_name(
    51   const char *newName
     51  const char *newName,
     52  boolean     printable
    5253)
    5354{
     
    5556  char                 name[ 5 ];
    5657  char                *ptr;
    57 
    58   puts( "rtems_object_set_name - change name of init task" );
     58  const char          *c;
     59
     60  printf( "rtems_object_set_name - change name of init task to " );
     61  if ( printable )
     62    printf( "(%s)\n", newName );
     63  else {
     64    printf( "(" );
     65    for (c=newName ; *c ; ) {
     66       if (isprint(*ptr)) printf( "%c", *c );
     67       else               printf( "0x%02x", *c );
     68       c++;
     69       if ( *c )
     70         printf( "-" );
     71    }
     72    printf( ")\n" );
     73  }
     74
    5975  status = rtems_object_set_name( main_task, newName );
    6076  directive_failed( status, "rtems_object_set_name" );
     
    8096  char                               *ptr;
    8197  const char                          newName[5] = "New1";
     98  char                                tmpNameString[5];
    8299  uint32_t                            part;
    83100  rtems_object_api_class_information  info;
     
    184201   */
    185202
    186   change_name( "New1" );
    187   change_name( "Ne1" );
    188   change_name( "N1" );
    189   change_name( "N" );
    190   change_name( "" );
     203  change_name( "New1", TRUE );
     204  change_name( "Ne1", TRUE );
     205  change_name( "N1", TRUE );
     206  change_name( "N", TRUE );
     207  change_name( "", TRUE );
     208  tmpNameString[0] = 'N';
     209  tmpNameString[1] = 0x07;
     210  tmpNameString[2] = 0x09;
     211  tmpNameString[3] = '1';
     212  tmpNameString[4] = '\0';
     213  change_name( tmpNameString, FALSE );
    191214
    192215  /*
  • testsuites/sptests/sp43/sp43.scn

    r9602045 r916b0f30  
    1313rtems_object_set_name - INVALID_ID (bad API)
    1414rtems_object_set_name - INVALID_ID (bad index)
    15 rtems_object_set_name - change name of init task
     15rtems_object_set_name - change name of init task to (New1)
    1616New1 - name returned by rtems_object_get_classic_name
    1717rtems_object_get_name returned (New1) for init task
    18 rtems_object_set_name - change name of init task
     18rtems_object_set_name - change name of init task to (Ne1)
    1919Ne1 - name returned by rtems_object_get_classic_name
    2020rtems_object_get_name returned (Ne1) for init task
    21 rtems_object_set_name - change name of init task
     21rtems_object_set_name - change name of init task to (N1)
    2222N1  - name returned by rtems_object_get_classic_name
    2323rtems_object_get_name returned (N1) for init task
    24 rtems_object_set_name - change name of init task
     24rtems_object_set_name - change name of init task to (N)
    2525N   - name returned by rtems_object_get_classic_name
    2626rtems_object_get_name returned (N) for init task
    27 rtems_object_set_name - change name of init task
    28     - name returned by rtems_object_get_classic_name
     27rtems_object_set_name - change name of init task to ()
     28*    - name returned by rtems_object_get_classic_name
    2929rtems_object_get_name returned () for init task
     30rtems_object_set_name - change name of init task to (N-0x07-0x09-1)
     31N**1 - name returned by rtems_object_get_classic_name
     32rtems_object_get_name returned (N**1) for init task
    3033rtems_build_id - build an id to match init task
    3134rtems_object_id_get_api - OK
Note: See TracChangeset for help on using the changeset viewer.