change log for rtems (2011-06-11)

rtems-vc at rtems.org rtems-vc at rtems.org
Sat Jun 11 20:10:37 UTC 2011


 *joel*:
2011-06-11	Joel Sherrill <joel.sherrill at oarcorp.com>

	* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c,
	sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c,
	sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc,
	sp03/system.h, sp03/task1.c, sp03/task2.c: Clean up. Update.

M  1.454  testsuites/sptests/ChangeLog
M   1.13  testsuites/sptests/sp01/init.c
M    1.9  testsuites/sptests/sp01/sp01.doc
M   1.16  testsuites/sptests/sp01/system.h
M   1.14  testsuites/sptests/sp01/task1.c
M   1.14  testsuites/sptests/sp02/init.c
M   1.12  testsuites/sptests/sp02/preempt.c
M   1.11  testsuites/sptests/sp02/sp02.doc
M   1.17  testsuites/sptests/sp02/system.h
M   1.19  testsuites/sptests/sp02/task1.c
M   1.13  testsuites/sptests/sp02/task2.c
M   1.13  testsuites/sptests/sp02/task3.c
M   1.14  testsuites/sptests/sp03/init.c
M    1.9  testsuites/sptests/sp03/sp03.doc
M   1.17  testsuites/sptests/sp03/system.h
M   1.11  testsuites/sptests/sp03/task1.c
M   1.13  testsuites/sptests/sp03/task2.c

diff -u rtems/testsuites/sptests/ChangeLog:1.453 rtems/testsuites/sptests/ChangeLog:1.454
--- rtems/testsuites/sptests/ChangeLog:1.453	Sat Jun 11 11:42:05 2011
+++ rtems/testsuites/sptests/ChangeLog	Sat Jun 11 14:26:40 2011
@@ -1,5 +1,12 @@
 2011-06-11	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c,
+	sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c,
+	sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc,
+	sp03/system.h, sp03/task1.c, sp03/task2.c: Clean up. Update.
+
+2011-06-11	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* sp09/screen02.c, sp09/screen13.c, sp09/sp09.scn, sp29/init.c,
 	sp30/sp30.scn, sp32/init.c, spclockget/init.c: Avoid use of
 	deprecated rtems_clock_get() except in spclockget().

