mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* itronhello/.cvsignore: Remove. * itronhello/Makefile.am: Remove. * itronhello/init.c: Remove. * itronhello/itronhello.doc: Remove. * itronhello/itronhello.scn: Remove. * itronhello/system.h: Remove. * .cvsignore: Remove. * ChangeLog: Remove. * Makefile.am: Remove. * README: Remove. * configure.ac: Remove. * itrontests.am: Remove. * itronmbf01/.cvsignore: Remove. * itronmbf01/Makefile.am: Remove. * itronmbf01/init.c: Remove. * itronmbf01/itronmbf01.doc: Remove. * itronmbf01/itronmbf01.scn: Remove. * itronmbf01/system.h: Remove. * itronmbox01/.cvsignore: Remove. * itronmbox01/Makefile.am: Remove. * itronmbox01/init.c: Remove. * itronmbox01/itronmbox01.doc: Remove. * itronmbox01/itronmbox01.scn: Remove. * itronmbox01/system.h: Remove. * itronsem01/.cvsignore: Remove. * itronsem01/Makefile.am: Remove. * itronsem01/init.c: Remove. * itronsem01/itronsem01.doc: Remove. * itronsem01/itronsem01.scn: Remove. * itronsem01/system.h: Remove. * itrontask01/.cvsignore: Remove. * itrontask01/Makefile.am: Remove. * itrontask01/init.c: Remove. * itrontask01/itrontask01.doc: Remove. * itrontask01/itrontask01.scn: Remove. * itrontask01/system.h: Remove. * itrontask01/task1.c: Remove. * itrontask02/.cvsignore: Remove. * itrontask02/Makefile.am: Remove. * itrontask02/dormant.c: Remove. * itrontask02/init.c: Remove. * itrontask02/itrontask02.doc: Remove. * itrontask02/itrontask02.scn: Remove. * itrontask02/system.h: Remove. * itrontask03/.cvsignore: Remove. * itrontask03/Makefile.am: Remove. * itrontask03/init.c: Remove. * itrontask03/itrontask03.doc: Remove. * itrontask03/itrontask03.scn: Remove. * itrontask03/preempt.c: Remove. * itrontask03/system.h: Remove. * itrontask03/task1.c: Remove. * itrontask03/task2.c: Remove. * itrontask03/task3.c: Remove. * itrontask04/.cvsignore: Remove. * itrontask04/Makefile.am: Remove. * itrontask04/init.c: Remove. * itrontask04/itrontask04.doc: Remove. * itrontask04/itrontask04.scn: Remove. * itrontask04/system.h: Remove. * itrontask04/task1.c: Remove. * itrontask04/task2.c: Remove. * itrontask04/task3.c: Remove. * itrontime01/.cvsignore: Remove. * itrontime01/Makefile.am: Remove. * itrontime01/init.c: Remove. * itrontime01/itrontime01.doc: Remove. * itrontime01/itrontime01.scn: Remove. * itrontime01/system.h: Remove.
This commit is contained in:
@@ -1,251 +0,0 @@
|
||||
2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* itronhello/.cvsignore: Remove.
|
||||
* itronhello/Makefile.am: Remove.
|
||||
* itronhello/init.c: Remove.
|
||||
* itronhello/itronhello.doc: Remove.
|
||||
* itronhello/itronhello.scn: Remove.
|
||||
* itronhello/system.h: Remove.
|
||||
* .cvsignore: Remove.
|
||||
* ChangeLog: Remove.
|
||||
* Makefile.am: Remove.
|
||||
* README: Remove.
|
||||
* configure.ac: Remove.
|
||||
* itrontests.am: Remove.
|
||||
* itronmbf01/.cvsignore: Remove.
|
||||
* itronmbf01/Makefile.am: Remove.
|
||||
* itronmbf01/init.c: Remove.
|
||||
* itronmbf01/itronmbf01.doc: Remove.
|
||||
* itronmbf01/itronmbf01.scn: Remove.
|
||||
* itronmbf01/system.h: Remove.
|
||||
* itronmbox01/.cvsignore: Remove.
|
||||
* itronmbox01/Makefile.am: Remove.
|
||||
* itronmbox01/init.c: Remove.
|
||||
* itronmbox01/itronmbox01.doc: Remove.
|
||||
* itronmbox01/itronmbox01.scn: Remove.
|
||||
* itronmbox01/system.h: Remove.
|
||||
* itronsem01/.cvsignore: Remove.
|
||||
* itronsem01/Makefile.am: Remove.
|
||||
* itronsem01/init.c: Remove.
|
||||
* itronsem01/itronsem01.doc: Remove.
|
||||
* itronsem01/itronsem01.scn: Remove.
|
||||
* itronsem01/system.h: Remove.
|
||||
* itrontask01/.cvsignore: Remove.
|
||||
* itrontask01/Makefile.am: Remove.
|
||||
* itrontask01/init.c: Remove.
|
||||
* itrontask01/itrontask01.doc: Remove.
|
||||
* itrontask01/itrontask01.scn: Remove.
|
||||
* itrontask01/system.h: Remove.
|
||||
* itrontask01/task1.c: Remove.
|
||||
* itrontask02/.cvsignore: Remove.
|
||||
* itrontask02/Makefile.am: Remove.
|
||||
* itrontask02/dormant.c: Remove.
|
||||
* itrontask02/init.c: Remove.
|
||||
* itrontask02/itrontask02.doc: Remove.
|
||||
* itrontask02/itrontask02.scn: Remove.
|
||||
* itrontask02/system.h: Remove.
|
||||
* itrontask03/.cvsignore: Remove.
|
||||
* itrontask03/Makefile.am: Remove.
|
||||
* itrontask03/init.c: Remove.
|
||||
* itrontask03/itrontask03.doc: Remove.
|
||||
* itrontask03/itrontask03.scn: Remove.
|
||||
* itrontask03/preempt.c: Remove.
|
||||
* itrontask03/system.h: Remove.
|
||||
* itrontask03/task1.c: Remove.
|
||||
* itrontask03/task2.c: Remove.
|
||||
* itrontask03/task3.c: Remove.
|
||||
* itrontask04/.cvsignore: Remove.
|
||||
* itrontask04/Makefile.am: Remove.
|
||||
* itrontask04/init.c: Remove.
|
||||
* itrontask04/itrontask04.doc: Remove.
|
||||
* itrontask04/itrontask04.scn: Remove.
|
||||
* itrontask04/system.h: Remove.
|
||||
* itrontask04/task1.c: Remove.
|
||||
* itrontask04/task2.c: Remove.
|
||||
* itrontask04/task3.c: Remove.
|
||||
* itrontime01/.cvsignore: Remove.
|
||||
* itrontime01/Makefile.am: Remove.
|
||||
* itrontime01/init.c: Remove.
|
||||
* itrontime01/itrontime01.doc: Remove.
|
||||
* itrontime01/itrontime01.scn: Remove.
|
||||
* itrontime01/system.h: Remove.
|
||||
|
||||
2003-10-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove RTEMS_CANONICAL_HOST.
|
||||
|
||||
2003-10-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac:Remove RTEMS_CHECK_CPU.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* itronhello/init.c, itronhello/itronhello.doc, itronhello/system.h,
|
||||
itronmbf01/init.c, itronmbf01/itronmbf01.doc, itronmbf01/system.h,
|
||||
itronmbox01/init.c, itronmbox01/system.h, itronsem01/init.c,
|
||||
itronsem01/itronsem01.doc, itronsem01/system.h, itrontask01/init.c,
|
||||
itrontask01/itrontask01.doc, itrontask01/system.h,
|
||||
itrontask01/task1.c, itrontask02/dormant.c, itrontask02/init.c,
|
||||
itrontask02/itrontask02.doc, itrontask02/system.h,
|
||||
itrontask03/init.c, itrontask03/itrontask03.doc,
|
||||
itrontask03/preempt.c, itrontask03/system.h, itrontask03/task1.c,
|
||||
itrontask03/task2.c, itrontask03/task3.c, itrontask04/init.c,
|
||||
itrontask04/itrontask04.doc, itrontask04/system.h,
|
||||
itrontask04/task1.c, itrontask04/task2.c, itrontask04/task3.c,
|
||||
itrontime01/init.c, itrontime01/system.h: URL for license changed.
|
||||
|
||||
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect having moved aclocal/.
|
||||
|
||||
2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect having moved automake/.
|
||||
* itronhello/Makefile.am: Reflect having moved automake/.
|
||||
* itronmbf01/Makefile.am: Reflect having moved automake/.
|
||||
* itronmbox01/Makefile.am: Reflect having moved automake/.
|
||||
* itronsem01/Makefile.am: Reflect having moved automake/.
|
||||
* itrontask01/Makefile.am: Reflect having moved automake/.
|
||||
* itrontask02/Makefile.am: Reflect having moved automake/.
|
||||
* itrontask03/Makefile.am: Reflect having moved automake/.
|
||||
* itrontask04/Makefile.am: Reflect having moved automake/.
|
||||
* itrontime01/Makefile.am: Reflect having moved automake/.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
2003-05-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove CC_CFLAGS_DEBUG_V.
|
||||
CC_CFLAGS_DEFAULT (obsolete).
|
||||
|
||||
2003-05-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove CC_CFLAGS_PROFILE_V.
|
||||
Remove CC_LDFLAGS_PROFILE_V.
|
||||
|
||||
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AC_PREREQ(2.57).
|
||||
|
||||
2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Reformat.
|
||||
Add autom4te*cache.
|
||||
Remove autom4te.cache.
|
||||
|
||||
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* itronhello/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itronmbf01/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itronmbox01/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itronsem01/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itrontask01/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itrontask02/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itrontask03/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itrontask04/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* itrontime01/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
|
||||
2002-08-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* Per PR47 add support for buffered test output. This involved
|
||||
adding defines to redirect output to a buffer and dump it when
|
||||
full, at "test pause", and at exit. To avoid problems when redefining
|
||||
exit(), all tests were modified to call rtems_test_exit().
|
||||
Some tests, notable psxtests, had to be modified to include
|
||||
the standard test macro .h file (pmacros.h or tmacros.h) to
|
||||
enable this support.
|
||||
* itronhello/init.c, itronmbf01/init.c, itronmbox01/init.c,
|
||||
itronsem01/init.c, itrontask01/task1.c, itrontask02/init.c,
|
||||
itrontask03/task1.c, itrontask04/task3.c, itrontime01/init.c: Modified.
|
||||
|
||||
2002-04-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove ENABLE_GCC28.
|
||||
|
||||
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac:
|
||||
AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.6]).
|
||||
* itronhello/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itronmbf01/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itronmbox01/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itronsem01/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itrontask01/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itrontask02/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itrontask03/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itrontask04/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* itrontime01/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
|
||||
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
|
||||
* configure.in: Remove.
|
||||
* configure.ac: New file, generated from configure.in by autoupdate.
|
||||
|
||||
2001-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* itrontests.am: Use TMPINSTALL_FILES = to make automake-1.5 happy.
|
||||
|
||||
2001-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* itrontask03/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itrontask04/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itronmbf01/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itronsem01/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itronhello/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itrontime01/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itrontask01/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itrontask02/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
* itronmbox01/Makefile.am: include leaf.am instead of leaf.cfg.
|
||||
|
||||
2001-05-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]).
|
||||
|
||||
2001-04-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* itronmbf01/itronmbf01.scn, itronmbox01/init.c,
|
||||
itronsem01/itronsem01.scn, itrontime01/init.c: Various
|
||||
adjustments so test output matches screens more reliably.
|
||||
|
||||
2000-11-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* itrontask01/system.h: Configure enough stack memory.
|
||||
|
||||
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
|
||||
|
||||
2000-11-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal.
|
||||
|
||||
2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
|
||||
Switch to GNU canonicalization.
|
||||
* itrontests.am: Remove DEFS.
|
||||
|
||||
2000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* itronhello/Makefile.am, itronmbf01/Makefile.am,
|
||||
itronmbox01/Makefile.am, itronsem01/Makefile.am,
|
||||
itrontask01/Makefile.am, itrontask02/Makefile.am,
|
||||
itrontask03/Makefile.am, itrontask04/Makefile.am,
|
||||
itrontime01/Makefile.am: Include compile.am
|
||||
|
||||
2000-08-10 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
@@ -1,13 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
|
||||
SUBDIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
||||
itronmbf01 itronmbox01 itronsem01 itrontime01
|
||||
|
||||
EXTRA_DIST = itrontests.am
|
||||
|
||||
include $(top_srcdir)/../automake/subdirs.am
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This directory contains the functionality tests for the ITRON 3.0 API
|
||||
implementation.
|
||||
@@ -1,42 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([rtems-c-src-tests-itrontests],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
|
||||
AC_CONFIG_SRCDIR([itronhello])
|
||||
RTEMS_TOP(../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.7.2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RTEMS_ENABLE_BARE
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
||||
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
|
||||
|
||||
AC_SUBST(BARE_CPU_CFLAGS)
|
||||
AC_SUBST(BARE_CPU_MODEL)
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
itronhello/Makefile
|
||||
itronmbf01/Makefile
|
||||
itronmbox01/Makefile
|
||||
itronsem01/Makefile
|
||||
itrontask01/Makefile
|
||||
itrontask02/Makefile
|
||||
itrontask03/Makefile
|
||||
itrontask04/Makefile
|
||||
itrontime01/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itronhello
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,33 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON HELLO WORLD TEST ***\n" );
|
||||
printf( "Hello World\n" );
|
||||
printf( "*** END OF ITRON HELLO WORLD TEST ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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: itronhello
|
||||
|
||||
directives:
|
||||
cre_tsk, sta_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verifies the initial itron task can be created and started.
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*** ITRON HELLO WORLD TEST ***
|
||||
Hello World
|
||||
*** END OF ITRON HELLO WORLD TEST ***
|
||||
@@ -1,39 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itronmbf01
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,367 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* The following is hopefully temporary.
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define put_time(_s) \
|
||||
do { \
|
||||
time_t a_time_t; \
|
||||
a_time_t = time( 0 ); \
|
||||
printf( "%s%s", _s, ctime( &a_time_t ) ); \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
||||
void TestCre();
|
||||
void TestDel();
|
||||
void TestPsnd();
|
||||
void TestRef();
|
||||
void TestTrcv();
|
||||
void TestRcv();
|
||||
void TestPrcv();
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***\n" );
|
||||
|
||||
TestCre();
|
||||
TestDel();
|
||||
TestPsnd();
|
||||
TestRef();
|
||||
TestRcv();
|
||||
TestRef();
|
||||
TestPrcv();
|
||||
TestTrcv();
|
||||
|
||||
printf("\n\n*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***\n");
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
void TestCre()
|
||||
{
|
||||
ER status;
|
||||
T_CMBF pk_cmbf;
|
||||
|
||||
/*
|
||||
* Exercise cre_mbf - this code seems to exercise every path.
|
||||
*/
|
||||
|
||||
puts( "Init - cre_mbf - NULL pk_cmbf returns E_PAR" );
|
||||
status = cre_mbf( 1, NULL );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - cre_mbf - negative values for bufsz returns E_PAR" );
|
||||
pk_cmbf.bufsz = -1;
|
||||
pk_cmbf.maxmsz = 100;
|
||||
pk_cmbf.mbfatr = 0;
|
||||
pk_cmbf.exinf = NULL;
|
||||
status = cre_mbf( 1, &pk_cmbf );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - cre_mbf - negative values for maxmsz returns E_PAR" );
|
||||
pk_cmbf.bufsz = 100;
|
||||
pk_cmbf.maxmsz = -1;
|
||||
status = cre_mbf( 1, &pk_cmbf );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - cre_mbf - bufsz < maxmsz returns E_PAR" );
|
||||
pk_cmbf.bufsz = 100;
|
||||
pk_cmbf.maxmsz = 101;
|
||||
status = cre_mbf( 1, &pk_cmbf );
|
||||
assert( status == E_PAR );
|
||||
|
||||
/*
|
||||
* Now run through all the bad ID errors
|
||||
*/
|
||||
|
||||
pk_cmbf.bufsz = 200;
|
||||
pk_cmbf.maxmsz = 30;
|
||||
puts( "Init - cre_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = cre_mbf( -5, &pk_cmbf );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - cre_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = cre_mbf( -4, &pk_cmbf );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_mbf - bad id (0) - E_ID" );
|
||||
status = cre_mbf( 0, &pk_cmbf );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_mbf - bad id (too great) - E_ID" );
|
||||
status = cre_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, &pk_cmbf );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK" );
|
||||
pk_cmbf.bufsz = 600;
|
||||
pk_cmbf.maxmsz = 200;
|
||||
pk_cmbf.mbfatr = TA_TFIFO;
|
||||
status = cre_mbf( 1, &pk_cmbf );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - cre_mbf - create mbf 1 again - E_OBJ" );
|
||||
status = cre_mbf( 1, &pk_cmbf );
|
||||
assert( status == E_OBJ );
|
||||
|
||||
puts( "Init - cre_mbf - create mbf 2 TA_TPRI - E_OK" );
|
||||
pk_cmbf.bufsz = 600;
|
||||
pk_cmbf.maxmsz = 200;
|
||||
pk_cmbf.mbfatr = TA_TPRI;
|
||||
status = cre_mbf( 2, &pk_cmbf );
|
||||
assert( status == E_OK );
|
||||
}
|
||||
|
||||
void TestDel()
|
||||
{
|
||||
ER status;
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for del_mbf
|
||||
*/
|
||||
|
||||
puts( "Init - del_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = del_mbf( -5 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - del_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = del_mbf( -4 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - del_mbf - bad id (0) - E_ID" );
|
||||
status = del_mbf( 0 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - del_mbf - bad id (too great) - E_ID" );
|
||||
status = del_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1 );
|
||||
assert( status == E_ID );
|
||||
|
||||
|
||||
puts("Init - del_mbf - E_OK" );
|
||||
status = del_mbf(2);
|
||||
assert(status == E_OK);
|
||||
}
|
||||
|
||||
void TestPsnd()
|
||||
{
|
||||
ER status;
|
||||
char msg[100] = "This is test message 1";
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for psnd_mbf
|
||||
*/
|
||||
|
||||
puts( "Init - psnd_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = psnd_mbf(-5, msg, sizeof(msg));
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - psnd_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = psnd_mbf(-4, msg, sizeof(msg));
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - psnd_mbf - bad id (0) - E_ID" );
|
||||
status = psnd_mbf(0, msg, sizeof(msg));
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - psnd_mbf - bad id (too great) - E_ID" );
|
||||
status = psnd_mbf(CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, msg,
|
||||
sizeof(msg));
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - psnd_mbf - msg == 0, E_PAR" );
|
||||
status = psnd_mbf(1, 0, sizeof(msg));
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - psnd_mbf - msgsz too big - E_PAR" );
|
||||
status = psnd_mbf(1, msg, 300);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - psnd_mbf - msgsz <0 - E_PAR" );
|
||||
status = psnd_mbf(1, msg, -10);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - psnd_mbf - E_OK" );
|
||||
status = psnd_mbf(1, msg, sizeof(msg));
|
||||
assert( status == E_OK );
|
||||
}
|
||||
|
||||
void TestRef()
|
||||
{
|
||||
ER status;
|
||||
T_RMBF pk_rmbf;
|
||||
|
||||
puts( "Init - ref_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = ref_mbf(&pk_rmbf, -5);
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - ref_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = ref_mbf(&pk_rmbf, -4);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - ref_mbf - bad id (0) - E_ID" );
|
||||
status = ref_mbf(&pk_rmbf, 0);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - ref_mbf - bad id (too great) - E_ID" );
|
||||
status = ref_mbf(&pk_rmbf,
|
||||
CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - ref_mbf - NULL pk_mbf returns E_PAR" );
|
||||
status = ref_mbf( NULL, 1 );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - ref_mbf - mbf 1 - E_OK" );
|
||||
status = ref_mbf( &pk_rmbf, 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
printf( "Init - mbf 1 msgsz = %d\n", pk_rmbf.msgsz );
|
||||
printf( "Init - mbf 1 frbufsz = %d\n", pk_rmbf.frbufsz );
|
||||
printf( "Init - mbf 1 waiting tasks = %d\n", pk_rmbf.wtsk );
|
||||
printf( "Init - mbf 1 sending tasks = %d\n", pk_rmbf.stsk);
|
||||
}
|
||||
|
||||
void TestRcv()
|
||||
{
|
||||
ER status;
|
||||
char buffer[200];
|
||||
int s;
|
||||
|
||||
puts( "Init - rcv_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = rcv_mbf(buffer, &s, -5);
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - rcv_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = rcv_mbf(buffer, &s, -4);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - rcv_mbf - bad id (0) - E_ID" );
|
||||
status = rcv_mbf(buffer, &s, 0);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - rcv_mbf - bad id (too great) - E_ID" );
|
||||
status = rcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - rcv_mbf - NULL msg returns E_PAR" );
|
||||
status = rcv_mbf(NULL, &s, 1);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - rcv_mbf - NULL p_msgsz returns E_PAR" );
|
||||
status = rcv_mbf(buffer, 0, 1);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts("Init - rcv_mbf -- OK");
|
||||
status = rcv_mbf(buffer, &s, 1);
|
||||
assert(status == E_OK);
|
||||
printf("Message:[%s], length:%d\n", buffer, s);
|
||||
}
|
||||
|
||||
|
||||
void TestPrcv()
|
||||
{
|
||||
ER status;
|
||||
char buffer[200];
|
||||
int s;
|
||||
|
||||
puts( "Init - prcv_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = prcv_mbf(buffer, &s, -5);
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - prcv_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = prcv_mbf(buffer, &s, -4);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - prcv_mbf - bad id (0) - E_ID" );
|
||||
status = prcv_mbf(buffer, &s, 0);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - prcv_mbf - bad id (too great) - E_ID" );
|
||||
status = prcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - prcv_mbf - NULL msg returns E_PAR" );
|
||||
status = prcv_mbf(NULL, &s, 1);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - prcv_mbf - NULL p_msgsz returns E_PAR" );
|
||||
status = prcv_mbf(buffer, 0, 1);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts("Init - prcv_mbf -- E_TMOUT");
|
||||
status = prcv_mbf(buffer, &s, 1);
|
||||
assert(status == E_TMOUT);
|
||||
}
|
||||
|
||||
|
||||
void TestTrcv()
|
||||
{
|
||||
ER status;
|
||||
char buffer[200];
|
||||
int s;
|
||||
|
||||
puts( "Init - trcv_mbf - bad id (less than -4) - E_OACV" );
|
||||
status = trcv_mbf(buffer, &s, -5, 5000);
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - trcv_mbf - bad id (between 0 and -4) - E_ID" );
|
||||
status = trcv_mbf(buffer, &s, -4, 5000);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - trcv_mbf - bad id (0) - E_ID" );
|
||||
status = trcv_mbf(buffer, &s, 0, 5000);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - trcv_mbf - bad id (too great) - E_ID" );
|
||||
status = trcv_mbf(buffer, &s,
|
||||
CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1,
|
||||
5000);
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - trcv_mbf - NULL msg returns E_PAR" );
|
||||
status = trcv_mbf(NULL, &s, 1, 5000);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - trcv_mbf - NULL p_msgsz returns E_PAR" );
|
||||
status = trcv_mbf(buffer, 0, 1, 5000);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - trcv_mbf - tmout <-2 returns E_PAR" );
|
||||
status = trcv_mbf(buffer, &s, 1, -2);
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts("\nInit - trcv_mbf -- E_TMOUT");
|
||||
put_time( "Init - starting to block at ");
|
||||
status = trcv_mbf(buffer, &s, 1, 1000);
|
||||
assert(status == E_TMOUT);
|
||||
put_time( "Init - time out at ");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***
|
||||
Init - cre_mbf - NULL pk_cmbf returns E_PAR
|
||||
Init - cre_mbf - negative values for bufsz returns E_PAR
|
||||
Init - cre_mbf - negative values for maxmsz returns E_PAR
|
||||
Init - cre_mbf - bufsz < maxmsz returns E_PAR
|
||||
Init - cre_mbf - bad id (less than -4) - E_OACV
|
||||
Init - cre_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_mbf - bad id (0) - E_ID
|
||||
Init - cre_mbf - bad id (too great) - E_ID
|
||||
Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK
|
||||
Init - cre_mbf - create mbf 1 again - E_OBJ
|
||||
Init - cre_mbf - create mbf 2 TA_TPRI - E_OK
|
||||
Init - del_mbf - bad id (less than -4) - E_OACV
|
||||
Init - del_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - del_mbf - bad id (0) - E_ID
|
||||
Init - del_mbf - bad id (too great) - E_ID
|
||||
Init - del_mbf - E_OK
|
||||
Init - psnd_mbf - bad id (less than -4) - E_OACV
|
||||
Init - psnd_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - psnd_mbf - bad id (0) - E_ID
|
||||
Init - psnd_mbf - bad id (too great) - E_ID
|
||||
Init - psnd_mbf - msg == 0, E_PAR
|
||||
Init - psnd_mbf - msgsz too big - E_PAR
|
||||
Init - psnd_mbf - msgsz <0 - E_PAR
|
||||
Init - psnd_mbf - E_OK
|
||||
Init - ref_mbf - bad id (less than -4) - E_OACV
|
||||
Init - ref_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_mbf - bad id (0) - E_ID
|
||||
Init - ref_mbf - bad id (too great) - E_ID
|
||||
Init - ref_mbf - NULL pk_mbf returns E_PAR
|
||||
Init - ref_mbf - mbf 1 - E_OK
|
||||
Init - mbf 1 msgsz = 100
|
||||
Init - mbf 1 frbufsz = 400
|
||||
Init - mbf 1 waiting tasks = 0
|
||||
Init - mbf 1 sending tasks = 0
|
||||
Init - rcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - rcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - rcv_mbf - bad id (0) - E_ID
|
||||
Init - rcv_mbf - bad id (too great) - E_ID
|
||||
Init - rcv_mbf - NULL msg returns E_PAR
|
||||
Init - rcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - rcv_mbf -- OK
|
||||
Message:[This is test message 1], length:100
|
||||
Init - ref_mbf - bad id (less than -4) - E_OACV
|
||||
Init - ref_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_mbf - bad id (0) - E_ID
|
||||
Init - ref_mbf - bad id (too great) - E_ID
|
||||
Init - ref_mbf - NULL pk_mbf returns E_PAR
|
||||
Init - ref_mbf - mbf 1 - E_OK
|
||||
Init - mbf 1 msgsz = 0
|
||||
Init - mbf 1 frbufsz = 600
|
||||
Init - mbf 1 waiting tasks = 0
|
||||
Init - mbf 1 sending tasks = 0
|
||||
Init - prcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - prcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - prcv_mbf - bad id (0) - E_ID
|
||||
Init - prcv_mbf - bad id (too great) - E_ID
|
||||
Init - prcv_mbf - NULL msg returns E_PAR
|
||||
Init - prcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - prcv_mbf -- E_TMOUT
|
||||
Init - trcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - trcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - trcv_mbf - bad id (0) - E_ID
|
||||
Init - trcv_mbf - bad id (too great) - E_ID
|
||||
Init - trcv_mbf - NULL msg returns E_PAR
|
||||
Init - trcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - trcv_mbf - tmout <-2 returns E_PAR
|
||||
Init - trcv_mbf -- E_TMOUT
|
||||
Init - starting to block at Fri Jan 1 00:00:00 1988
|
||||
Init - time out at Fri Jan 1 00:00:01 1988
|
||||
*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***
|
||||
@@ -1,40 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 10
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itronmbox01
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,36 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON MBOX TEST 01 ***\n" );
|
||||
printf( "ITRON Mailboxes are implemented but there is currently no test.\n" );
|
||||
printf( "*** END OF ITRON MBOX TEST 01 ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*** ITRON MBOX TEST 01 ***
|
||||
ITRON Mailboxes are implemented but there is currently no test.
|
||||
*** END OF ITRON MBOX TEST 01 ***
|
||||
@@ -1,37 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itronsem01
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,332 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* The following is hopefully temporary.
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define put_time(_s) \
|
||||
do { \
|
||||
time_t a_time_t; \
|
||||
a_time_t = time( 0 ); \
|
||||
printf( "%s%s", _s, ctime( &a_time_t ) ); \
|
||||
} while(0)
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
ER status;
|
||||
T_CSEM pk_csem;
|
||||
T_RSEM pk_rsem;
|
||||
|
||||
printf( "\n\n*** ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
|
||||
|
||||
/*
|
||||
* Exercise cre_sem - this code seems to exercise every path.
|
||||
*/
|
||||
|
||||
puts( "Init - cre_sem - NULL pk_sem returns E_PAR" );
|
||||
status = cre_sem( 1, NULL );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - cre_sem - isemcnt > maxsem returns E_PAR" );
|
||||
pk_csem.sematr = 0;
|
||||
pk_csem.isemcnt = 3;
|
||||
pk_csem.maxsem = 2;
|
||||
status = cre_sem( 1, &pk_csem );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - cre_sem - maxsem of 0 returns E_PAR" );
|
||||
pk_csem.isemcnt = 0;
|
||||
pk_csem.maxsem = 0;
|
||||
status = cre_sem( 1, &pk_csem );
|
||||
assert( status == E_PAR );
|
||||
|
||||
/*
|
||||
* Now run through all the bad ID errors
|
||||
*/
|
||||
|
||||
pk_csem.isemcnt = 2;
|
||||
pk_csem.maxsem = 3;
|
||||
puts( "Init - cre_sem - bad id (less than -4) - E_OACV" );
|
||||
status = cre_sem( -5, &pk_csem );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - cre_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = cre_sem( -4, &pk_csem );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_sem - bad id (0) - E_ID" );
|
||||
status = cre_sem( 0, &pk_csem );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_sem - bad id (too great) - E_ID" );
|
||||
status = cre_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_csem );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK" );
|
||||
pk_csem.isemcnt = 2;
|
||||
pk_csem.maxsem = 3;
|
||||
pk_csem.sematr = TA_TFIFO;
|
||||
status = cre_sem( 1, &pk_csem );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - cre_sem - create semaphore 1 again - E_OBJ" );
|
||||
status = cre_sem( 1, &pk_csem );
|
||||
assert( status == E_OBJ );
|
||||
|
||||
puts( "Init - cre_sem - create semaphore 2 TA_TPRI - E_OK" );
|
||||
pk_csem.isemcnt = 2;
|
||||
pk_csem.maxsem = 3;
|
||||
pk_csem.sematr = TA_TPRI;
|
||||
status = cre_sem( 2, &pk_csem );
|
||||
assert( status == E_OK );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for del_sem
|
||||
*/
|
||||
|
||||
puts( "Init - del_sem - bad id (less than -4) - E_OACV" );
|
||||
status = del_sem( -5 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - del_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = del_sem( -4 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - del_sem - bad id (0) - E_ID" );
|
||||
status = del_sem( 0 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - del_sem - bad id (too great) - E_ID" );
|
||||
status = del_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for sig_sem
|
||||
*/
|
||||
|
||||
puts( "Init - sig_sem - bad id (less than -4) - E_OACV" );
|
||||
status = sig_sem( -5 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - sig_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = sig_sem( -4 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - sig_sem - bad id (0) - E_ID" );
|
||||
status = sig_sem( 0 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - sig_sem - bad id (too great) - E_ID" );
|
||||
status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for preq_sem
|
||||
*/
|
||||
|
||||
puts( "Init - preq_sem - bad id (less than -4) - E_OACV" );
|
||||
status = preq_sem( -5 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - preq_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = preq_sem( -4 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - preq_sem - bad id (0) - E_ID" );
|
||||
status = preq_sem( 0 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - preq_sem - bad id (too great) - E_ID" );
|
||||
status = preq_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for wai_sem
|
||||
*/
|
||||
|
||||
puts( "Init - wai_sem - bad id (less than -4) - E_OACV" );
|
||||
status = wai_sem( -5 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - wai_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = wai_sem( -4 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - wai_sem - bad id (0) - E_ID" );
|
||||
status = wai_sem( 0 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - wai_sem - bad id (too great) - E_ID" );
|
||||
status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for twai_sem
|
||||
*/
|
||||
|
||||
puts( "Init - twai_sem - bad id (less than -4) - E_OACV" );
|
||||
status = twai_sem( -5, 1000 );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - twai_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = twai_sem( -4, 1000 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - twai_sem - bad id (0) - E_ID" );
|
||||
status = twai_sem( 0, 1000 );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - twai_sem - bad id (too great) - E_ID" );
|
||||
status = twai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, 1000 );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Generate all the bad id errors for ref_sem
|
||||
*/
|
||||
|
||||
puts( "Init - ref_sem - bad id (less than -4) - E_OACV" );
|
||||
status = ref_sem( -5, &pk_rsem );
|
||||
assert( status == E_OACV );
|
||||
|
||||
puts( "Init - ref_sem - bad id (between 0 and -4) - E_ID" );
|
||||
status = ref_sem( -4, &pk_rsem );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - ref_sem - bad id (0) - E_ID" );
|
||||
status = ref_sem( 0, &pk_rsem );
|
||||
assert( status == E_ID );
|
||||
|
||||
puts( "Init - ref_sem - bad id (too great) - E_ID" );
|
||||
status = ref_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_rsem );
|
||||
assert( status == E_ID );
|
||||
|
||||
/*
|
||||
* Exercise preq_sem (and sig_sem a little)
|
||||
*/
|
||||
|
||||
|
||||
puts( "Init - preq_sem - semaphore 1 available (count --> 1) - E_OK" );
|
||||
status = preq_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - preq_sem - semaphore 1 available (count --> 0) - E_OK" );
|
||||
status = preq_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - preq_sem - semaphore 1 unavailable - E_TMOUT" );
|
||||
status = preq_sem( 1 );
|
||||
assert( status == E_TMOUT );
|
||||
|
||||
puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
|
||||
status = sig_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts("Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK");
|
||||
status = twai_sem( 1, TMO_POL );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT" );
|
||||
status = twai_sem( 1, TMO_POL );
|
||||
assert( status == E_TMOUT );
|
||||
|
||||
/*
|
||||
* Exercise twai_sem
|
||||
*/
|
||||
|
||||
puts( "Init - twai_sem - semaphore 1 unavailable - 1 second E_TMOUT" );
|
||||
put_time( "Init - starting to block at ");
|
||||
status = twai_sem( 1, 1000 );
|
||||
assert( status == E_TMOUT );
|
||||
put_time( "Init - timed out at ");
|
||||
puts( "Init - twai_sem - semaphore 1 unavailable - timeout completed" );
|
||||
|
||||
/*
|
||||
* Now let's test exceed the maximum count of semaphore 1
|
||||
*/
|
||||
|
||||
puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
|
||||
status = sig_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - sig_sem - semaphore 1 (count --> 2) - E_OK" );
|
||||
status = sig_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - sig_sem - semaphore 1 (count --> 3) - E_OK" );
|
||||
status = sig_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR" );
|
||||
status = sig_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
/*
|
||||
* Exercise ref_sem
|
||||
*/
|
||||
|
||||
puts( "Init - ref_sem - NULL pk_sem returns E_PAR" );
|
||||
status = ref_sem( 1, NULL );
|
||||
assert( status == E_PAR );
|
||||
|
||||
puts( "Init - ref_sem - semaphore 1 - E_OK" );
|
||||
status = ref_sem( 1, &pk_rsem );
|
||||
assert( status == E_OK );
|
||||
printf( "Init - semaphore 1 count = %d\n", pk_rsem.semcnt );
|
||||
printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
|
||||
|
||||
puts( "Init - preq_sem - semaphore 1 (count --> 2) - E_OK" );
|
||||
status = preq_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - ref_sem - semaphore 1 - E_OK" );
|
||||
status = ref_sem( 1, &pk_rsem );
|
||||
assert( status == E_OK );
|
||||
printf( "Init - semaphore 1 count = %d\n", pk_rsem.semcnt );
|
||||
printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
|
||||
|
||||
|
||||
/*
|
||||
* Exercise del_sem
|
||||
*/
|
||||
|
||||
/* XXX really want another task blocking on the semaphore XXX */
|
||||
|
||||
puts( "Init - del_sem - semaphore 1 deleted - E_OK" );
|
||||
status = del_sem( 1 );
|
||||
assert( status == E_OK );
|
||||
|
||||
puts( "Init - XXX need other tasks to complete the test XXX" );
|
||||
|
||||
puts( "Init - dly_tsk - 1 second to let other task run" );
|
||||
status = dly_tsk( 1000 );
|
||||
assert( status == E_OK );
|
||||
|
||||
printf( "*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
*** ITRONSEM01 -- ITRON SEMAPHORE TEST ***
|
||||
Init - cre_sem - NULL pk_sem returns E_PAR
|
||||
Init - cre_sem - isemcnt > maxsem returns E_PAR
|
||||
Init - cre_sem - maxsem of 0 returns E_PAR
|
||||
Init - cre_sem - bad id (less than -4) - E_OACV
|
||||
Init - cre_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_sem - bad id (0) - E_ID
|
||||
Init - cre_sem - bad id (too great) - E_ID
|
||||
Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK
|
||||
Init - cre_sem - create semaphore 1 again - E_OBJ
|
||||
Init - cre_sem - create semaphore 2 TA_TPRI - E_OK
|
||||
Init - del_sem - bad id (less than -4) - E_OACV
|
||||
Init - del_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - del_sem - bad id (0) - E_ID
|
||||
Init - del_sem - bad id (too great) - E_ID
|
||||
Init - sig_sem - bad id (less than -4) - E_OACV
|
||||
Init - sig_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - sig_sem - bad id (0) - E_ID
|
||||
Init - sig_sem - bad id (too great) - E_ID
|
||||
Init - preq_sem - bad id (less than -4) - E_OACV
|
||||
Init - preq_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - preq_sem - bad id (0) - E_ID
|
||||
Init - preq_sem - bad id (too great) - E_ID
|
||||
Init - wai_sem - bad id (less than -4) - E_OACV
|
||||
Init - wai_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - wai_sem - bad id (0) - E_ID
|
||||
Init - wai_sem - bad id (too great) - E_ID
|
||||
Init - twai_sem - bad id (less than -4) - E_OACV
|
||||
Init - twai_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - twai_sem - bad id (0) - E_ID
|
||||
Init - twai_sem - bad id (too great) - E_ID
|
||||
Init - ref_sem - bad id (less than -4) - E_OACV
|
||||
Init - ref_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_sem - bad id (0) - E_ID
|
||||
Init - ref_sem - bad id (too great) - E_ID
|
||||
Init - preq_sem - semaphore 1 available (count --> 1) - E_OK
|
||||
Init - preq_sem - semaphore 1 available (count --> 0) - E_OK
|
||||
Init - preq_sem - semaphore 1 unavailable - E_TMOUT
|
||||
Init - sig_sem - semaphore 1 (count --> 1) - E_OK
|
||||
Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK
|
||||
Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT
|
||||
Init - twai_sem - semaphore 1 unavailable - 1 second E_TMOUT
|
||||
Init - starting to block at Fri Jan 1 00:00:00 1988
|
||||
Init - timed out at Fri Jan 1 00:00:01 1988
|
||||
Init - twai_sem - semaphore 1 unavailable - timeout completed
|
||||
Init - sig_sem - semaphore 1 (count --> 1) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count --> 2) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count --> 3) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR
|
||||
Init - ref_sem - NULL pk_sem returns E_PAR
|
||||
Init - ref_sem - semaphore 1 - E_OK
|
||||
Init - semaphore 1 count = 4
|
||||
Init - semaphore 1 waiting tasks = 0
|
||||
Init - preq_sem - semaphore 1 (count --> 2) - E_OK
|
||||
Init - ref_sem - semaphore 1 - E_OK
|
||||
Init - semaphore 1 count = 3
|
||||
Init - semaphore 1 waiting tasks = 0
|
||||
Init - del_sem - semaphore 1 deleted - E_OK
|
||||
Init - XXX need other tasks to complete the test XXX
|
||||
Init - dly_tsk - 1 second to let other task run
|
||||
*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***
|
||||
@@ -1,40 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
#include <assert.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 10
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itrontask01
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c task1.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,71 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
rtems_time_of_day time;
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 1 ***" );
|
||||
|
||||
/*
|
||||
* XXX - Change this to an itron clock !!
|
||||
*/
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_2_through_4;
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
|
||||
status = cre_tsk( 2, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
|
||||
status = cre_tsk( 3, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
|
||||
status = cre_tsk( 4, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
status = sta_tsk( 2, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
status = sta_tsk( 3, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
status = sta_tsk( 4, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
This test is based upon the test in sp01.
|
||||
|
||||
test set name: itrontask01
|
||||
|
||||
directives:
|
||||
cre_tsk, exd_tsk, get_tid, sta_tsk
|
||||
|
||||
concepts: XXX verify
|
||||
|
||||
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.
|
||||
|
||||
d. Verifies interrupt handler can handle a task switch from an interrupt
|
||||
as specified with the i_return directive.
|
||||
|
||||
e. Verifies executive initialization performed correctly.
|
||||
|
||||
f. Verifies the executive trap handler except for the halt function.
|
||||
|
||||
g. Verifies that a task can get the task identification number of itself.
|
||||
|
||||
a. Verifies exd_tsk
|
||||
|
||||
b. Verifies get_tid
|
||||
|
||||
notes:
|
||||
|
||||
rtems clock directives should change to itron clock directives when
|
||||
the clock directives are merged.
|
||||
|
||||
change rtems task wake after to itron routines.
|
||||
|
||||
output:
|
||||
"TA1" is printed once every 5 seconds.
|
||||
"TA2" is printed once every 10 seconds.
|
||||
"TA3" is printed once every 15 seconds.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
*** ITRON TASK TEST 1 ***
|
||||
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:05 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:20 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:20 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:25 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
*** END OF ITRON TASK TEST 1 ***
|
||||
|
||||
NOTE: The order of the prints at each time interval is irrelevant.
|
||||
@@ -1,42 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Task_2_through_4();
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 4
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS (RTEMS_MINIMUM_STACK_SIZE * 4)
|
||||
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
/* end of include file */
|
||||
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/* 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.
|
||||
* 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 "system.h"
|
||||
|
||||
void Task_2_through_4()
|
||||
{
|
||||
ID tid;
|
||||
int tid_index;
|
||||
rtems_time_of_day time;
|
||||
ER status;
|
||||
char name[30];
|
||||
|
||||
status = get_tid( &tid );
|
||||
directive_failed( status, "get_tid");
|
||||
|
||||
tid_index = tid - 1; /* account for init tasks */
|
||||
|
||||
sprintf(name, "TA%d", tid_index);
|
||||
|
||||
while( FOREVER ) {
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
directive_failed( status, "rtems_clock_get" );
|
||||
|
||||
if ( time.second >= 35 ) {
|
||||
puts( "*** END OF ITRON TASK TEST 1 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
printf(name);
|
||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after( tid_index * 5 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itrontask02
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c dormant.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,44 +0,0 @@
|
||||
/* Dormant
|
||||
*
|
||||
* This routine serves as two test tasks.
|
||||
* It has one dormant and one sleeping tasks.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <assert.h>
|
||||
#include "system.h"
|
||||
|
||||
void Dormant_task()
|
||||
{
|
||||
puts( "DORMANT - ext_tsk - going to DORMANT state" );
|
||||
ext_tsk( );
|
||||
|
||||
puts( "ERROR==>ext_tsk of DORMANT returned" );
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
void Non_Dormant_task()
|
||||
{
|
||||
ER status;
|
||||
|
||||
while (TRUE) {
|
||||
puts( "NON-DORMANT - Sleep for 2 minutes" );
|
||||
status = rtems_task_wake_after( 120*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,580 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
|
||||
/*
|
||||
* Status Codes for these errors
|
||||
*
|
||||
*
|
||||
* E_OK - Normal Completion
|
||||
*
|
||||
* E_NOMEM - Insufficient memory (Memory for control block and/or user
|
||||
* stack cannot be allocated)
|
||||
*
|
||||
* E_ID - Invalid ID Number (tskid was invalid or could not be used)
|
||||
*
|
||||
* E_RSATR - Reserved attribute (tskatr was invalid or could not be used)
|
||||
*
|
||||
* E_OBJ - Invalid object state (a task of the same ID already exists)
|
||||
*
|
||||
* E_OACV - Object access violation (A tskid less than -4 was specified
|
||||
* from a user task. This is implementation dependent.)
|
||||
*
|
||||
* E_PAR - Parameter error (pk_ctsk, task, itskpri and/or stksz is invalid)
|
||||
*
|
||||
* E_NOEXS - Object does not exist (the task specified by tskid does not
|
||||
* exist)
|
||||
*
|
||||
* E_CTX - Context error (issued from task-independent portions or a task
|
||||
* in dispatch disabled state)
|
||||
*
|
||||
*
|
||||
*
|
||||
* Network Specific Errors (ITRON calls these Connection Function Errors)
|
||||
*
|
||||
* EN_OBJNO - An object number which could not be accessed on the target
|
||||
* node is specified.
|
||||
*
|
||||
* EN_CTXID - Specified an object on another node when the system call
|
||||
* was issued from a task in dispatch disabled state or from
|
||||
* a task-independent portion
|
||||
*
|
||||
* EN_PAR - A value outside the range supported by the target node and/or
|
||||
* transmission packet format was specified as a parameter
|
||||
* (a value outside supported range was specified for exinf,
|
||||
* tskatr, task, itskpri and/or stksz)
|
||||
*
|
||||
* EN_RPAR - A value outside the range supported by the requesting node
|
||||
* and/or transmission packet format was returned as a return
|
||||
* parameter (a value outside supported range was returned for
|
||||
* exinf, tskpri and/or tskstat)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
rtems_time_of_day time;
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
T_RTSK pk_rtsk; /* Reference Task Packet */
|
||||
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 2 ***\n" );
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
|
||||
/*
|
||||
* Set My priority to 8 so that dummy tasks will be
|
||||
* forced to run when started.
|
||||
*/
|
||||
|
||||
status = chg_pri( TSK_SELF, 8 );
|
||||
fatal_directive_status( status, E_OK, "chg_pri of TSK_SELF");
|
||||
status = ref_tsk( &pk_rtsk, TSK_SELF );
|
||||
fatal_directive_status( status, E_OK, "ref_tsk of TSK_SELF");
|
||||
fatal_directive_status( pk_rtsk.tskpri, 8, "task priority of SELF");
|
||||
|
||||
/*
|
||||
* Create and verify a DORMANT task.
|
||||
*/
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Dormant_task;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
|
||||
puts( "Init - cre_tsk - Dormant Task" );
|
||||
status = cre_tsk( DORMANT_TASK_ID, &pk_ctsk );
|
||||
fatal_directive_status( status, E_OK, "cre_tsk of DORMANT");
|
||||
status = ref_tsk( &pk_rtsk, DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK, "ref_tsk of DORMANT");
|
||||
fatal_directive_status( pk_rtsk.tskstat, TTS_DMT, "task state of DORMANT");
|
||||
|
||||
/*
|
||||
* Create, Start and verify a not DORMANT task.
|
||||
*/
|
||||
|
||||
pk_ctsk.task = Non_Dormant_task;
|
||||
puts( "Init - cre_tsk - Non-Dormant Task" );
|
||||
status = cre_tsk( NON_DORMANT_TASK_ID, &pk_ctsk );
|
||||
fatal_directive_status( status, E_OK, "cre_tsk of NON_DORMANT");
|
||||
status = sta_tsk( NON_DORMANT_TASK_ID, 1 );
|
||||
status = ref_tsk( &pk_rtsk, NON_DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK, "ref_tsk of NON_DORMANT");
|
||||
fatal_directive_status( pk_rtsk.tskstat,TTS_WAI,"task state of NON_DORMANT");
|
||||
|
||||
|
||||
/*
|
||||
* Bad ID errors
|
||||
*/
|
||||
|
||||
puts( "\n*** Create Task Errors ***" );
|
||||
|
||||
puts( "Init - cre_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = cre_tsk( -5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_OACV, "cre_tsk of -5");
|
||||
|
||||
puts( "Init - cre_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = cre_tsk( -2, &pk_ctsk );
|
||||
fatal_directive_status( status, E_ID, "cre_tsk of -2");
|
||||
|
||||
puts( "Init - cre_tsk - cannot create TSK_SELF - E_ID" );
|
||||
status = cre_tsk( TSK_SELF, &pk_ctsk );
|
||||
fatal_directive_status( status, E_ID, "cre_tsk of TSK_SELF");
|
||||
|
||||
puts( "Init - cre_tsk - invalid id; id already exists - E_OBJ" );
|
||||
status = cre_tsk( 1, &pk_ctsk );
|
||||
fatal_directive_status( status, E_OBJ, "cre_tsk of 1");
|
||||
|
||||
/*
|
||||
* Bad task attribute errors
|
||||
*/
|
||||
|
||||
pk_ctsk.tskatr = -1;
|
||||
puts( "Init - cre_tsk - tskatr is invalid - E_RSATR" );
|
||||
status = cre_tsk( 5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_RSATR, "cre_tsk with tskatr of -1");
|
||||
|
||||
puts( "Init - cre_tsk - pk_ctsk is invalid - E_PAR" );
|
||||
status = cre_tsk( 5, NULL );
|
||||
fatal_directive_status( status, E_PAR, "cre_tsk with NULL discription");
|
||||
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.itskpri = 0;
|
||||
puts( "Init - cre_tsk - itskpri is 0 - E_PAR" );
|
||||
status = cre_tsk( 5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_PAR, "cre_tsk with priority of 0");
|
||||
pk_ctsk.itskpri = 257; /* XXX Design parameter not requirement. */
|
||||
puts( "Init - cre_tsk - itskpri is 257 - E_PAR" );
|
||||
status = cre_tsk( 5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_PAR, "cre_tsk with priority of 257");
|
||||
|
||||
pk_ctsk.stksz = -1;
|
||||
puts( "Init - cre_tsk - stksz is invalid - E_PAR" );
|
||||
status = cre_tsk( 5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_PAR, "cre_tsk with size of -1");
|
||||
|
||||
pk_ctsk.task = NULL;
|
||||
puts( "Init - cre_tsk - task is invalid - E_PAR" );
|
||||
status = cre_tsk( 5, &pk_ctsk );
|
||||
fatal_directive_status( status, E_PAR, "cre_tsk with null task identifier");
|
||||
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for cre_tsk at this time */
|
||||
fatal_directive_status( status, E_NOMEM, "");
|
||||
fatal_directive_status( status, EN_OBJNO, "");
|
||||
fatal_directive_status( status, EN_CTXID, "");
|
||||
fatal_directive_status( status, EN_PAR, "");
|
||||
#endif
|
||||
|
||||
puts( "\n\n*** Delete Task Errors ***" );
|
||||
|
||||
/*
|
||||
* Reset structure
|
||||
*/
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Dormant_task;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
|
||||
|
||||
puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
|
||||
status = del_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "del_tsk with SELF");
|
||||
|
||||
puts( "Init - del_tsk - task is not DORMANT - E_OBJ" );
|
||||
status = del_tsk( NON_DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OBJ, "del_tsk NON_DORMANT");
|
||||
|
||||
puts( "Init - del_tsk - task does not exist - E_NOEXS" );
|
||||
status = del_tsk( 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "del_tsk 5");
|
||||
|
||||
puts( "Init - del_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = del_tsk( -5 );
|
||||
fatal_directive_status( status, E_OACV, "del_tsk -5");
|
||||
|
||||
puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
|
||||
status = del_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "del_tsk self");
|
||||
|
||||
puts( "Init - del_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = del_tsk( -3 );
|
||||
fatal_directive_status( status, E_ID, "del_tsk -3");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for del_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "del_tsk ");
|
||||
fatal_directive_status( status, EN_CTXID, "del_tsk ");
|
||||
#endif
|
||||
|
||||
|
||||
puts( "\n\n*** Start Task Errors ***" );
|
||||
|
||||
puts( "Init - sta_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = sta_tsk( -5, 1 );
|
||||
fatal_directive_status( status, E_OACV, "sta_tsk of -5");
|
||||
|
||||
puts( "Init - sta_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = sta_tsk( -2, 1 );
|
||||
fatal_directive_status( status, E_ID, "sta_tsk of -2");
|
||||
|
||||
puts( "Init - sta_tsk - cannot start TSK_SELF - E_OBJ" );
|
||||
status = sta_tsk( TSK_SELF, 1 );
|
||||
fatal_directive_status( status, E_OBJ, "sta_tsk of self");
|
||||
|
||||
puts( "Init - sta_tsk - task is not DORMANT - E_OBJ" );
|
||||
status = sta_tsk( NON_DORMANT_TASK_ID, 1 );
|
||||
fatal_directive_status( status, E_OBJ, "sta_tsk NON_DORMANT");
|
||||
|
||||
puts( "Init - sta_tsk - task does not exist - E_NOEXS" );
|
||||
status = sta_tsk( 5, 1 );
|
||||
fatal_directive_status( status, E_NOEXS, "5");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for sta_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "sta_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "sta_tsk");
|
||||
fatal_directive_status( status, EN_PAR, "sta_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be tested at this time */
|
||||
puts( "\n\n*** Exit Task Errors ***" );
|
||||
puts( "Init - ext_tsk - context error - E_CTX" );
|
||||
status = ext_tsk( );
|
||||
fatal_directive_status( status, E_CTX, "ext_tsk ");
|
||||
|
||||
puts( "\n\n*** Exit and Delete Task Errors ***" );
|
||||
puts( "Init - exd_tsk - context error - E_CTX" );
|
||||
status = exd_tsk( );
|
||||
fatal_directive_status( status, E_CTX, "exd_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
puts( "\n\n*** Terminate Other Task Errors ***" );
|
||||
|
||||
puts( "Init - ter_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = ter_tsk( -2 );
|
||||
fatal_directive_status( status, E_ID, "ter_tsk of -2");
|
||||
|
||||
puts( "Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ" );
|
||||
status = ter_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "ter_tsk of self");
|
||||
|
||||
puts( "Init - ter_tsk - task is not DORMANT - E_OBJ" );
|
||||
status = ter_tsk( DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OBJ, "ter_tsk DORMANT");
|
||||
|
||||
puts( "Init - ter_tsk - task does not exist - E_NOEXS" );
|
||||
status = ter_tsk( 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "ter_tsk of 5");
|
||||
|
||||
puts( "Init - ter_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = ter_tsk( -5 );
|
||||
fatal_directive_status( status, E_OACV, "ter_tsk of -5");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for ter_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "ter_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "ter_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
#if (0)
|
||||
status = dis_dsp( );
|
||||
fatal_directive_status( status, E_CTX, "dis_dsp");
|
||||
|
||||
status = ena_dsp( );
|
||||
fatal_directive_status( status, E_CTX, "ena_dsp");
|
||||
#endif
|
||||
|
||||
puts( "\n\n*** Change Priority Task Errors ***" );
|
||||
|
||||
puts( "Init - chg_pri - bad id (between 0 and -4) - E_ID" );
|
||||
status = chg_pri( -2, 1 );
|
||||
fatal_directive_status( status, E_ID, "chg_pri of -2");
|
||||
|
||||
/* Call from task independent portion to cause E_OBJ
|
||||
puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );
|
||||
status = chg_pri( XXX - INTERRUPT, 1 );
|
||||
assert( status == E_OBJ );
|
||||
*/
|
||||
|
||||
puts( "Init - chg_pri - task is DORMANT - E_OBJ" );
|
||||
status = chg_pri( DORMANT_TASK_ID, 1 );
|
||||
fatal_directive_status( status, E_OBJ, "chg_pri of DORMANT");
|
||||
|
||||
puts( "Init - chg_pri - task does not exist - E_NOEXS" );
|
||||
status = chg_pri( 5, 1 );
|
||||
fatal_directive_status( status, E_NOEXS, "chg_pri of 5");
|
||||
|
||||
puts( "Init - chg_pri - access violation ( id less than -4) - E_OACV" );
|
||||
status = chg_pri( -5, 1 );
|
||||
fatal_directive_status( status, E_OACV, "chg_pri of -5");
|
||||
|
||||
puts( "Init - chg_pri - invalid priority - E_PAR" );
|
||||
status = chg_pri( 1, -1 );
|
||||
fatal_directive_status( status, E_PAR, "chg_pri with priority of -1");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for chg_pri at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "chg_pri");
|
||||
fatal_directive_status( status, EN_CTXID, "chg_pri");
|
||||
fatal_directive_status( status, EN_PAR, "chg_pri");
|
||||
#endif
|
||||
|
||||
/* This gave me a nasty-gram
|
||||
* "core_find_mapping() - access to unmaped address, attach a default map
|
||||
* to handle this - addr=0x80002098 nr_bytes=0x4 processor=0x40134008
|
||||
* cia=0xc744"
|
||||
*/
|
||||
|
||||
puts( "\n\n*** Rotate Ready Queue Errors ***" );
|
||||
puts( "Init - rot_rdq - priority -1 - E_PAR" );
|
||||
status = rot_rdq( -1 );
|
||||
fatal_directive_status( status, E_PAR, "rot_rdq -1");
|
||||
puts( "Init - rot_rdq - priority 257 - E_PAR" );
|
||||
status = rot_rdq( 257 );
|
||||
fatal_directive_status( status, E_PAR, "rot_rdq 256");
|
||||
|
||||
/* XXX - This routine is not coded */
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OK" );
|
||||
status = rel_wai( 1 );
|
||||
fatal_directive_status( status, E_OK, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_ID" );
|
||||
status = E_ID;
|
||||
fatal_directive_status( status, E_ID, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_NOEXS" );
|
||||
status = E_NOEXS;
|
||||
fatal_directive_status( status, E_NOEXS, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OACV" );
|
||||
status = E_OACV;
|
||||
fatal_directive_status( status, E_OACV, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OBJ" );
|
||||
status = E_OBJ;
|
||||
fatal_directive_status( status, E_OBJ, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_OBJNO" );
|
||||
status = EN_OBJNO;
|
||||
fatal_directive_status( status, EN_OBJNO, "rel_wai");
|
||||
|
||||
puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_CTXID" );
|
||||
status = EN_CTXID;
|
||||
fatal_directive_status( status, EN_CTXID, "rel_wai");
|
||||
|
||||
|
||||
puts( "\n\n*** Reference Task Status Errors ***" );
|
||||
puts( "Init - ref_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = ref_tsk( &pk_rtsk, -2 );
|
||||
fatal_directive_status( status, E_ID, "ref_tsk -2");
|
||||
|
||||
/* XXX Call from task independent portion to cause E_ID
|
||||
puts( "Init - ref_tsk - reference INTERRUPT - E_ID" );
|
||||
status = ref_tsk( &pk_rtsk, TSK_SELF );
|
||||
assert( status == E_ID );
|
||||
*/
|
||||
|
||||
puts( "Init - ref_tsk - task does not exist - E_NOEXS" );
|
||||
status = ref_tsk( &pk_rtsk, 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "ref_tsk 5");
|
||||
|
||||
puts( "Init - ref_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = ref_tsk( &pk_rtsk, -5 );
|
||||
fatal_directive_status( status, E_OACV, "ref_tsk -5");
|
||||
|
||||
puts( "Init - ref_tsk - packet address is bad - E_PAR" );
|
||||
status = ref_tsk( NULL, 1 );
|
||||
fatal_directive_status( status, E_PAR, "ref_tsk SELF with NULL descriptor");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for ref_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "ref_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "ref_tsk");
|
||||
fatal_directive_status( status, EN_RPAR, "ref_tsk");
|
||||
#endif
|
||||
|
||||
puts( "\n\n*** Suspend Task Errors ***" );
|
||||
|
||||
puts( "Init - sus_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = sus_tsk( -5 );
|
||||
fatal_directive_status( status, E_OACV, "sus_tsk of -5");
|
||||
|
||||
puts( "Init - sus_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = sus_tsk( -2 );
|
||||
fatal_directive_status( status, E_ID, "sus_tsk of -2");
|
||||
|
||||
puts( "Init - sus_tsk - cannot suspend SELF - E_OBJ" );
|
||||
status = sus_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "sus_tsk of self");
|
||||
|
||||
puts( "Init - sus_tsk - task does not exist - E_NOEXS" );
|
||||
status = sus_tsk( 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "sus_tsk of 5");
|
||||
|
||||
/* XXX - We support nested suspends and will never return this error.
|
||||
puts( "Init - sus_tsk - no support for nested SUSPENDS - E_QOVR" );
|
||||
status = sus_tsk( 1 );
|
||||
fatal_directive_status( status, E_QOVR, "sus_tsk");
|
||||
*/
|
||||
|
||||
/* XXX - Can not test this.
|
||||
puts( "Init - sus_tsk - exceeded limit for nested SUSPENDS - E_QOVR" );
|
||||
status = sus_tsk( 1 );
|
||||
fatal_directive_status( status, E_QOVR, "sus_tsk");
|
||||
*/
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for sus_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "sus_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "sus_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
puts( "\n\n*** Resume Task Errors ***" );
|
||||
|
||||
puts( "Init - rsm_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = rsm_tsk( -5 );
|
||||
fatal_directive_status( status, E_OACV, "rsm_tsk -5");
|
||||
|
||||
puts( "Init - rsm_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = rsm_tsk( -2 );
|
||||
fatal_directive_status( status, E_ID, "rsm_tsk -2");
|
||||
|
||||
puts( "Init - rsm_tsk - cannot resume SELF - E_OBJ" );
|
||||
status = rsm_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "rsm_tsk self");
|
||||
|
||||
puts( "Init - rsm_tsk - task is DORMANT - E_OBJ" );
|
||||
status = rsm_tsk( DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OBJ, "rsm_tsk DORMANT");
|
||||
|
||||
puts( "Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK" );
|
||||
status = rsm_tsk( NON_DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK, "rsm_tsk NON_DORMANT");
|
||||
|
||||
puts( "Init - rsm_tsk - task does not exist - E_NOEXS" );
|
||||
status = rsm_tsk( 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "rms_tsk 5");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for rsm_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "rsm_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "rsm_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
puts( "\n\n*** Forcibly Resume Task Errors ***" );
|
||||
|
||||
puts( "Init - frsm_tsk - access violation ( id less than -4) - E_OACV" );
|
||||
status = frsm_tsk( -5 );
|
||||
fatal_directive_status( status, E_OACV, "frsm_tsk -5");
|
||||
|
||||
puts( "Init - frsm_tsk - bad id (between 0 and -4) - E_ID" );
|
||||
status = frsm_tsk( -2 );
|
||||
fatal_directive_status( status, E_ID, "frsm_tsk -2");
|
||||
|
||||
puts( "Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ" );
|
||||
status = frsm_tsk( TSK_SELF );
|
||||
fatal_directive_status( status, E_OBJ, "frsm_tsk self");
|
||||
|
||||
puts( "Init - frsm_tsk - task is DORMANT - E_OBJ" );
|
||||
status = frsm_tsk( DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OBJ, "frsm_tsk DORMANT");
|
||||
|
||||
puts( "Init - frsm_tsk - task does not exist - E_NOEXS" );
|
||||
status = frsm_tsk( 5 );
|
||||
fatal_directive_status( status, E_NOEXS, "frsm_tsk 5");
|
||||
|
||||
puts( "Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK" );
|
||||
status = frsm_tsk( NON_DORMANT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK, "frsm_tsk NON_DORMANT");
|
||||
|
||||
#if (0)
|
||||
/* these errors can not be generated for frsm_tsk at this time */
|
||||
fatal_directive_status( status, EN_OBJNO, "frsm_tsk");
|
||||
fatal_directive_status( status, EN_CTXID, "frsm_tsk");
|
||||
#endif
|
||||
|
||||
|
||||
#if (0)
|
||||
XXXXX - FIX ME
|
||||
/* these directives are not coded */
|
||||
slp_tsk( );
|
||||
fatal_directive_status( status, E_OK, "");
|
||||
fatal_directive_status( status, E_PAR, "");
|
||||
fatal_directive_status( status, E_RLWAI, "");
|
||||
fatal_directive_status( status, E_TMOUT, "");
|
||||
fatal_directive_status( status, E_CTX, "");
|
||||
|
||||
|
||||
tslp_tsk( TMO );
|
||||
fatal_directive_status( status, E_OK, "");
|
||||
fatal_directive_status( status, E_PAR, "");
|
||||
fatal_directive_status( status, E_RLWAI, "");
|
||||
fatal_directive_status( status, E_TMOUT, "");
|
||||
fatal_directive_status( status, E_CTX, "");
|
||||
|
||||
wup_tsk( ID );
|
||||
fatal_directive_status( status, E_OK, "");
|
||||
fatal_directive_status( status, E_ID, "");
|
||||
fatal_directive_status( status, E_NOEXS, "");
|
||||
fatal_directive_status( status, E_OACV, "");
|
||||
fatal_directive_status( status, E_OBJ, "");
|
||||
fatal_directive_status( status, E_QOVR, "");
|
||||
fatal_directive_status( status, EN_OBJNO, "");
|
||||
fatal_directive_status( status, EN_CTXID, "");
|
||||
|
||||
|
||||
can_tsk( INT, ID );
|
||||
fatal_directive_status( status, E_OK, "");
|
||||
fatal_directive_status( status, E_ID, "");
|
||||
fatal_directive_status( status, E_NOEXS, "");
|
||||
fatal_directive_status( status, E_OACV, "");
|
||||
fatal_directive_status( status, E_OBJ, "");
|
||||
fatal_directive_status( status, EN_OBJNO, "");
|
||||
fatal_directive_status( status, EN_CTXID, "");
|
||||
fatal_directive_status( status, EN_RPAR, "");
|
||||
#endif
|
||||
|
||||
puts( "*** END OF ITRON TASK TEST 2 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
This test forces and verifies error conditions for the task and task
|
||||
synchronization managers..
|
||||
|
||||
test set name: itrontask02
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk del_tsk dis_dsp ena_dsp exd_tsk ext_tsk
|
||||
frsm_tsk get_tid ref_tsk rel_wai rot_rdq rsm_tsk slp_tsk
|
||||
sta_tsk sus_tsk ter_tsk tslp_tsk wup_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verification of error codes from all task and task synchronization
|
||||
commands.
|
||||
|
||||
notes:
|
||||
Unimplementted functions are stubbed out and should be added when
|
||||
the functions are finished.
|
||||
|
||||
output:
|
||||
Name of command and expected error code.
|
||||
Test asserts when an unexpected error code or an error does not occur.
|
||||
@@ -1,80 +0,0 @@
|
||||
*** ITRON TASK TEST 2 ***
|
||||
Init - cre_tsk - Dormant Task
|
||||
Init - cre_tsk - Non-Dormant Task
|
||||
NON-DORMANT - Sleep for 2 minutes
|
||||
|
||||
*** Create Task Errors ***
|
||||
Init - cre_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - cre_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_tsk - cannot create TSK_SELF - E_ID
|
||||
Init - cre_tsk - invalid id; id already exists - E_OBJ
|
||||
Init - cre_tsk - tskatr is invalid - E_RSATR
|
||||
Init - cre_tsk - pk_ctsk is invalid - E_PAR
|
||||
Init - cre_tsk - itskpri is 0 - E_PAR
|
||||
Init - cre_tsk - itskpri is 257 - E_PAR
|
||||
Init - cre_tsk - stksz is invalid - E_PAR
|
||||
Init - cre_tsk - task is invalid - E_PAR
|
||||
|
||||
*** Delete Task Errors ***
|
||||
Init - del_tsk - cannot delete TSK_SELF - E_OBJ
|
||||
Init - del_tsk - task is not DORMANT - E_OBJ
|
||||
Init - del_tsk - task does not exist - E_NOEXS
|
||||
Init - del_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - del_tsk - cannot delete TSK_SELF - E_OBJ
|
||||
Init - del_tsk - bad id (between 0 and -4) - E_ID
|
||||
|
||||
*** Start Task Errors ***
|
||||
Init - sta_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - sta_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - sta_tsk - cannot start TSK_SELF - E_OBJ
|
||||
Init - sta_tsk - task is not DORMANT - E_OBJ
|
||||
Init - sta_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Terminate Other Task Errors ***
|
||||
Init - ter_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ
|
||||
Init - ter_tsk - task is not DORMANT - E_OBJ
|
||||
Init - ter_tsk - task does not exist - E_NOEXS
|
||||
Init - ter_tsk - access violation ( id less than -4) - E_OACV
|
||||
|
||||
*** Change Priority Task Errors ***
|
||||
Init - chg_pri - bad id (between 0 and -4) - E_ID
|
||||
Init - chg_pri - task is DORMANT - E_OBJ
|
||||
Init - chg_pri - task does not exist - E_NOEXS
|
||||
Init - chg_pri - access violation ( id less than -4) - E_OACV
|
||||
Init - chg_pri - invalid priority - E_PAR
|
||||
|
||||
*** Rotate Ready Queue Errors ***
|
||||
Init - rot_rdq - priority -1 - E_PAR
|
||||
Init - rot_rdq - priority 257 - E_PAR
|
||||
|
||||
*** Reference Task Status Errors ***
|
||||
Init - ref_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_tsk - task does not exist - E_NOEXS
|
||||
Init - ref_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - ref_tsk - packet address is bad - E_PAR
|
||||
|
||||
*** Suspend Task Errors ***
|
||||
Init - sus_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - sus_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - sus_tsk - cannot suspend SELF - E_OBJ
|
||||
Init - sus_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Resume Task Errors ***
|
||||
Init - rsm_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - rsm_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - rsm_tsk - cannot resume SELF - E_OBJ
|
||||
Init - rsm_tsk - task is DORMANT - E_OBJ
|
||||
Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK
|
||||
Init - rsm_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Forcibly Resume Task Errors ***
|
||||
Init - frsm_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - frsm_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ
|
||||
Init - frsm_tsk - task is DORMANT - E_OBJ
|
||||
Init - frsm_tsk - task does not exist - E_NOEXS
|
||||
Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK
|
||||
|
||||
*** END OF ITRON TASK TEST 2 ***
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Dormant_task();
|
||||
void Non_Dormant_task();
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 5
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define DORMANT_TASK_ID 2
|
||||
#define NON_DORMANT_TASK_ID 3
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itrontask03
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c preempt.c task1.c task2.c task3.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,144 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
T_RTSK pk_rtsk;
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
pk_ctsk.itskpri = PREEMPT_PRIORITY;
|
||||
pk_ctsk.task = Preempt_task;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 3 ***" );
|
||||
|
||||
/*
|
||||
* Create and start the Preempt task the first time.
|
||||
* Verify that it is dormant when it comes back.
|
||||
*/
|
||||
|
||||
puts( "INIT - Create and Start PREEMPT" );
|
||||
status = chg_pri( TSK_SELF, (PREEMPT_PRIORITY+2) );
|
||||
directive_failed( status, "chg_pri of SELF" );
|
||||
|
||||
status = cre_tsk( PREEMPT_TASK_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of RTEMS_PREEMPT" );
|
||||
|
||||
status = sta_tsk( PREEMPT_TASK_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
|
||||
puts( "INIT - rot_rdq - no tasks at this priority" );
|
||||
status = rot_rdq( 1 );
|
||||
directive_failed( status, "rot_rdq" );
|
||||
|
||||
puts( "INIT - ref_tsk PREEMPT - Validate DORMANT STATE" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
directive_failed( status, "INIT - ref_tsk of RTEMS_PREEMPT");
|
||||
fatal_directive_status(pk_rtsk.tskstat,TTS_DMT,"tskstat of PREEMPT");
|
||||
|
||||
/*
|
||||
* Restart the Preempt Task.
|
||||
*/
|
||||
|
||||
status = sta_tsk( PREEMPT_TASK_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
|
||||
puts( "INIT - rot_rdq - yielding processor" );
|
||||
status = rot_rdq( 1 );
|
||||
directive_failed( status, "rot_rdq" );
|
||||
puts( "INIT - ref_tsk PREEMPT - Validate no longer exists" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
fatal_directive_status( status, E_NOEXS, "tskstat of PREEMPT");
|
||||
status = chg_pri( TSK_SELF, PREEMPT_PRIORITY );
|
||||
directive_failed( status, "chg_pri of SELF" );
|
||||
|
||||
/*
|
||||
* XXX
|
||||
*/
|
||||
|
||||
pk_ctsk.itskpri = 3;
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.task = Task_2;
|
||||
status = cre_tsk( TA2_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.task = Task_3;
|
||||
status = cre_tsk( TA3_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA2" );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA3" );
|
||||
|
||||
status = ref_tsk( &pk_rtsk, TA1_ID);
|
||||
directive_failed( status, "INIT - ref_tsk of TA1");
|
||||
fatal_directive_status( pk_rtsk.tskstat, TTS_RDY , "tskstat of TA1");
|
||||
|
||||
puts( "INIT - suspending TA2 while middle task on a ready chain" );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = ref_tsk( &pk_rtsk, TA2_ID);
|
||||
directive_failed( status, "INIT - ref_tsk of TA2");
|
||||
fatal_directive_status( pk_rtsk.tskstat, TTS_SUS, "tskstat of TA2");
|
||||
|
||||
status = ter_tsk( TA1_ID );
|
||||
directive_failed( status, "ter_tsk of TA1" );
|
||||
status = del_tsk( TA1_ID );
|
||||
directive_failed( status, "del_tsk of TA1" );
|
||||
status = ter_tsk( TA2_ID );
|
||||
directive_failed( status, "ter_tsk of TA2" );
|
||||
status = ter_tsk( TA3_ID );
|
||||
directive_failed( status, "ter_tsk of TA3" );
|
||||
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1 at priority 1" );
|
||||
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA2" );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA3" );
|
||||
|
||||
exd_tsk();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
This test is based upon the test in sp0.
|
||||
|
||||
test set name: itrontask03
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk del_tsk exd_tsk rot_rdq sta_tsk sus_tsk ter_tsk
|
||||
|
||||
concepts: XXX - Verify
|
||||
|
||||
a. verifies rot_rdq can be used by equal priority tasks to correctly yeild the processor
|
||||
|
||||
b. Verifies sus_tsk suspends another task.
|
||||
|
||||
c. Verifies rot_rdq with a yeild process response.
|
||||
|
||||
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.
|
||||
|
||||
d. Verifies that a task can get the task identification number of
|
||||
another task.
|
||||
|
||||
e. Verifies the _Set_state routine where the task is not READY.
|
||||
|
||||
f. Verifies the break statement in the _Block_activate routine.
|
||||
|
||||
g. Verifies the while loop in the _Prev_tcb routine.
|
||||
|
||||
notes:
|
||||
|
||||
rtems_wake_after calls should be replaced with itron calls when
|
||||
the time functionality is added.
|
||||
|
||||
output:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
*** ITRON TASK TEST 3 ***
|
||||
INIT - Create and Start PREEMPT
|
||||
PREEMPT - ref_tsk validation
|
||||
PREEMPT - chg_pri increment priority
|
||||
PREEMPT - ext_tsk - going to DORMANT state
|
||||
INIT - rot_rdq - no tasks at this priority
|
||||
INIT - ref_tsk PREEMPT - Validate DORMANT STATE
|
||||
PREEMPT - ref_tsk validation
|
||||
PREEMPT - exd_tsk - Exit and Delete task
|
||||
INIT - rot_rdq - yielding processor
|
||||
INIT - ref_tsk PREEMPT - Validate no longer exists
|
||||
INIT - suspending TA2 while middle task on a ready chain
|
||||
TA1 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||
TA1 - chg_pri - set TA3's priority to 2
|
||||
TA1 - sus_tsk - suspend TA2
|
||||
TA1 - - delete TA2
|
||||
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
||||
TA3 - exd_tsk - exit and delete self
|
||||
*** ITRON TASK TEST 3 ***
|
||||
@@ -1,54 +0,0 @@
|
||||
/* 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.
|
||||
* 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 <assert.h>
|
||||
#include "system.h"
|
||||
|
||||
int Preempt_task_Count;
|
||||
|
||||
void Preempt_task()
|
||||
{
|
||||
ER status;
|
||||
T_RTSK pk_rtsk;
|
||||
|
||||
puts( "PREEMPT - ref_tsk validation" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK , "ref_tsk of PREEMPT");
|
||||
assert( pk_rtsk.tskpri == PREEMPT_PRIORITY );
|
||||
assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
|
||||
assert( pk_rtsk.task == Preempt_task );
|
||||
assert( pk_rtsk.stksz >= RTEMS_MINIMUM_STACK_SIZE );
|
||||
assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
|
||||
|
||||
if ( Preempt_task_Count == 0 ) {
|
||||
Preempt_task_Count ++;
|
||||
puts( "PREEMPT - chg_pri increment priority ");
|
||||
status = chg_pri( PREEMPT_TASK_ID, (PREEMPT_PRIORITY+1) );
|
||||
directive_failed( status, "chg_pri" );
|
||||
puts( "PREEMPT - ext_tsk - going to DORMANT state" );
|
||||
ext_tsk( );
|
||||
assert( 0 );
|
||||
} else {
|
||||
Preempt_task_Count ++;
|
||||
puts( "PREEMPT - exd_tsk - Exit and Delete task" );
|
||||
exd_tsk( );
|
||||
assert( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Preempt_task();
|
||||
void Task_1();
|
||||
void Task_2();
|
||||
void Task_3();
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 6
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define PREEMPT_TASK_ID 2
|
||||
#define TA1_ID 3
|
||||
#define TA2_ID 4
|
||||
#define TA3_ID 5
|
||||
|
||||
|
||||
#define PREEMPT_PRIORITY 1
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,57 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
void Task_1()
|
||||
{
|
||||
ER status;
|
||||
|
||||
/*
|
||||
* XXX - Change to itron routine.
|
||||
*/
|
||||
|
||||
puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
|
||||
status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
status = chg_pri( TA3_ID , 2 );
|
||||
directive_failed( status, "chg_pri" );
|
||||
|
||||
puts( "TA1 - chg_pri - set TA3's priority to 2" );
|
||||
|
||||
puts( "TA1 - sus_tsk - suspend TA2" );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
|
||||
puts( "TA1 - - delete TA2" );
|
||||
status = ter_tsk( TA2_ID );
|
||||
directive_failed( status, "ter_tsk of TA2" );
|
||||
|
||||
/*
|
||||
* XXX - Change to itron routine.
|
||||
*/
|
||||
|
||||
puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "*** ITRON TASK TEST 3 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
void Task_2()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
|
||||
status = rtems_task_wake_after( 60*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after in TA2" );
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
void Task_3()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
/*
|
||||
* XXX - Convert Later.
|
||||
*/
|
||||
|
||||
puts( "TA3 - rtems_task_wake_after - sleep 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after in TA3" );
|
||||
|
||||
|
||||
puts( "TA3 - exd_tsk - exit and delete self" );
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itrontask04
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c task1.c task2.c task3.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,93 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 4 ***" );
|
||||
|
||||
status = chg_pri( 0, 20 );
|
||||
directive_failed( status, "chg_pri to 20" );
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
pk_ctsk.itskpri = 2;
|
||||
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.task = Task_2;
|
||||
status = cre_tsk( TA2_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_3;
|
||||
status = cre_tsk( TA3_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
puts("INIT - dis_dsp while starting tasks");
|
||||
status = dis_dsp( );
|
||||
|
||||
/* dispatching disabled */
|
||||
|
||||
directive_failed_with_level( status, "dis_dsp from ITRON_Init", 1 );
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA1", 1 );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA2", 1 );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA3", 1 );
|
||||
|
||||
puts( "INIT - suspending TA2 3 times" );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
|
||||
puts("INIT - ena_dsp while starting tasks");
|
||||
status = ena_dsp( );
|
||||
|
||||
/* dispatching enabled again */
|
||||
|
||||
puts( "INIT - suspending TA1 3 times" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
|
||||
puts("INIT - exd_tsk");
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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: itrontask04
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk dis_dsp ena_dsp exd_tsk frsm_tsk rot_rdq rsm_tsk
|
||||
sta_tsk sus_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. This test check task suspend and resume functionality.
|
||||
|
||||
b. Verifies the suspend count works correctly.
|
||||
|
||||
c. Verifies the forced resume works correctly
|
||||
|
||||
d. Verifies the rotate ready queue works correctly
|
||||
|
||||
e. Verifies a task called with rtems suspend can be resumed
|
||||
with an itron resume call. ( XXX - May not be necessary. )
|
||||
|
||||
f. verifies rot_rdq can be used by non-equal priority tasks to correctly rotate ready queue.
|
||||
|
||||
g. Verifies enable dispatch and disable dispatch work.
|
||||
|
||||
notes:
|
||||
|
||||
This verision of ITRON does not provide a way for a task to
|
||||
suspend itself (only another task can suspend it). Therefore,
|
||||
the test calls rtems_task_suspend to suspend it.
|
||||
|
||||
rtems_task_wake_after calls should be replaced with itron call
|
||||
when the ITRON functionality is finished.
|
||||
|
||||
output:
|
||||
|
||||
XXX - Verify the output messages on this test. It looks like
|
||||
the suspend count doesn't look correct. ??? Nov 10, 99
|
||||
@@ -1,35 +0,0 @@
|
||||
*** ITRON TASK TEST 4 ***
|
||||
INIT - dis_dsp while starting tasks
|
||||
INIT - suspending TA2 3 times
|
||||
INIT - ena_dsp while starting tasks
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
INIT - suspending TA1 3 times
|
||||
INIT - exd_tsk
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
*** ITRON TASK TEST 4 ***
|
||||
@@ -1,47 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Preempt_task();
|
||||
void Task_1();
|
||||
void Task_2();
|
||||
void Task_3();
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 5
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define PREEMPT_TASK_ID 2
|
||||
#define TA1_ID 3
|
||||
#define TA2_ID 4
|
||||
#define TA3_ID 5
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,44 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
/*
|
||||
* XXX - This test requires tasks to suspend self, yet ITRON defines
|
||||
* this as an error.
|
||||
*/
|
||||
|
||||
void Task_1()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
while (1) {
|
||||
|
||||
puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
|
||||
status = rtems_task_suspend( RTEMS_SELF );
|
||||
directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
/*
|
||||
* XXX - This test requires tasks to suspend self, yet ITRON defines
|
||||
* this as an error.
|
||||
*/
|
||||
|
||||
void Task_2()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
while (1) {
|
||||
|
||||
puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
|
||||
status = rtems_task_suspend( RTEMS_SELF );
|
||||
directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/* 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-1999.
|
||||
* 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 "system.h"
|
||||
|
||||
void Task_3()
|
||||
{
|
||||
rtems_status_code status;
|
||||
int i;
|
||||
|
||||
for(i=0; i<5; i++) {
|
||||
puts("TA3 - frsm_tsk TA1");
|
||||
status = frsm_tsk( TA1_ID );
|
||||
directive_failed( status, "TA3 - frsm_tsk TA1" );
|
||||
|
||||
puts("TA3 - rsm_tsk TA2");
|
||||
status = rsm_tsk( TA2_ID );
|
||||
directive_failed( status, "TA3 - rsm_tsk TA2" );
|
||||
|
||||
puts( "TA3 - rot_rdq priority 2 queue");
|
||||
status = rot_rdq( 2 );
|
||||
directive_failed( status, "rot_rdq for 2" );
|
||||
|
||||
/*
|
||||
* XXX - Convert Later.
|
||||
*/
|
||||
|
||||
puts( "TA3 - rtems_task_wake_after - sleep 1 second" );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after in TA3" );
|
||||
}
|
||||
|
||||
puts( "*** ITRON TASK TEST 4 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
## $Id$
|
||||
|
||||
project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
|
||||
|
||||
$(project_bspdir)/tests:
|
||||
@$(mkinstalldirs) $@
|
||||
|
||||
$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
|
||||
$(INSTALL_PROGRAM) $< $@
|
||||
|
||||
$(project_bspdir)/tests/screens:
|
||||
@$(mkinstalldirs) $@
|
||||
|
||||
$(project_bspdir)/tests/screens/itrontests:
|
||||
@$(mkinstalldirs) $@
|
||||
|
||||
$(project_bspdir)/tests/screens/itrontests/$(TEST).scn: $(TEST).scn
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
TMPINSTALL_FILES = \
|
||||
$(project_bspdir)/tests \
|
||||
$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe \
|
||||
$(project_bspdir)/tests/screens \
|
||||
$(project_bspdir)/tests/screens/itrontests \
|
||||
$(project_bspdir)/tests/screens/itrontests/$(TEST).scn
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,41 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
TEST = itrontime01
|
||||
PGM = ${ARCH}/$(TEST).exe
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
C_FILES = init.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(TEST).%)
|
||||
|
||||
SRCS = $(DOCS) $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/itrontests.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-exe)
|
||||
|
||||
all-local: $(ARCH) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,62 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec 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: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
/*
|
||||
* get the current time in second since epoch (1970), change it since 1985,
|
||||
* compute the time in millisecond
|
||||
*
|
||||
*/
|
||||
|
||||
int time_sec_epoch( void ) {
|
||||
|
||||
int s_time,t_time,r_time;
|
||||
long m_sec;
|
||||
|
||||
t_time = time(NULL);
|
||||
s_time = (1985-1970)*365*24*60*60;
|
||||
r_time = t_time - s_time;
|
||||
m_sec = r_time*1000;
|
||||
|
||||
printf( "Time from 1970: %d\n", t_time );
|
||||
printf( "Time between 1970 and 1985: %d\n", s_time );
|
||||
printf( "Time from 1985: %d\n", r_time );
|
||||
printf("milliseconds: %ld\n",m_sec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON TIME TEST 01 ***\n" );
|
||||
printf( "The Time Services are not completely implemented.\n" );
|
||||
printf( "*** END OF ITRON TIME TEST 01 ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
*** ITRON TIME TEST 01 ***
|
||||
The Time Services are not completely implemented.
|
||||
*** END OF ITRON TIME TEST 01 ***
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
Reference in New Issue
Block a user