diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-13 19:28:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-13 19:28:14 +0000 |
commit | 500fd53e09a9880ba010a243d5687469bc005748 (patch) | |
tree | 90a3daf226ac69756662d7c878b8190a23ea17ee /rtems-test-template | |
parent | 0258ba5b965cda6fdfff8d22cba19e2dac670926 (diff) |
2011-06-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxtmtest_single/init.c: Fine tune a bit.
* smptest/TEST.doc, smptest/TEST.scn, smptest/init.c: New files.
Diffstat (limited to 'rtems-test-template')
-rw-r--r-- | rtems-test-template/ChangeLog | 5 | ||||
-rw-r--r-- | rtems-test-template/psxtmtest_single/init.c | 11 | ||||
-rw-r--r-- | rtems-test-template/smptest/TEST.doc | 22 | ||||
-rw-r--r-- | rtems-test-template/smptest/TEST.scn | 1 | ||||
-rw-r--r-- | rtems-test-template/smptest/init.c | 75 |
5 files changed, 110 insertions, 4 deletions
diff --git a/rtems-test-template/ChangeLog b/rtems-test-template/ChangeLog index dca356d..e3885a6 100644 --- a/rtems-test-template/ChangeLog +++ b/rtems-test-template/ChangeLog @@ -1,3 +1,8 @@ +2011-06-13 Joel Sherrill <joel.sherrill@oarcorp.com> + + * psxtmtest_single/init.c: Fine tune a bit. + * smptest/TEST.doc, smptest/TEST.scn, smptest/init.c: New files. + 2011-06-10 Joel Sherrill <joel.sherrill@oarcorp.com> * psxtmtest_single/init.c: More meat. diff --git a/rtems-test-template/psxtmtest_single/init.c b/rtems-test-template/psxtmtest_single/init.c index 4dcdf9a..741a6de 100644 --- a/rtems-test-template/psxtmtest_single/init.c +++ b/rtems-test-template/psxtmtest_single/init.c @@ -9,9 +9,12 @@ * $Id$ */ -#include <coverhd.h> -#include <tmacros.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <timesys.h> +#include <rtems/timerdrv.h> #include "test_support.h" void *POSIX_Init( @@ -20,7 +23,7 @@ void *POSIX_Init( { long end_time; - puts( "\n\n*** POSIX TIME TEST @DESC@ ***" ); + puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" ); /* XXX any required initialization goes here */ @@ -38,7 +41,7 @@ void *POSIX_Init( 0 ); - puts( "*** END OF POSIX TIME TEST @DESC@ ***" ); + puts( "*** END OF POSIX TIME TEST @UPPER@ ***" ); rtems_test_exit(0); } diff --git a/rtems-test-template/smptest/TEST.doc b/rtems-test-template/smptest/TEST.doc new file mode 100644 index 0000000..5c5378c --- /dev/null +++ b/rtems-test-template/smptest/TEST.doc @@ -0,0 +1,22 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2010. +# 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: @LOWER@ + +directives: + + XXX list them + +concepts: + ++ XXX list them diff --git a/rtems-test-template/smptest/TEST.scn b/rtems-test-template/smptest/TEST.scn new file mode 100644 index 0000000..a636120 --- /dev/null +++ b/rtems-test-template/smptest/TEST.scn @@ -0,0 +1 @@ +XXX fill in with test output diff --git a/rtems-test-template/smptest/init.c b/rtems-test-template/smptest/init.c new file mode 100644 index 0000000..9b384f5 --- /dev/null +++ b/rtems-test-template/smptest/init.c @@ -0,0 +1,75 @@ +/* + * COPYRIGHT (c) 1989-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$ + */ + +#include <tmacros.h> +#include "test_support.h" + +rtems_task Test_task( + rtems_task_argument argument +) +{ + /* XXX something goes here */ +} + +rtems_task Init( + rtems_task_argument argument +) +{ + int i; + char ch; + int cpu_num; + rtems_id id; + rtems_status_code status; + + puts( "\n\n*** TEST @UPPER@ ***" ); + + for ( i=0; i<_SMP_Processor_count-1; i++ ) { + ch = '1' + i; + + status = rtems_task_create( + rtems_build_name( 'T', 'A', ch, ' ' ), + 1, + RTEMS_MINIMUM_STACK_SIZE, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &id + ); + directive_failed( status, "task create" ); + + cpu_num = bsp_smp_processor_id(); + printf(" CPU %d start task TA%c\n", cpu_num, ch); + + status = rtems_task_start( id, Test_task, i+1 ); + directive_failed( status, "task start" ); + } + + /* XXX something goes here */ + + puts( "*** END OF TEST @UPPER@ ***" ); + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_SMP_APPLICATION +#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 2 + +#define CONFIGURE_MAXIMUM_TASKS \ + (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS) +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> +/* end of file */ |