diff -u rtems/testsuites/sptests/sp01/init.c:1.12 rtems/testsuites/sptests/sp01/init.c:1.13
--- rtems/testsuites/sptests/sp01/init.c:1.12	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp01/init.c	Sat Jun 11 14:26:40 2011
@@ -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-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -34,6 +22,7 @@
 {
   rtems_time_of_day time;
   rtems_status_code status;
+  rtems_id          id;
 
   puts( "\n\n*** TEST 1 ***" );
 
@@ -41,47 +30,43 @@
   status = rtems_clock_set( &time );
   directive_failed( status, "rtems_clock_set" );
 
-  Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-  Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-  Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
   status = rtems_task_create(
-     Task_name[ 1 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE * 2,
-     RTEMS_INTERRUPT_LEVEL(31),
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 1 ]
+    rtems_build_name( 'T', 'A', '1', ' ' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE * 2,
+    RTEMS_INTERRUPT_LEVEL(31),
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &id
   );
   directive_failed( status, "rtems_task_create of TA1" );
 
+  status = rtems_task_start( id, Task_1_through_3, 1 );
+  directive_failed( status, "rtems_task_start of TA1" );
+
   status = rtems_task_create(
-     Task_name[ 2 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE * 2,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 2 ]
+    rtems_build_name( 'T', 'A', '2', ' ' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE * 2,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &id
   );
   directive_failed( status, "rtems_task_create of TA2" );
 
+  status = rtems_task_start( id, Task_1_through_3, 2 );
+  directive_failed( status, "rtems_task_start of TA2" );
+
   status = rtems_task_create(
-     Task_name[ 3 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE * 3,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 3 ]
+    rtems_build_name( 'T', 'A', '3', ' ' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE * 3,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &id
   );
   directive_failed( status, "rtems_task_create of TA3" );
 
-  status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
-  directive_failed( status, "rtems_task_start of TA1" );
-
-  status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
-  directive_failed( status, "rtems_task_start of TA2" );
-
-  status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
+  status = rtems_task_start( id, Task_1_through_3, 3 );
   directive_failed( status, "rtems_task_start of TA3" );
 
   status = rtems_task_delete( RTEMS_SELF );

diff -u rtems/testsuites/sptests/sp01/sp01.doc:1.8 rtems/testsuites/sptests/sp01/sp01.doc:1.9
--- rtems/testsuites/sptests/sp01/sp01.doc:1.8	Wed Jul  1 14:23:58 2009
+++ rtems/testsuites/sptests/sp01/sp01.doc	Sat Jun 11 14:26:40 2011
@@ -1,7 +1,7 @@
 #
 #  $Id$
 #
-#  COPYRIGHT (c) 1989-1999.
+#  COPYRIGHT (c) 1989-2011.
 #  On-Line Applications Research Corporation (OAR).
 #
 #  The license and distribution terms for this file may be
@@ -9,37 +9,33 @@
 #  http://www.rtems.com/license/LICENSE.
 #
 
-This file describes the directives and concepts tested by this test set.
-
-test set name:  test1
+test name:  sp01
 
 directives:
-  ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
-  tm_set, tm_get, tm_wkafter
+  rtems_task_create
+  rtems_task_start
+  rtems_task_wake_after
+  rtems_clock_set
+  rtems_clock_get
+  rtems_clock_tick
+  rtems_task_self
+  rtems_object_get_classic_name
 
 concepts:
 
-  a.  Verifies system can create and start both the executive's system
-      initialization and idle task.
-
-  b.  Verifies executive can swap between three application tasks at the
-      same priority and the executive's internal idle task.
-
-  c.  Verifies can print strings to the CRT on port 2 of the mvme136 board
-      using Print and Println in the board support package.
++ Verifies executive initialization performed correctly.
 
-  d.  Verifies interrupt handler can handle a task switch from an interrupt
-      as specified with the i_return directive.
++ Verifies system can create and start both the executive's system
+  initialization and idle task.
 
-  e.  Verifies executive initialization performed correctly.
++ Verifies executive can swap between three application tasks at the
+  same priority and the executive's internal idle task.
 
-  f.  Verifies the executive trap handler except for the halt function.
++ Verifies can print strings using stdio and BSP console support.
 
-  g.  Verifies that a task can get the task identification number of itself.
++ Verifies interrupt support can handle a task switch from an interrupt.
 
-  h.  Verifies implementation of SuperCore TOD_MILLISECONDS_TO_TICKS.  Normal
-      computation in applications is via a macro at the Classic API level.
++ Verifies that a task can get the task identification number of itself.
 
-output:
- "TA1" is printed once every 5 seconds.  "TA2" is printed once
- every 10 seconds.  "TA3" is printed once every 15 seconds.
++ Verifies implementation of SuperCore TOD_MILLISECONDS_TO_TICKS.  Normal
+  computation in applications is via a macro at the Classic API level.

diff -u rtems/testsuites/sptests/sp01/system.h:1.15 rtems/testsuites/sptests/sp01/system.h:1.16
--- rtems/testsuites/sptests/sp01/system.h:1.15	Thu Apr  1 09:16:29 2004
+++ rtems/testsuites/sptests/sp01/system.h	Sat Jun 11 14:26:40 2011
@@ -1,9 +1,5 @@
-/*  system.h
- *
- *  This include file contains information that is included in every
- *  function in the test set.
- *
- *  COPYRIGHT (c) 1989-1999.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -39,7 +35,4 @@
 
 /* global variables */
 
-TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
-
 /* end of include file */

diff -u rtems/testsuites/sptests/sp01/task1.c:1.13 rtems/testsuites/sptests/sp01/task1.c:1.14
--- rtems/testsuites/sptests/sp01/task1.c:1.13	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp01/task1.c	Sat Jun 11 14:26:40 2011
@@ -1,14 +1,5 @@
-/*  Task_1_through_3
- *
- *  This routine serves as a test task.  It verifies the basic task
- *  switching capabilities of the executive.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-1999.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -25,23 +16,23 @@
 #include "system.h"
 
 rtems_task Task_1_through_3(
-  rtems_task_argument argument
+  rtems_task_argument index
 )
 {
-  rtems_id          tid;
   rtems_time_of_day time;
   rtems_status_code status;
   rtems_interval    ticks;
+  rtems_name        name;
 
-  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
-  directive_failed( status, "rtems_task_ident" );
+  status = rtems_object_get_classic_name( rtems_task_self(), &name );
+  directive_failed( status, "rtems_object_get_classic_name" );
 
   /*
    * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to
    * test C implementation in SuperCore -- not macro version used
    * everywhere else.
    */
-  ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
+  ticks = TOD_MILLISECONDS_TO_TICKS( index * 5 * 1000 );
 
   while( FOREVER ) {
     status = rtems_clock_get_tod( &time );
@@ -52,7 +43,7 @@
       rtems_test_exit( 0 );
     }
 
-    put_name( Task_name[ task_number( tid ) ], FALSE );
+    put_name( name, FALSE );
     print_time( " - rtems_clock_get_tod - ", &time, "\n" );
 
     status = rtems_task_wake_after( ticks );

diff -u rtems/testsuites/sptests/sp02/init.c:1.13 rtems/testsuites/sptests/sp02/init.c:1.14
--- rtems/testsuites/sptests/sp02/init.c:1.13	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp02/init.c	Sat Jun 11 14:26:40 2011
@@ -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-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -33,22 +21,21 @@
 )
 {
   rtems_status_code status;
+  rtems_id          preempt_task_id;
 
   puts( "\n\n*** TEST 2 ***" );
 
-  Preempt_task_name =  rtems_build_name( 'P', 'R', 'M', 'T' );
-
   status = rtems_task_create(
-     Preempt_task_name,
-     1,
-     RTEMS_MINIMUM_STACK_SIZE,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Preempt_task_id
+    rtems_build_name( 'P', 'R', 'M', 'T' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &preempt_task_id
   );
   directive_failed( status, "rtems_task_create of RTEMS_PREEMPT" );
 
-  status = rtems_task_start( Preempt_task_id, Preempt_task, 0 );
+  status = rtems_task_start( preempt_task_id, Preempt_task, 0 );
   directive_failed( status, "rtems_task_start of RTEMS_PREEMPT" );
 
   puts( "INIT - rtems_task_wake_after - yielding processor" );
@@ -112,41 +99,41 @@
   directive_failed( status, "rtems_task_delete of TA3" );
 
   status = rtems_task_create(
-     Task_name[ 1 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 1 ]
+    Task_name[ 1 ],
+    1,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Task_id[ 1 ]
   );
   directive_failed( status, "rtems_task_create of TA1" );
 
+  status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
+  directive_failed( status, "rtems_task_start of TA1" );
+
   status = rtems_task_create(
-     Task_name[ 2 ],
-     3,
-     RTEMS_MINIMUM_STACK_SIZE,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 2 ]
+    Task_name[ 2 ],
+    3,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Task_id[ 2 ]
   );
   directive_failed( status, "rtems_task_create of TA2" );
 
+  status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
+  directive_failed( status, "rtems_task_start of TA2" );
+
   status = rtems_task_create(
-     Task_name[ 3 ],
-     3,
-     RTEMS_MINIMUM_STACK_SIZE,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 3 ]
+    Task_name[ 3 ],
+    3,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Task_id[ 3 ]
   );
   directive_failed( status, "rtems_task_create of TA3" );
 
-  status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
-  directive_failed( status, "rtems_task_start of TA1" );
-
-  status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
-  directive_failed( status, "rtems_task_start of TA2" );
-
   status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
   directive_failed( status, "rtems_task_start of TA3" );
 

diff -u rtems/testsuites/sptests/sp02/preempt.c:1.11 rtems/testsuites/sptests/sp02/preempt.c:1.12
--- rtems/testsuites/sptests/sp02/preempt.c:1.11	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp02/preempt.c	Sat Jun 11 14:26:40 2011
@@ -1,13 +1,5 @@
-/*  Preempt_task
- *
- *  This routine serves as a test task.  It verifies the task manager.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-1999.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be

diff -u rtems/testsuites/sptests/sp02/sp02.doc:1.10 rtems/testsuites/sptests/sp02/sp02.doc:1.11
--- rtems/testsuites/sptests/sp02/sp02.doc:1.10	Fri Jun 12 09:01:50 2009
+++ rtems/testsuites/sptests/sp02/sp02.doc	Sat Jun 11 14:26:40 2011
@@ -1,7 +1,7 @@
 #
 #  $Id$
 #
-#  COPYRIGHT (c) 1989-2009.
+#  COPYRIGHT (c) 1989-2011.
 #  On-Line Applications Research Corporation (OAR).
 #
 #  The license and distribution terms for this file may be
@@ -9,31 +9,30 @@
 #  http://www.rtems.com/license/LICENSE.
 #
 
-
-This file describes the directives and concepts tested by this test set.
-
-test set name:  test2
+test set name:  sp02
 
 directives:
-  ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
-  t_delete, tm_wkafter, t_setpri, t_suspend
+  rtems_task_create
+  rtems_task_start
+  rtems_task_wake_after
+  rtems_clock_set
+  rtems_clock_get
+  rtems_clock_tick
+  rtems_task_set_priority
+  rtems_object_get_classic_name
+  rtems_task_suspend
 
 concepts:
 
-  a.  Verifies that a task can delete another task and also delete itself.
-
-  b.  Verifies that memory is freed back to the heap correctly.
-
-  c.  Verifies that TCBs are freed back to the inactive chain correctly.
++ Verifies that a task can delete another task and also delete itself.
 
-  d.  Verifies that a task can get the task identification number of
-      another task.
++ Verifies that memory is freed back to the heap correctly.
 
-  e.  Verifies the _Set_state routine where the task is not READY.
++ Verifies that TCBs are freed back to the inactive chain correctly.
 
-  f.  Verifies the break statement in the _Block_activate routine.
++ Verifies that a task can get the task ID of another task.
 
-  g.  Verifies the while loop in the _Prev_tcb routine.
++ Verifies the blocking routine where the task is not READY.
 
-  h.  Verify behavior when the IDLE task's stack is configured for
-      less than the minimum stack size.
++ Verifies behavior when the IDLE task's stack is configured for
+  more than the minimum stack size.

diff -u rtems/testsuites/sptests/sp02/system.h:1.16 rtems/testsuites/sptests/sp02/system.h:1.17
--- rtems/testsuites/sptests/sp02/system.h:1.16	Fri Jun 12 09:01:50 2009
+++ rtems/testsuites/sptests/sp02/system.h	Sat Jun 11 14:26:40 2011
@@ -1,9 +1,5 @@
-/*  system.h
- *
- *  This include file contains information that is included in every
- *  function in the test set.
- *
- *  COPYRIGHT (c) 1989-2009.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -58,7 +54,4 @@
 TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
 TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
 
-TEST_EXTERN rtems_id   Preempt_task_id;         /* preempt task id */
-TEST_EXTERN rtems_name Preempt_task_name;       /* preempt task name */
-
 /* end of include file */

diff -u rtems/testsuites/sptests/sp02/task1.c:1.18 rtems/testsuites/sptests/sp02/task1.c:1.19
--- rtems/testsuites/sptests/sp02/task1.c:1.18	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp02/task1.c	Sat Jun 11 14:26:41 2011
@@ -1,13 +1,5 @@
-/*  Task_1
- *
- *  This routine serves as a test task.  It verifies the task manager.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-2009.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -40,7 +32,9 @@
   status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid2 );
   directive_failed( status, "rtems_task_ident of TA2" );
 
-  printf( "TA1 - rtems_task_ident - tid of TA2 (0x%.8" PRIxrtems_id ")\n", tid2 );
+  printf(
+    "TA1 - rtems_task_ident - tid of TA2 (0x%.8" PRIxrtems_id ")\n", tid2
+  );
   status = rtems_object_get_classic_name( tid2, &tid2_name );
   directive_failed( status, "rtems_object_get_classic_name of TA2" );
 
@@ -50,14 +44,15 @@
   status = rtems_task_ident( Task_name[ 3 ], RTEMS_SEARCH_ALL_NODES, &tid3 );
   directive_failed( status, "rtems_task_ident of TA3" );
 
-  printf( "TA1 - rtems_task_ident - tid of TA3 (0x%.8" PRIxrtems_id ")\n", tid3 );
+  printf(
+    "TA1 - rtems_task_ident - tid of TA3 (0x%.8" PRIxrtems_id ")\n", tid3
+  );
 
   status = rtems_task_set_priority( tid3, 2, &previous_priority );
   directive_failed( status, "rtems_task_set_priority" );
 
   puts( "TA1 - rtems_task_set_priority - set TA3's priority to 2" );
 
-
   puts( "TA1 - rtems_task_suspend - suspend TA2" );
   status = rtems_task_suspend( tid2 );
   directive_failed( status, "rtems_task_suspend of TA2" );
@@ -67,7 +62,7 @@
   directive_failed( status, "rtems_task_delete of TA2" );
 
   puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
-  status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
+  status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
   directive_failed( status, "rtems_task_wake_after" );
 
   puts( "*** END OF TEST 2 ***" );

diff -u rtems/testsuites/sptests/sp02/task2.c:1.12 rtems/testsuites/sptests/sp02/task2.c:1.13
--- rtems/testsuites/sptests/sp02/task2.c:1.12	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp02/task2.c	Sat Jun 11 14:26:41 2011
@@ -1,15 +1,5 @@
-/*  Task_2
- *
- *  This routine serves as a test task.  It sleeps for 1 minute but
- *  does not expect to wake up.  Task 1 should suspend then delete it
- *  so that it appears to never wake up.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-2009.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be

diff -u rtems/testsuites/sptests/sp02/task3.c:1.12 rtems/testsuites/sptests/sp02/task3.c:1.13
--- rtems/testsuites/sptests/sp02/task3.c:1.12	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp02/task3.c	Sat Jun 11 14:26:41 2011
@@ -1,14 +1,5 @@
-/*  Task_3
- *
- *  This routine serves as a test task.  It simply sleeps for 5 seconds
- *  and then deletes itself.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-2009.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be

diff -u rtems/testsuites/sptests/sp03/init.c:1.13 rtems/testsuites/sptests/sp03/init.c:1.14
--- rtems/testsuites/sptests/sp03/init.c:1.13	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp03/init.c	Sat Jun 11 14:26:41 2011
@@ -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-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -33,36 +21,34 @@
 )
 {
   rtems_status_code status;
+  rtems_id          id;
 
   puts( "\n\n*** TEST 3 ***" );
 
-  Task_name[ 1 ] =  rtems_build_name( 'T', 'A', '1', ' ' );
-  Task_name[ 2 ] =  rtems_build_name( 'T', 'A', '2', ' ' );
-
   status = rtems_task_create(
-     Task_name[ 1 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE * 2,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 1 ]
+    rtems_build_name( 'T', 'A', '1', ' ' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE * 2,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &id
   );
   directive_failed( status, "rtems_task_create of TA1" );
 
+  status = rtems_task_start( id, Task_1, 0 );
+  directive_failed( status, "rtems_task_start of TA1" );
+
   status = rtems_task_create(
-     Task_name[ 2 ],
-     1,
-     RTEMS_MINIMUM_STACK_SIZE,
-     RTEMS_DEFAULT_MODES,
-     RTEMS_DEFAULT_ATTRIBUTES,
-     &Task_id[ 2 ]
+    rtems_build_name( 'T', 'A', '2', ' ' ),
+    1,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &id
   );
   directive_failed( status, "rtems_task_create of TA2" );
 
-  status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
-  directive_failed( status, "rtems_task_start of TA1" );
-
-  status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
+  status = rtems_task_start( id, Task_2, 0 );
   directive_failed( status, "rtems_task_start of TA2" );
 
   status = rtems_task_delete( RTEMS_SELF );

diff -u rtems/testsuites/sptests/sp03/sp03.doc:1.8 rtems/testsuites/sptests/sp03/sp03.doc:1.9
--- rtems/testsuites/sptests/sp03/sp03.doc:1.8	Thu Sep  4 13:53:47 2003
+++ rtems/testsuites/sptests/sp03/sp03.doc	Sat Jun 11 14:26:41 2011
@@ -1,7 +1,7 @@
 #
 #  $Id$
 #
-#  COPYRIGHT (c) 1989-1999.
+#  COPYRIGHT (c) 1989-2011.
 #  On-Line Applications Research Corporation (OAR).
 #
 #  The license and distribution terms for this file may be
@@ -12,12 +12,20 @@
 
 This file describes the directives and concepts tested by this test set.
 
-test set name:  test3
+test set name:  sp03
 
 directives:
-  ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
-  tm_wkwhen, tm_set, tm_get
+  rtems_task_create
+  rtems_task_start
+  rtems_task_wake_after
+  rtems_task_wake_when
+  rtems_clock_set
+  rtems_clock_get
+  rtems_task_self
+  rtems_object_get_classic_name
 
 concepts:
 
-  a.  Verifies conversion routines - _Utd_to_etd and _Etd_to_utd
++ Verifies delay by interval.
+
++ Verifies delay by absolute time.

diff -u rtems/testsuites/sptests/sp03/system.h:1.16 rtems/testsuites/sptests/sp03/system.h:1.17
--- rtems/testsuites/sptests/sp03/system.h:1.16	Fri Apr 16 04:19:05 2004
+++ rtems/testsuites/sptests/sp03/system.h	Sat Jun 11 14:26:41 2011
@@ -1,9 +1,5 @@
-/*  system.h
- *
- *  This include file contains information that is included in every
- *  function in the test set.
- *
- *  COPYRIGHT (c) 1989-1999.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -39,12 +35,8 @@
 #define CONFIGURE_EXTRA_TASK_STACKS         (1 * RTEMS_MINIMUM_STACK_SIZE)
 #define CONFIGURE_MAXIMUM_TASKS             3
 
-
 #include <rtems/confdefs.h>
 
 /* global variables */
 
-TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
-
 /* end of include file */

diff -u rtems/testsuites/sptests/sp03/task1.c:1.10 rtems/testsuites/sptests/sp03/task1.c:1.11
--- rtems/testsuites/sptests/sp03/task1.c:1.10	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp03/task1.c	Sat Jun 11 14:26:41 2011
@@ -1,14 +1,5 @@
-/*  Task_1
- *
- *  This routine serves as a test task.  It verifies the capability to
- *  set and read the executives calender and clock.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-1999.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -30,20 +21,24 @@
 {
   rtems_status_code status;
   rtems_time_of_day time;
+  rtems_name        name;
+
+  status = rtems_object_get_classic_name( rtems_task_self(), &name );
+  directive_failed( status, "rtems_object_get_classic_name" );
 
   build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
 
   status = rtems_clock_set( &time );
   directive_failed( status, "rtems_clock_set" );
 
-  put_name( Task_name[ 1 ], FALSE );
+  put_name( name, FALSE );
   print_time( " sets clock: ", &time, "\n" );
 
   while( FOREVER ) {
     status = rtems_clock_get_tod( &time );
     directive_failed( status, "rtems_clock_get_tod" );
 
-    put_name( Task_name[ 1 ], FALSE );
+    put_name( name, FALSE );
     print_time( " going to sleep:  ", &time, "\n" );
 
     time.second += 5;
@@ -56,7 +51,7 @@
     status = rtems_task_wake_when( &time );
     directive_failed( status, "rtems_task_wake_when" );
 
-    put_name( Task_name[ 1 ], FALSE );
+    put_name( name, FALSE );
     print_time( " awakened:  ", &time, "\n" );
   }
 }

diff -u rtems/testsuites/sptests/sp03/task2.c:1.12 rtems/testsuites/sptests/sp03/task2.c:1.13
--- rtems/testsuites/sptests/sp03/task2.c:1.12	Tue Feb 22 01:36:57 2011
+++ rtems/testsuites/sptests/sp03/task2.c	Sat Jun 11 14:26:41 2011
@@ -1,14 +1,5 @@
-/*  Task_2
- *
- *  This routine serves as a test task.  It repeatedly gets the system time
- *  and date, converts it to printable form, and print it.
- *
- *  Input parameters:
- *    argument - task argument
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-2009.
+/*
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -30,6 +21,10 @@
 {
   rtems_status_code status;
   rtems_time_of_day time;
+  rtems_name        name;
+
+  status = rtems_object_get_classic_name( rtems_task_self(), &name );
+  directive_failed( status, "rtems_object_get_classic_name" );
 
   while( FOREVER ) {
     status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
@@ -43,7 +38,7 @@
       rtems_test_exit( 0 );
     }
 
-    put_name( Task_name[ 2 ], FALSE );
+    put_name( name, FALSE );
     print_time( "  ", &time, "\n" );
   }
 }



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110611/60d50120/attachment-0001.html>


More information about the vc mailing list