diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-11-05 19:33:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-11-05 19:33:03 +0000 |
commit | 0de10d21fb3888ec1d3fe1240f6c4597f4bbc594 (patch) | |
tree | 4e32916390be84b0c23e168ac5eb429ab218829c /rtems-test-template | |
parent | 0556e28e267b0e5674f8011df85bcacbcc1412d6 (diff) |
2010-11-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxtest/Makefile.am, psxtest/TEST.doc, psxtest/TEST.scn,
psxtest/init.c, psxtest_with_thread/.init.c.swp,
psxtest_with_thread/Makefile.am, psxtest_with_thread/TEST.doc,
psxtest_with_thread/TEST.scn, psxtest_with_thread/init.c,
psxtmtest_blocking/Makefile.am, psxtmtest_blocking/TEST.doc,
psxtmtest_blocking/init.c, psxtmtest_single/Makefile.am,
psxtmtest_single/TEST.doc, psxtmtest_single/init.c,
sptest_with_task/Makefile.am, sptest_with_task/TEST.doc,
sptest_with_task/TEST.scn, sptest_with_task/init.c: New files.
Diffstat (limited to 'rtems-test-template')
20 files changed, 521 insertions, 0 deletions
diff --git a/rtems-test-template/ChangeLog b/rtems-test-template/ChangeLog index f2a78fe..17bb264 100644 --- a/rtems-test-template/ChangeLog +++ b/rtems-test-template/ChangeLog @@ -1,3 +1,15 @@ +2010-11-05 Joel Sherrill <joel.sherrill@oarcorp.com> + + * psxtest/Makefile.am, psxtest/TEST.doc, psxtest/TEST.scn, + psxtest/init.c, psxtest_with_thread/.init.c.swp, + psxtest_with_thread/Makefile.am, psxtest_with_thread/TEST.doc, + psxtest_with_thread/TEST.scn, psxtest_with_thread/init.c, + psxtmtest_blocking/Makefile.am, psxtmtest_blocking/TEST.doc, + psxtmtest_blocking/init.c, psxtmtest_single/Makefile.am, + psxtmtest_single/TEST.doc, psxtmtest_single/init.c, + sptest_with_task/Makefile.am, sptest_with_task/TEST.doc, + sptest_with_task/TEST.scn, sptest_with_task/init.c: New files. + 2010-07-05 Joel Sherrill <joel.sherrill@oarcorp.com> * sptest_operation_from_tsr/init.c: Update year. diff --git a/rtems-test-template/psxtest/Makefile.am b/rtems-test-template/psxtest/Makefile.am new file mode 100644 index 0000000..eb0e447 --- /dev/null +++ b/rtems-test-template/psxtest/Makefile.am @@ -0,0 +1,25 @@ +## +## $Id$ +## + +rtems_tests_PROGRAMS = @LOWER@ +@LOWER@_SOURCES = init.c + +dist_rtems_tests_DATA = @LOWER@.scn +dist_rtems_tests_DATA += @LOWER@.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(@LOWER@_OBJECTS) $(@LOWER@_LDADD) +LINK_LIBS = $(@LOWER@_LDLIBS) + +@LOWER@$(EXEEXT): $(@LOWER@_OBJECTS) $(@LOWER@_DEPENDENCIES) + @rm -f @LOWER@$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/rtems-test-template/psxtest/TEST.doc b/rtems-test-template/psxtest/TEST.doc new file mode 100644 index 0000000..5c5378c --- /dev/null +++ b/rtems-test-template/psxtest/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/psxtest/TEST.scn b/rtems-test-template/psxtest/TEST.scn new file mode 100644 index 0000000..a636120 --- /dev/null +++ b/rtems-test-template/psxtest/TEST.scn @@ -0,0 +1 @@ +XXX fill in with test output diff --git a/rtems-test-template/psxtest/init.c b/rtems-test-template/psxtest/init.c new file mode 100644 index 0000000..66a5986 --- /dev/null +++ b/rtems-test-template/psxtest/init.c @@ -0,0 +1,39 @@ +/* + * 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. + * + * $Id$ + */ + +#include <tmacros.h> +#include "test_support.h" + +void *POSIX_Init( + rtems_task_argument argument +) +{ + puts( "\n\n*** POSIX TEST @DESC@ ***" ); + + /* XXX test code goes here */ + + puts( "*** END OF POSIX TEST @DESC@ ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> +/* end of file */ diff --git a/rtems-test-template/psxtest_with_thread/.init.c.swp b/rtems-test-template/psxtest_with_thread/.init.c.swp Binary files differnew file mode 100644 index 0000000..de7efe4 --- /dev/null +++ b/rtems-test-template/psxtest_with_thread/.init.c.swp diff --git a/rtems-test-template/psxtest_with_thread/Makefile.am b/rtems-test-template/psxtest_with_thread/Makefile.am new file mode 100644 index 0000000..eb0e447 --- /dev/null +++ b/rtems-test-template/psxtest_with_thread/Makefile.am @@ -0,0 +1,25 @@ +## +## $Id$ +## + +rtems_tests_PROGRAMS = @LOWER@ +@LOWER@_SOURCES = init.c + +dist_rtems_tests_DATA = @LOWER@.scn +dist_rtems_tests_DATA += @LOWER@.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(@LOWER@_OBJECTS) $(@LOWER@_LDADD) +LINK_LIBS = $(@LOWER@_LDLIBS) + +@LOWER@$(EXEEXT): $(@LOWER@_OBJECTS) $(@LOWER@_DEPENDENCIES) + @rm -f @LOWER@$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/rtems-test-template/psxtest_with_thread/TEST.doc b/rtems-test-template/psxtest_with_thread/TEST.doc new file mode 100644 index 0000000..5c5378c --- /dev/null +++ b/rtems-test-template/psxtest_with_thread/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/psxtest_with_thread/TEST.scn b/rtems-test-template/psxtest_with_thread/TEST.scn new file mode 100644 index 0000000..a636120 --- /dev/null +++ b/rtems-test-template/psxtest_with_thread/TEST.scn @@ -0,0 +1 @@ +XXX fill in with test output diff --git a/rtems-test-template/psxtest_with_thread/init.c b/rtems-test-template/psxtest_with_thread/init.c new file mode 100644 index 0000000..1f31ef8 --- /dev/null +++ b/rtems-test-template/psxtest_with_thread/init.c @@ -0,0 +1,52 @@ +/* + * 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. + * + * $Id$ + */ + +#include <tmacros.h> +#include "test_support.h" +#include <pthread.h> + +pthread_t ThreadId; + +void *TestThread( + void *argument +) +{ + return NULL; +} + +void *POSIX_Init( + rtems_task_argument argument +) +{ + int status; + + puts( "\n\n*** POSIX TEST @DESC@ ***" ); + + status = pthread_create( &ThreadId, NULL, TestThread, NULL ); + rtems_test_assert( !status ); + + puts( "*** END OF POSIX TEST @DESC@ ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> +/* end of file */ diff --git a/rtems-test-template/psxtmtest_blocking/Makefile.am b/rtems-test-template/psxtmtest_blocking/Makefile.am new file mode 100644 index 0000000..3e83ed8 --- /dev/null +++ b/rtems-test-template/psxtmtest_blocking/Makefile.am @@ -0,0 +1,30 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = @LOWER@ +@LOWER@_SOURCES = init.c ../../tmtests/include/timesys.h \ + ../../support/src/tmtests_empty_function.c \ + ../../support/src/tmtests_support.c + +dist_rtems_tests_DATA = @LOWER@.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +OPERATION_COUNT = @OPERATION_COUNT@ +AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include +AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT) +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(@LOWER@_OBJECTS) $(@LOWER@_LDADD) +LINK_LIBS = $(@LOWER@_LDLIBS) + +@LOWER@$(EXEEXT): $(@LOWER@_OBJECTS) $(@LOWER@_DEPENDENCIES) + @rm -f @LOWER@$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/rtems-test-template/psxtmtest_blocking/TEST.doc b/rtems-test-template/psxtmtest_blocking/TEST.doc new file mode 100644 index 0000000..1520da7 --- /dev/null +++ b/rtems-test-template/psxtmtest_blocking/TEST.doc @@ -0,0 +1,14 @@ +# +# $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 test benchmarks the following operations: + ++ TBD diff --git a/rtems-test-template/psxtmtest_blocking/init.c b/rtems-test-template/psxtmtest_blocking/init.c new file mode 100644 index 0000000..d092ea4 --- /dev/null +++ b/rtems-test-template/psxtmtest_blocking/init.c @@ -0,0 +1,84 @@ +/* + * 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. + * + * $Id$ + */ + +#include <coverhd.h> +#include <tmacros.h> +#include <timesys.h> +#include "test_support.h" +#include <pthread.h> +#include <rtems/timerdrv.h> + +void *Low( + void *argument +) +{ + long end_time; + + end_time = benchmark_timer_read(); + + put_time( + "XXX", + end_time, + OPERATION_COUNT, + 0, + 0 + ); + + puts( "*** END OF POSIX TIME TEST @DESC@ ***" ); + + rtems_test_exit( 0 ); + return NULL; +} + +void *Middle( + void *argument +) +{ + /* XXX blocking operation goes here */ + return NULL; +} + +void *POSIX_Init( + void *argument +) +{ + int i; + int status; + pthread_t threadId; + + puts( "\n\n*** POSIX TIME TEST @DESC@ ***" ); + + for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) { + status = pthread_create( &threadId, NULL, Middle, NULL ); + rtems_test_assert( !status ); + } + + status = pthread_create( &threadId, NULL, Low, NULL ); + rtems_test_assert( !status ); + + /* start the timer and switch through all the other tasks */ + benchmark_timer_initialize(); + /* XXX blocking operation goes here */ + return NULL; +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER + +#define CONFIGURE_MAXIMUM_POSIX_THREADS OPERATION_COUNT + 2 +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> + /* end of file */ diff --git a/rtems-test-template/psxtmtest_single/Makefile.am b/rtems-test-template/psxtmtest_single/Makefile.am new file mode 100644 index 0000000..3e83ed8 --- /dev/null +++ b/rtems-test-template/psxtmtest_single/Makefile.am @@ -0,0 +1,30 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = @LOWER@ +@LOWER@_SOURCES = init.c ../../tmtests/include/timesys.h \ + ../../support/src/tmtests_empty_function.c \ + ../../support/src/tmtests_support.c + +dist_rtems_tests_DATA = @LOWER@.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +OPERATION_COUNT = @OPERATION_COUNT@ +AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include +AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT) +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(@LOWER@_OBJECTS) $(@LOWER@_LDADD) +LINK_LIBS = $(@LOWER@_LDLIBS) + +@LOWER@$(EXEEXT): $(@LOWER@_OBJECTS) $(@LOWER@_DEPENDENCIES) + @rm -f @LOWER@$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/rtems-test-template/psxtmtest_single/TEST.doc b/rtems-test-template/psxtmtest_single/TEST.doc new file mode 100644 index 0000000..1520da7 --- /dev/null +++ b/rtems-test-template/psxtmtest_single/TEST.doc @@ -0,0 +1,14 @@ +# +# $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 test benchmarks the following operations: + ++ TBD diff --git a/rtems-test-template/psxtmtest_single/init.c b/rtems-test-template/psxtmtest_single/init.c new file mode 100644 index 0000000..86d8ef0 --- /dev/null +++ b/rtems-test-template/psxtmtest_single/init.c @@ -0,0 +1,41 @@ +/* + * 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. + * + * $Id$ + */ + +#include <coverhd.h> +#include <tmacros.h> +#include <timesys.h> +#include "test_support.h" + +void *POSIX_Init( + void *argument +) +{ + puts( "\n\n*** POSIX TIME TEST @DESC@ ***" ); + + /* XXX test code goes here */ + + puts( "*** END OF POSIX TIME TEST @DESC@ ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> +/* end of file */ diff --git a/rtems-test-template/sptest_with_task/Makefile.am b/rtems-test-template/sptest_with_task/Makefile.am new file mode 100644 index 0000000..2b1fc2c --- /dev/null +++ b/rtems-test-template/sptest_with_task/Makefile.am @@ -0,0 +1,26 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = @LOWER@ +@LOWER@_SOURCES = init.c + +dist_rtems_tests_DATA = @LOWER@.scn +dist_rtems_tests_DATA += @LOWER@.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(@LOWER@_OBJECTS) $(@LOWER@_LDADD) +LINK_LIBS = $(@LOWER@_LDLIBS) + +@LOWER@$(EXEEXT): $(@LOWER@_OBJECTS) $(@LOWER@_DEPENDENCIES) + @rm -f @LOWER@$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/rtems-test-template/sptest_with_task/TEST.doc b/rtems-test-template/sptest_with_task/TEST.doc new file mode 100644 index 0000000..5c5378c --- /dev/null +++ b/rtems-test-template/sptest_with_task/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/sptest_with_task/TEST.scn b/rtems-test-template/sptest_with_task/TEST.scn new file mode 100644 index 0000000..a636120 --- /dev/null +++ b/rtems-test-template/sptest_with_task/TEST.scn @@ -0,0 +1 @@ +XXX fill in with test output diff --git a/rtems-test-template/sptest_with_task/init.c b/rtems-test-template/sptest_with_task/init.c new file mode 100644 index 0000000..10e356b --- /dev/null +++ b/rtems-test-template/sptest_with_task/init.c @@ -0,0 +1,60 @@ +/* + * 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. + * + * $Id$ + */ + +#include <tmacros.h> +#include "test_support.h" + +rtems_task Test_task( + rtems_task_argument argument +) +{ + (void) rtems_task_delete( RTEMS_SELF ); +} + +rtems_task Init( + rtems_task_argument argument +) +{ + rtems_status_code status; + rtems_id task_id; + + puts( "\n\n*** TEST @DESC@ ***" ); + + status = rtems_task_create( + rtems_build_name( 'T', 'E', 'S', 'T' ), + 1, + RTEMS_MINIMUM_STACK_SIZE, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &task_id + ); + directive_failed( status, "rtems_task_create" ); + + status = rtems_task_start( task_id, Test_task, 0 ); + directive_failed( status, "rtems_task_start" ); + + puts( "*** END OF TEST @DESC@ ***" ); + + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 2 +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> +/* end of file */ |