change log for rtems (2011-03-11)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Mar 11 17:10:34 UTC 2011


 *joel*:
2011-03-11	Joel Sherrill <joel.sherrilL at OARcorp.com>

	* Makefile.am, configure.ac: Add sp73.  This is a new test designed
	to improve coverage of the thread yield logic.
	* sp73/.cvsignore, sp73/Makefile.am, sp73/init.c, sp73/sp73.doc,
	sp73/sp73.scn: New files.

M  1.439  testsuites/sptests/ChangeLog
M  1.107  testsuites/sptests/Makefile.am
M  1.114  testsuites/sptests/configure.ac
A    1.1  testsuites/sptests/sp73/.cvsignore
A    1.1  testsuites/sptests/sp73/Makefile.am
A    1.1  testsuites/sptests/sp73/init.c
A    1.1  testsuites/sptests/sp73/sp73.doc
A    1.1  testsuites/sptests/sp73/sp73.scn

diff -u rtems/testsuites/sptests/ChangeLog:1.438 rtems/testsuites/sptests/ChangeLog:1.439
--- rtems/testsuites/sptests/ChangeLog:1.438	Thu Mar 10 10:36:51 2011
+++ rtems/testsuites/sptests/ChangeLog	Fri Mar 11 10:39:27 2011
@@ -1,3 +1,10 @@
+2011-03-11	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+	* Makefile.am, configure.ac: Add sp73.  This is a new test designed
+	to improve coverage of the thread yield logic.
+	* sp73/.cvsignore, sp73/Makefile.am, sp73/init.c, sp73/sp73.doc,
+	sp73/sp73.scn: New files.
+
 2011-03-10	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* sp07/init.c: Improve coverage.

diff -u rtems/testsuites/sptests/Makefile.am:1.106 rtems/testsuites/sptests/Makefile.am:1.107
--- rtems/testsuites/sptests/Makefile.am:1.106	Wed Aug 25 08:05:47 2010
+++ rtems/testsuites/sptests/Makefile.am	Fri Mar 11 10:39:27 2011
@@ -14,7 +14,7 @@
     sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \
     sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
     sp60      sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
-    sp70 sp71 sp72 \
+    sp70 sp71 sp72 sp73 \
     spassoc01 spchain spclockget spcoverage spobjgetnext \
     spnotepad01 spprintk spprivenv01 spsize spstkalloc spthreadq01 \
     spwatchdog spwkspace \

diff -u rtems/testsuites/sptests/configure.ac:1.113 rtems/testsuites/sptests/configure.ac:1.114
--- rtems/testsuites/sptests/configure.ac:1.113	Tue Feb 22 08:54:45 2011
+++ rtems/testsuites/sptests/configure.ac	Fri Mar 11 10:39:27 2011
@@ -98,6 +98,7 @@
 sp70/Makefile
 sp71/Makefile
 sp72/Makefile
+sp73/Makefile
 spassoc01/Makefile
 spchain/Makefile
 spclockget/Makefile

diff -u /dev/null rtems/testsuites/sptests/sp73/.cvsignore:1.1
--- /dev/null	Fri Mar 11 11:10:34 2011
+++ rtems/testsuites/sptests/sp73/.cvsignore	Fri Mar 11 10:39:27 2011
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/sp73/Makefile.am:1.1
--- /dev/null	Fri Mar 11 11:10:34 2011
+++ rtems/testsuites/sptests/sp73/Makefile.am	Fri Mar 11 10:39:27 2011
@@ -0,0 +1,26 @@
+##
+##  $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = sp73 
+sp73_SOURCES = init.c
+
+dist_rtems_tests_DATA = sp73.scn
+dist_rtems_tests_DATA += sp73.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(sp73_OBJECTS) $(sp73_LDADD)
+LINK_LIBS = $(sp73_LDLIBS)
+
+sp73$(EXEEXT): $(sp73_OBJECTS) $(sp73_DEPENDENCIES)
+	@rm -f sp73$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/sp73/init.c:1.1
--- /dev/null	Fri Mar 11 11:10:34 2011
+++ rtems/testsuites/sptests/sp73/init.c	Fri Mar 11 10:39:27 2011
@@ -0,0 +1,107 @@
+/* 
+ *  COPYRIGHT (c) 2011.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <inttypes.h>
+#include "tmacros.h"
+
+rtems_id   Task_id[ 4 ];         /* array of task ids */
+rtems_name Task_name[ 4 ];       /* array of task names */
+
+rtems_task Test_task(
+  rtems_task_argument arg
+)
+{
+  rtems_time_of_day time;
+  uint32_t          task_index;
+  rtems_status_code status;
+
+  task_index = arg;
+  for ( ; ; ) {
+    status = rtems_clock_get_tod( &time );
+    if ( time.second >= 15 ) {
+      puts( "*** END OF SP73 (YIELD) TEST ***" );
+      rtems_test_exit( 0 );
+    }
+    put_name( Task_name[ task_index ], FALSE );
+    print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+    status = rtems_task_wake_after(
+      task_index * 5 * rtems_clock_get_ticks_per_second() );
+  }
+}
+
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code   status;
+  rtems_time_of_day   time;
+  rtems_task_priority old;
+
+  puts( "\n\n*** SP73 (YIELD) TEST ***" );
+
+  time.year   = 1988;
+  time.month  = 12;
+  time.day    = 31;
+  time.hour   = 9;
+  time.minute = 0;
+  time.second = 0;
+  time.ticks  = 0;
+
+  status = rtems_clock_set( &time );
+
+  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, RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
+  );
+  status = rtems_task_create(
+    Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
+  );
+  status = rtems_task_create(
+    Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
+  );
+
+  status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
+  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
+  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
+
+  rtems_task_set_priority(Task_id[1], 1, &old);
+  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+
+  status = rtems_task_delete( RTEMS_SELF );
+}
+
+/* configuration information */
+#define CONFIGURE_SCHEDULER_SIMPLE
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS           4
+
+#define CONFIGURE_INIT_TASK_PRIORITY      2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/sptests/sp73/sp73.doc:1.1
--- /dev/null	Fri Mar 11 11:10:34 2011
+++ rtems/testsuites/sptests/sp73/sp73.doc	Fri Mar 11 10:39:27 2011
@@ -0,0 +1,22 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 2011.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  sp73
+
+directives:
+  + rtems_task_wake_after - yield case
+
+concepts:
+
++ The purpose of this test is to exercise paths in the yield scheduling
+  logic.

diff -u /dev/null rtems/testsuites/sptests/sp73/sp73.scn:1.1
--- /dev/null	Fri Mar 11 11:10:34 2011
+++ rtems/testsuites/sptests/sp73/sp73.scn	Fri Mar 11 10:39:27 2011
@@ -0,0 +1,8 @@
+*** SP73 (YIELD) TEST ***
+TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
+TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
+TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988
+TA1  - rtems_clock_get_tod - 09:00:05   12/31/1988
+TA1  - rtems_clock_get_tod - 09:00:10   12/31/1988
+TA2  - rtems_clock_get_tod - 09:00:10   12/31/1988
+*** END OF SP73 (YIELD) TEST ***



--

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/20110311/1483dda9/attachment-0001.html>


More information about the vc mailing list