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.
	* sp43/init.c, sp43/sp43.scn: Enhanced to increase coverage of
	Object Services recently added to API.
This commit is contained in:
Joel Sherrill
2008-01-31 16:08:52 +00:00
parent c87593f0b0
commit 403c5077be
8 changed files with 137 additions and 35 deletions
+8
View File
@@ -1,3 +1,11 @@
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.
* sp43/init.c, sp43/sp43.scn: Enhanced to increase coverage of
Object Services recently added to API.
2008-01-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, sp02/task1.c, sp24/resume.c,
+30 -3
View File
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -49,7 +49,11 @@ void Screen1()
);
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
status = rtems_task_get_note( _RTEMS_tasks_Information.maximum_id, RTEMS_NOTEPAD_LAST, &notepad_value );
status = rtems_task_get_note(
_RTEMS_tasks_Information.maximum_id,
RTEMS_NOTEPAD_LAST,
&notepad_value
);
fatal_directive_status(
status,
RTEMS_INVALID_ID,
@@ -67,8 +71,31 @@ void Screen1()
RTEMS_INVALID_ID,
"rtems_task_get_note with illegal id"
);
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
status = rtems_task_get_note(
rtems_build_id( OBJECTS_CLASSIC_API, 2, 1, 1 ),
RTEMS_NOTEPAD_LAST,
&notepad_value
);
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_task_get_note with non-task ID"
);
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID (no tasks in API)" );
status = rtems_task_get_note(
rtems_build_id( OBJECTS_ITRON_API, OBJECTS_ITRON_TASKS, 1, 1 ),
RTEMS_NOTEPAD_LAST,
&notepad_value
);
#ifdef RTEMS_ITRON_API
directive_failed( status,
#else
fatal_directive_status( status, RTEMS_INVALID_ID,
#endif
"rtems_task_get_note with no tasks in API"
);
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id );
directive_failed( status, "rtems_task_ident of self" );
+1 -1
View File
@@ -5,7 +5,7 @@ TA1 - rtems_task_delete - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER
TA1 - rtems_task_get_note - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ID (no tasks in API)
TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
TA1 - rtems_task_ident - local RTEMS_INVALID_NAME
+2
View File
@@ -20,6 +20,8 @@ rtems_task Init(
{
puts( "\n\n*** TEST 40 ***" );
puts( "TBD - Write test case matching this description" );
/*
* Register two drivers to fill up the table
*/
+3
View File
@@ -0,0 +1,3 @@
*** TEST 40 ***
TBD - Write test case matching this description
*** END OF TEST 40 ***
+4
View File
@@ -0,0 +1,4 @@
*** TEST 41 ***
Release from ISR hitting synchronization point has occurred
Release from ISR (with timeout) hitting synchronization point has occurred
Run multiple times in attempt to hit threadq timeout synchronization point
+89 -31
View File
@@ -23,6 +23,9 @@
#undef rtems_object_id_get_index
#undef rtems_object_id_get_node
rtems_id main_task;
rtems_name main_name;
void print_class_info(
uint32_t api,
uint32_t class,
@@ -44,13 +47,33 @@ void print_class_info(
);
}
void change_name(
const char *newName
)
{
rtems_status_code status;
char name[ 5 ];
char *ptr;
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" );
status = rtems_object_get_classic_name( main_task, &main_name );
directive_failed( status, "rtems_object_get_classic_name" );
put_name( main_name, FALSE );
puts( " - name returned by rtems_object_get_classic_name" );
ptr = rtems_object_get_name( main_task, 5, name );
rtems_test_assert(ptr != NULL);
printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
}
rtems_task Init(
rtems_task_argument argument
)
{
rtems_status_code status;
rtems_id main_task;
rtems_name main_name;
rtems_id tmpId;
rtems_name tmpName;
char name[5];
@@ -59,7 +82,6 @@ rtems_task Init(
uint32_t part;
rtems_object_api_class_information info;
puts( "\n\n*** TEST 43 ***" );
main_task = rtems_task_self();
@@ -69,15 +91,32 @@ rtems_task Init(
fatal_directive_status(
status,
RTEMS_INVALID_ADDRESS,
"rtems_object_get_classic_name"
"rtems_object_get_classic_name #1"
);
puts( "rtems_object_get_classic_name - INVALID_ID" );
status = rtems_object_get_classic_name( main_task + 5, &tmpId );
puts( "rtems_object_get_classic_name - INVALID_ID (bad index)" );
status = rtems_object_get_classic_name( main_task + 5, &main_name );
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_object_get_classic_name"
"rtems_object_get_classic_name #2"
);
puts( "rtems_object_get_classic_name - INVALID_ID (unallocated index)" );
status = rtems_object_get_classic_name( main_task + 1, &main_name );
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_object_get_classic_name #4"
);
puts( "rtems_object_get_classic_name - INVALID_ID (bad API)" );
tmpId = rtems_build_id( 0xff, OBJECTS_RTEMS_TASKS, 1, 1 ),
status = rtems_object_get_classic_name( tmpId, &main_name );
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_object_get_classic_name #5"
);
status = rtems_object_get_classic_name( main_task, &main_name );
@@ -118,21 +157,37 @@ rtems_task Init(
printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
/*
* rtems_object_set_name - change name of init task
* rtems_object_set_name - errors
*/
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" );
puts( "rtems_object_set_name - INVALID_ID (bad API)" );
tmpId = rtems_build_id( 0xff, OBJECTS_RTEMS_TASKS, 1, 1 ),
status = rtems_object_set_name( tmpId, newName );
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_object_set_name #1"
);
status = rtems_object_get_classic_name( main_task, &main_name );
directive_failed( status, "rtems_object_get_classic_name" );
put_name( main_name, FALSE );
puts( " - name returned by rtems_object_get_classic_name" );
puts( "rtems_object_set_name - INVALID_ID (bad index)" );
status = rtems_object_set_name( main_task + 10, newName );
fatal_directive_status(
status,
RTEMS_INVALID_ID,
"rtems_object_set_name #2"
);
ptr = rtems_object_get_name( main_task, 5, name );
rtems_test_assert(ptr != NULL);
printf( "rtems_object_get_name returned (%s) for init task\n", ptr );
/*
* rtems_object_set_name - change name of init task in various ways.
*
* 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( "" );
/*
* Exercise id build and extraction routines
@@ -177,6 +232,10 @@ rtems_task Init(
rtems_object_api_minimum_class(0) );
printf( "rtems_object_api_maximum_class(0) returned %d\n",
rtems_object_api_maximum_class(0) );
printf( "rtems_object_api_minimum_class(255) returned %d\n",
rtems_object_api_minimum_class(255) );
printf( "rtems_object_api_maximum_class(255) returned %d\n",
rtems_object_api_maximum_class(255) );
printf( "rtems_object_api_minimum_class(OBJECTS_INTERNAL_API) returned %d\n",
rtems_object_api_minimum_class(OBJECTS_INTERNAL_API) );
@@ -188,31 +247,24 @@ rtems_task Init(
printf( "rtems_object_api_maximum_class(OBJECTS_CLASSIC_API) returned %d\n",
rtems_object_api_maximum_class(OBJECTS_CLASSIC_API) );
printf( "rtems_object_api_minimum_class(OBJECTS_POSIX_API) returned %d\n",
rtems_object_api_minimum_class(OBJECTS_POSIX_API) );
printf( "rtems_object_api_maximum_class(OBJECTS_POSIX_API) returned %d\n",
rtems_object_api_maximum_class(OBJECTS_POSIX_API) );
printf( "rtems_object_api_minimum_class(OBJECTS_ITRON_API) returned %d\n",
rtems_object_api_minimum_class(OBJECTS_ITRON_API) );
printf( "rtems_object_api_maximum_class(OBJECTS_ITRON_API) returned %d\n",
rtems_object_api_maximum_class(OBJECTS_ITRON_API) );
/*
* Another screen break for the API and class name tests
*/
rtems_test_pause();
printf( "rtems_object_get_api_name(0) = %s\n", rtems_object_get_api_name(0) );
printf( "rtems_object_get_api_name(255) = %s\n", rtems_object_get_api_name(255));
printf( "rtems_object_get_api_name(255) = %s\n",
rtems_object_get_api_name(255));
printf( "rtems_object_get_api_name(INTERNAL_API) = %s\n",
rtems_object_get_api_name(OBJECTS_INTERNAL_API) );
printf( "rtems_object_get_api_name(CLASSIC_API) = %s\n",
rtems_object_get_api_name(OBJECTS_CLASSIC_API) );
printf( "rtems_object_get_api_name(POSIX_API) = %s\n",
rtems_object_get_api_name(OBJECTS_POSIX_API) );
printf( "rtems_object_get_api_name(ITRON_API) = %s\n",
rtems_object_get_api_name(OBJECTS_ITRON_API) );
@@ -220,8 +272,12 @@ rtems_task Init(
rtems_object_get_api_class_name( 0, OBJECTS_RTEMS_TASKS ) );
printf( "rtems_object_get_api_class_name(CLASSIC_API, 0) = %s\n",
rtems_object_get_api_class_name( OBJECTS_CLASSIC_API, 0 ) );
printf( "rtems_object_get_api_class_name(CLASSIC_API, RTEMS_BARRIERS) = %s\n",
rtems_object_get_api_class_name(OBJECTS_CLASSIC_API, OBJECTS_RTEMS_BARRIERS));
printf("rtems_object_get_api_class_name(INTERNAL_API, MUTEXES) = %s\n",
rtems_object_get_api_class_name(
OBJECTS_INTERNAL_API, OBJECTS_INTERNAL_MUTEXES));
printf("rtems_object_get_api_class_name(CLASSIC_API, RTEMS_BARRIERS) = %s\n",
rtems_object_get_api_class_name(
OBJECTS_CLASSIC_API, OBJECTS_RTEMS_BARRIERS));
/*
* Another screen break for the information
@@ -239,7 +295,8 @@ rtems_task Init(
);
puts( "rtems_object_get_class_information - INVALID_NUMBER (bad API)" );
status = rtems_object_get_class_information(0, OBJECTS_INTERNAL_THREADS, &info);
status =
rtems_object_get_class_information(0, OBJECTS_INTERNAL_THREADS, &info);
fatal_directive_status(
status,
RTEMS_INVALID_NUMBER,
@@ -247,7 +304,8 @@ rtems_task Init(
);
puts( "rtems_object_get_class_information - INVALID_NUMBER (bad class)" );
status = rtems_object_get_class_information( OBJECTS_INTERNAL_API, 0, &info );
status =
rtems_object_get_class_information( OBJECTS_INTERNAL_API, 0, &info );
fatal_directive_status(
status,
RTEMS_INVALID_NUMBER,
Binary file not shown.