2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>

* sp43/init.c, sp43/sp43.scn: Add code to exercise case where an API
	pointer is NULL when getting an object name.
This commit is contained in:
Joel Sherrill
2010-07-27 21:25:02 +00:00
parent 5b507811d8
commit ec6a5a18c1
3 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp43/init.c, sp43/sp43.scn: Add code to exercise case where an API
pointer is NULL when getting an object name.
2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp11/sp11.scn, sp11/task1.c: Add test case for receiving all events

View File

@@ -473,6 +473,24 @@ rtems_task Init(
);
fatal_directive_status( sc, RTEMS_INVALID_ID, "rtems_semaphore_obtain" );
/*
* Invalid POSIX API pointer on get name
*/
{
void *tmp;
tmp = _Objects_Information_table[OBJECTS_POSIX_API];
_Objects_Information_table[OBJECTS_POSIX_API] = NULL;
puts( "rtems_object_get_classic_name - bad API pointer - INVALID_ID" );
sc = rtems_object_get_classic_name(
rtems_build_id( OBJECTS_POSIX_API, OBJECTS_POSIX_THREADS, 1, 1 ),
&tmpName
);
fatal_directive_status( sc, RTEMS_INVALID_ID, "object_get_classic_name" );
_Objects_Information_table[OBJECTS_POSIX_API] = tmp;
}
puts( "*** END OF TEST 43 ***" );
rtems_test_exit( 0 );
}

View File

@@ -85,4 +85,5 @@ rtems_task_set_priority - clobber internal thread class info
rtems_task_set_priority - use valid Idle thread id again
rtems_task_set_priority - restore internal thread class info
rtems_semaphore_obtain - good but uncreated ID - INVALID_ID - OK
rtems_object_get_classic_name - bad API pointer - INVALID_ID
*** END OF TEST 43 ***