summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp74
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-26 19:44:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-26 19:44:20 +0000
commit6d94119ed8e4349e7b75fee4ed8e485335b4575b (patch)
tree20c1a9ac7a90fc15d41e16a82ac1a1edede20597 /testsuites/sptests/sp74
parent2011-07-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-6d94119ed8e4349e7b75fee4ed8e485335b4575b.tar.bz2
2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp74/init.c, sp74/sp74.scn: Fix to get the case hit per coverage reports.
Diffstat (limited to 'testsuites/sptests/sp74')
-rw-r--r--testsuites/sptests/sp74/init.c31
-rw-r--r--testsuites/sptests/sp74/sp74.scn1
2 files changed, 5 insertions, 27 deletions
diff --git a/testsuites/sptests/sp74/init.c b/testsuites/sptests/sp74/init.c
index fe0497b177..dce0147d1e 100644
--- a/testsuites/sptests/sp74/init.c
+++ b/testsuites/sptests/sp74/init.c
@@ -15,11 +15,6 @@
#include <tmacros.h>
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-rtems_id Task_id[ 3 ]; /* array of task ids */
-rtems_name Task_name[ 3 ]; /* array of task names */
rtems_task Test_task(
rtems_task_argument index
@@ -35,41 +30,25 @@ rtems_task Init(
rtems_task_argument argument
)
{
- rtems_status_code status;
+ rtems_status_code status;
+ rtems_id id;
puts( "\n\n*** SP74 (YIELD) TEST ***" );
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-
puts( "Create TA1 at higher priority task" );
status = rtems_task_create(
- Task_name[ 1 ],
+ rtems_build_name( 'T', 'A', '1', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
+ &id
);
directive_failed( status, "create 1" );
- puts( "Create TA2 at equal priority task" );
- status = rtems_task_create(
- Task_name[ 2 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "create 2" );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
+ status = rtems_task_start( id, Test_task, 1 );
directive_failed( status, "start 1" );
- status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
- directive_failed( status, "start 2" );
-
puts( "Yield to TA1" );
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "yield" );
diff --git a/testsuites/sptests/sp74/sp74.scn b/testsuites/sptests/sp74/sp74.scn
index a4a01d49e4..71a93a39f3 100644
--- a/testsuites/sptests/sp74/sp74.scn
+++ b/testsuites/sptests/sp74/sp74.scn
@@ -1,6 +1,5 @@
*** SP74 (YIELD) TEST ***
Create TA1 at higher priority task
-Create TA2 at equal priority task
Yield to TA1
Successfully yielded it to higher priority task
*** END OF SP74 TEST ***