summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp09
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-04 22:02:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-04 22:02:18 +0000
commitd05ec0f77313dc15ff4f4253441d56a4ce101530 (patch)
treedcf8b20ddea9a527102741ad299e821fe79f58a0 /testsuites/sptests/sp09
parentadd missing file (diff)
downloadrtems-d05ec0f77313dc15ff4f4253441d56a4ce101530.tar.bz2
2009-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp07/init.c, sp07/sp07.scn, sp09/init.c, sp09/screen01.c, sp09/sp09.scn, sp28/init.c, sp62/init.c, sp62/sp62.scn, sp64/init.c, sp64/sp64.scn: Add more test cases highlighted on SPARC at -O2, x86 at -Os and m68k at -Os. Fix typos.
Diffstat (limited to 'testsuites/sptests/sp09')
-rw-r--r--testsuites/sptests/sp09/init.c37
-rw-r--r--testsuites/sptests/sp09/screen01.c14
-rw-r--r--testsuites/sptests/sp09/sp09.scn4
3 files changed, 35 insertions, 20 deletions
diff --git a/testsuites/sptests/sp09/init.c b/testsuites/sptests/sp09/init.c
index f8b5e8bbb5..12ff5a9b08 100644
--- a/testsuites/sptests/sp09/init.c
+++ b/testsuites/sptests/sp09/init.c
@@ -1,17 +1,5 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
+/*
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -60,6 +48,7 @@ rtems_task Init(
Period_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
+ /* priority of 0 error */
status = rtems_task_create(
Task_name[1],
0,
@@ -73,7 +62,25 @@ rtems_task Init(
RTEMS_INVALID_PRIORITY,
"rtems_task_create with illegal priority"
);
- puts( "INIT - rtems_task_create - RTEMS_INVALID_PRIORITY" );
+ puts( "INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY" );
+
+ /* priority > 255 error */
+ status = rtems_task_create(
+ Task_name[1],
+ 257,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &Task_id[ 1 ]
+ );
+ fatal_directive_status(
+ status,
+ RTEMS_INVALID_PRIORITY,
+ "rtems_task_create with illegal priority"
+ );
+ puts(
+ "INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY"
+ );
status = rtems_task_create(
Task_name[ 1 ],
diff --git a/testsuites/sptests/sp09/screen01.c b/testsuites/sptests/sp09/screen01.c
index 25b41eb5eb..4f94bba4c5 100644
--- a/testsuites/sptests/sp09/screen01.c
+++ b/testsuites/sptests/sp09/screen01.c
@@ -2,10 +2,6 @@
*
* This routine generates error screen 1 for test 9.
*
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
@@ -26,6 +22,16 @@ void Screen1()
rtems_task_priority previous_priority;
rtems_status_code status;
+ /* bad Id */
+ status = rtems_task_is_suspended( 100 );
+ fatal_directive_status(
+ status,
+ RTEMS_INVALID_ID,
+ "rtems_task_set_priority with illegal id"
+ );
+ puts( "TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID" );
+
+ /* bad Id */
status = rtems_task_delete( 100 );
fatal_directive_status(
status,
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index b976bcdbec..89518f9274 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -1,6 +1,8 @@
*** TEST 9 ***
-INIT - rtems_task_create - RTEMS_INVALID_PRIORITY
+INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY
+INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY
INIT - rtems_task_restart - RTEMS_INCORRECT_STATE
+TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID
TA1 - rtems_task_delete - RTEMS_INVALID_ID
TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS
TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER