summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-03-20 14:56:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-03-20 14:56:45 +0000
commitfabacfedb8d6d281000f616e8902bde8187b2c69 (patch)
tree5bb1ae9d17dc02a555c1cfc45bc50845f58becf0
parentab09d0836688fcb9245941b87ba54ee7d8546301 (diff)
downloadrtems-fabacfedb8d6d281000f616e8902bde8187b2c69.tar.bz2
2002-03-20 Chris Johns <ccj@acm.org>
* PR145. * sp04/task1.c, sp04/tswitch.c: Test fails if other tasks present in system (e.g. driver tasks). Also exit on minimum number of switches not precise number.
-rw-r--r--c/src/tests/sptests/ChangeLog7
-rw-r--r--c/src/tests/sptests/sp04/task1.c2
-rw-r--r--c/src/tests/sptests/sp04/tswitch.c2
-rw-r--r--testsuites/sptests/ChangeLog7
-rw-r--r--testsuites/sptests/sp04/task1.c2
-rw-r--r--testsuites/sptests/sp04/tswitch.c2
6 files changed, 18 insertions, 4 deletions
diff --git a/c/src/tests/sptests/ChangeLog b/c/src/tests/sptests/ChangeLog
index 8611d8a020..ca36407df6 100644
--- a/c/src/tests/sptests/ChangeLog
+++ b/c/src/tests/sptests/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-20 Chris Johns <ccj@acm.org>
+
+ * PR145.
+ * sp04/task1.c, sp04/tswitch.c: Test fails if other tasks present
+ in system (e.g. driver tasks). Also exit on minimum number of
+ switches not precise number.
+
2001-01-29 Joel Sherrill <joel@OARcorp.com>
* Fixed bug where resetting a timer that was not at the head
diff --git a/c/src/tests/sptests/sp04/task1.c b/c/src/tests/sptests/sp04/task1.c
index cbaa831890..a2fb9bf75d 100644
--- a/c/src/tests/sptests/sp04/task1.c
+++ b/c/src/tests/sptests/sp04/task1.c
@@ -74,7 +74,7 @@ rtems_task Task_1(
directive_failed( status, "rtems_task_resume of TA3" );
while ( FOREVER ) {
- if ( Run_count[ 1 ] == 3 ) {
+ if ( Run_count[ 1 ] >= 3 ) {
puts( "TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT" );
status = rtems_task_mode(
diff --git a/c/src/tests/sptests/sp04/tswitch.c b/c/src/tests/sptests/sp04/tswitch.c
index a573adbb1e..689dd623d3 100644
--- a/c/src/tests/sptests/sp04/tswitch.c
+++ b/c/src/tests/sptests/sp04/tswitch.c
@@ -35,7 +35,7 @@ rtems_extension Task_switch(
rtems_time_of_day time;
rtems_status_code status;
- index = task_number( heir->Object.id );
+ index = task_number( heir->Object.id ) - task_number( Task_id[1] ) + 1;
switch( index ) {
case 1:
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index 8611d8a020..ca36407df6 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-20 Chris Johns <ccj@acm.org>
+
+ * PR145.
+ * sp04/task1.c, sp04/tswitch.c: Test fails if other tasks present
+ in system (e.g. driver tasks). Also exit on minimum number of
+ switches not precise number.
+
2001-01-29 Joel Sherrill <joel@OARcorp.com>
* Fixed bug where resetting a timer that was not at the head
diff --git a/testsuites/sptests/sp04/task1.c b/testsuites/sptests/sp04/task1.c
index cbaa831890..a2fb9bf75d 100644
--- a/testsuites/sptests/sp04/task1.c
+++ b/testsuites/sptests/sp04/task1.c
@@ -74,7 +74,7 @@ rtems_task Task_1(
directive_failed( status, "rtems_task_resume of TA3" );
while ( FOREVER ) {
- if ( Run_count[ 1 ] == 3 ) {
+ if ( Run_count[ 1 ] >= 3 ) {
puts( "TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT" );
status = rtems_task_mode(
diff --git a/testsuites/sptests/sp04/tswitch.c b/testsuites/sptests/sp04/tswitch.c
index a573adbb1e..689dd623d3 100644
--- a/testsuites/sptests/sp04/tswitch.c
+++ b/testsuites/sptests/sp04/tswitch.c
@@ -35,7 +35,7 @@ rtems_extension Task_switch(
rtems_time_of_day time;
rtems_status_code status;
- index = task_number( heir->Object.id );
+ index = task_number( heir->Object.id ) - task_number( Task_id[1] ) + 1;
switch( index ) {
case 1: