summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 21:25:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 21:25:02 +0000
commitec6a5a18c11d69c392527b1c17d7a5b3f56965b6 (patch)
tree4798706f7a2880f73c887b54957a2889a5119383 /testsuites/sptests
parent2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-ec6a5a18c11d69c392527b1c17d7a5b3f56965b6.tar.bz2
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.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/ChangeLog5
-rw-r--r--testsuites/sptests/sp43/init.c18
-rw-r--r--testsuites/sptests/sp43/sp43.scn1
3 files changed, 24 insertions, 0 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index a3f513db39..54e6e803fd 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,5 +1,10 @@
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
no wait but the condition is only partially satisfied.
diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c
index 2bfc5df80c..dc3435db17 100644
--- a/testsuites/sptests/sp43/init.c
+++ b/testsuites/sptests/sp43/init.c
@@ -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 );
}
diff --git a/testsuites/sptests/sp43/sp43.scn b/testsuites/sptests/sp43/sp43.scn
index 4b496fe051..37c38026e1 100644
--- a/testsuites/sptests/sp43/sp43.scn
+++ b/testsuites/sptests/sp43/sp43.scn
@@ -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 ***