diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-31 17:30:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-31 17:30:40 +0000 |
commit | 916b0f301ce7751182207fada77cf659503fcb98 (patch) | |
tree | d02b77afac2a451fbbd7dc15cc8226f801957a7b /testsuites | |
parent | 2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-916b0f301ce7751182207fada77cf659503fcb98.tar.bz2 |
2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp43/init.c, sp43/sp43.scn: Add test case for unprintable names.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/sptests/sp43/init.c | 37 | ||||
-rw-r--r-- | testsuites/sptests/sp43/sp43.scn | bin | 3429 -> 3643 bytes |
3 files changed, 34 insertions, 7 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 38816aab22..57f993ffe2 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,9 @@ 2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> + * sp43/init.c, sp43/sp43.scn: Add test case for unprintable names. + +2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> + * 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. diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c index 56950945ae..2c73088515 100644 --- a/testsuites/sptests/sp43/init.c +++ b/testsuites/sptests/sp43/init.c @@ -48,14 +48,30 @@ void print_class_info( } void change_name( - const char *newName + const char *newName, + boolean printable ) { rtems_status_code status; char name[ 5 ]; char *ptr; + const char *c; + + printf( "rtems_object_set_name - change name of init task to " ); + if ( printable ) + printf( "(%s)\n", newName ); + else { + printf( "(" ); + for (c=newName ; *c ; ) { + if (isprint(*ptr)) printf( "%c", *c ); + else printf( "0x%02x", *c ); + c++; + if ( *c ) + printf( "-" ); + } + printf( ")\n" ); + } - puts( "rtems_object_set_name - change name of init task" ); status = rtems_object_set_name( main_task, newName ); directive_failed( status, "rtems_object_set_name" ); @@ -79,6 +95,7 @@ rtems_task Init( char name[5]; char *ptr; const char newName[5] = "New1"; + char tmpNameString[5]; uint32_t part; rtems_object_api_class_information info; @@ -183,11 +200,17 @@ rtems_task Init( * This is strange but pushes the SuperCore code to do different things. */ - change_name( "New1" ); - change_name( "Ne1" ); - change_name( "N1" ); - change_name( "N" ); - change_name( "" ); + change_name( "New1", TRUE ); + change_name( "Ne1", TRUE ); + change_name( "N1", TRUE ); + change_name( "N", TRUE ); + change_name( "", TRUE ); + tmpNameString[0] = 'N'; + tmpNameString[1] = 0x07; + tmpNameString[2] = 0x09; + tmpNameString[3] = '1'; + tmpNameString[4] = '\0'; + change_name( tmpNameString, FALSE ); /* * Exercise id build and extraction routines diff --git a/testsuites/sptests/sp43/sp43.scn b/testsuites/sptests/sp43/sp43.scn Binary files differindex 96de196d4a..865ba9571e 100644 --- a/testsuites/sptests/sp43/sp43.scn +++ b/testsuites/sptests/sp43/sp43.scn |