summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp09
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-07 19:39:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-07 19:39:12 +0000
commit6afc8dde54db48eb4c8ec91eb9e3e9b042c0dd02 (patch)
treea198e1566b1e8a32fd53ae8409ffcd09e5781777 /testsuites/sptests/sp09
parent2009-07-07 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-6afc8dde54db48eb4c8ec91eb9e3e9b042c0dd02.tar.bz2
2009-07-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp09/screen01.c, sp09/sp09.scn: Add test for rtems_object_get_classic_name with invalid id.
Diffstat (limited to 'testsuites/sptests/sp09')
-rw-r--r--testsuites/sptests/sp09/screen01.c15
-rw-r--r--testsuites/sptests/sp09/sp09.scn1
2 files changed, 13 insertions, 3 deletions
diff --git a/testsuites/sptests/sp09/screen01.c b/testsuites/sptests/sp09/screen01.c
index 3de2811d8d..7edd55ef2d 100644
--- a/testsuites/sptests/sp09/screen01.c
+++ b/testsuites/sptests/sp09/screen01.c
@@ -6,7 +6,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -20,7 +20,8 @@
void Screen1()
{
- uint32_t notepad_value;
+ uint32_t notepad_value;
+ rtems_name task_name;
rtems_id self_id;
rtems_task_priority previous_priority;
rtems_status_code status;
@@ -93,9 +94,17 @@ void Screen1()
"rtems_task_get_note with no tasks in API"
);
+ puts( "TA1 - rtems_object_get_classic_name - bad ID" );
+ status = rtems_object_get_classic_name(
+ rtems_build_id( OBJECTS_ITRON_API, OBJECTS_ITRON_TASKS, 1, 1 ),
+ &task_name
+ );
+ fatal_directive_status( status, RTEMS_INVALID_ID,
+ "rtems_object_get_classic_name 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" );
-
if ( self_id != Task_id[ 1 ] ) {
puts( "ERROR - rtems_task_ident - incorrect ID returned!" );
}
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index 9d0d807f03..44afce8015 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -6,6 +6,7 @@ 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 (no tasks in API)
+TA1 - rtems_object_get_classic_name - bad ID
TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
TA1 - rtems_task_ident - local RTEMS_INVALID_NAME