summaryrefslogtreecommitdiffstats
path: root/testsuites/itrontests/itronsem01
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2010-06-17 16:03:51 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2010-06-17 16:03:51 +0000
commit62812daba81dfec31cd3c49eb109121eb3d63e38 (patch)
tree75fc2c753130130eabc91a2eb3cc84fd335a34dd /testsuites/itrontests/itronsem01
parent2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-62812daba81dfec31cd3c49eb109121eb3d63e38.tar.bz2
Remove (Abandoned)
Diffstat (limited to 'testsuites/itrontests/itronsem01')
-rw-r--r--testsuites/itrontests/itronsem01/.cvsignore2
-rw-r--r--testsuites/itrontests/itronsem01/Makefile.am28
-rw-r--r--testsuites/itrontests/itronsem01/init.c332
-rw-r--r--testsuites/itrontests/itronsem01/itronsem01.doc12
-rw-r--r--testsuites/itrontests/itronsem01/itronsem01.scn61
-rw-r--r--testsuites/itrontests/itronsem01/system.h39
6 files changed, 0 insertions, 474 deletions
diff --git a/testsuites/itrontests/itronsem01/.cvsignore b/testsuites/itrontests/itronsem01/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/testsuites/itrontests/itronsem01/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/testsuites/itrontests/itronsem01/Makefile.am b/testsuites/itrontests/itronsem01/Makefile.am
deleted file mode 100644
index a303ff0c06..0000000000
--- a/testsuites/itrontests/itronsem01/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-##
-## $Id$
-##
-
-MANAGERS = all
-
-rtems_tests_PROGRAMS = itronsem01
-itronsem01_SOURCES = init.c system.h
-
-dist_rtems_tests_DATA = itronsem01.scn
-dist_rtems_tests_DATA += itronsem01.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-itronsem01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
-
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(itronsem01_OBJECTS) $(itronsem01_LDADD)
-LINK_LIBS = $(itronsem01_LDLIBS)
-
-itronsem01$(EXEEXT): $(itronsem01_OBJECTS) $(itronsem01_DEPENDENCIES)
- @rm -f itronsem01$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/itrontests/itronsem01/init.c b/testsuites/itrontests/itronsem01/init.c
deleted file mode 100644
index 302daa5a16..0000000000
--- a/testsuites/itrontests/itronsem01/init.c
+++ /dev/null
@@ -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-2009.
- * 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 CONFIGURE_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 );
- rtems_test_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 );
- rtems_test_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 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - cre_sem - bad id (between 0 and -4) - E_ID" );
- status = cre_sem( -4, &pk_csem );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - cre_sem - bad id (0) - E_ID" );
- status = cre_sem( 0, &pk_csem );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - cre_sem - bad id (too great) - E_ID" );
- status = cre_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_csem );
- rtems_test_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 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - cre_sem - create semaphore 1 again - E_OBJ" );
- status = cre_sem( 1, &pk_csem );
- rtems_test_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 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - del_sem - bad id (between 0 and -4) - E_ID" );
- status = del_sem( -4 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - del_sem - bad id (0) - E_ID" );
- status = del_sem( 0 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - del_sem - bad id (too great) - E_ID" );
- status = del_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - sig_sem - bad id (between 0 and -4) - E_ID" );
- status = sig_sem( -4 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - sig_sem - bad id (0) - E_ID" );
- status = sig_sem( 0 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - sig_sem - bad id (too great) - E_ID" );
- status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - preq_sem - bad id (between 0 and -4) - E_ID" );
- status = preq_sem( -4 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - preq_sem - bad id (0) - E_ID" );
- status = preq_sem( 0 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - preq_sem - bad id (too great) - E_ID" );
- status = preq_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - wai_sem - bad id (between 0 and -4) - E_ID" );
- status = wai_sem( -4 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - wai_sem - bad id (0) - E_ID" );
- status = wai_sem( 0 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - wai_sem - bad id (too great) - E_ID" );
- status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - twai_sem - bad id (between 0 and -4) - E_ID" );
- status = twai_sem( -4, 1000 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - twai_sem - bad id (0) - E_ID" );
- status = twai_sem( 0, 1000 );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - twai_sem - bad id (too great) - E_ID" );
- status = twai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, 1000 );
- rtems_test_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 );
- rtems_test_assert( status == E_OACV );
-
- puts( "Init - ref_sem - bad id (between 0 and -4) - E_ID" );
- status = ref_sem( -4, &pk_rsem );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - ref_sem - bad id (0) - E_ID" );
- status = ref_sem( 0, &pk_rsem );
- rtems_test_assert( status == E_ID );
-
- puts( "Init - ref_sem - bad id (too great) - E_ID" );
- status = ref_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_rsem );
- rtems_test_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 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - preq_sem - semaphore 1 available (count --> 0) - E_OK" );
- status = preq_sem( 1 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - preq_sem - semaphore 1 unavailable - E_TMOUT" );
- status = preq_sem( 1 );
- rtems_test_assert( status == E_TMOUT );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
- status = sig_sem( 1 );
- rtems_test_assert( status == E_OK );
-
- puts("Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK");
- status = twai_sem( 1, TMO_POL );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT" );
- status = twai_sem( 1, TMO_POL );
- rtems_test_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 );
- rtems_test_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 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 2) - E_OK" );
- status = sig_sem( 1 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 3) - E_OK" );
- status = sig_sem( 1 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR" );
- status = sig_sem( 1 );
- rtems_test_assert( status == E_QOVR );
-
- /*
- * Exercise ref_sem
- */
-
- puts( "Init - ref_sem - NULL pk_sem returns E_PAR" );
- status = ref_sem( 1, NULL );
- rtems_test_assert( status == E_PAR );
-
- puts( "Init - ref_sem - semaphore 1 - E_OK" );
- status = ref_sem( 1, &pk_rsem );
- rtems_test_assert( status == E_OK );
- printf( "Init - semaphore 1 count = %" PRId32 "\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 );
- rtems_test_assert( status == E_OK );
-
- puts( "Init - ref_sem - semaphore 1 - E_OK" );
- status = ref_sem( 1, &pk_rsem );
- rtems_test_assert( status == E_OK );
- printf( "Init - semaphore 1 count = %" PRId32 "\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 );
- rtems_test_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 );
- rtems_test_assert( status == E_OK );
-
- printf( "*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
- rtems_test_exit( 0 );
-}
diff --git a/testsuites/itrontests/itronsem01/itronsem01.doc b/testsuites/itrontests/itronsem01/itronsem01.doc
deleted file mode 100644
index 5c0baceb8d..0000000000
--- a/testsuites/itrontests/itronsem01/itronsem01.doc
+++ /dev/null
@@ -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.
-#
-
-
diff --git a/testsuites/itrontests/itronsem01/itronsem01.scn b/testsuites/itrontests/itronsem01/itronsem01.scn
deleted file mode 100644
index 33b81e2570..0000000000
--- a/testsuites/itrontests/itronsem01/itronsem01.scn
+++ /dev/null
@@ -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 ***
diff --git a/testsuites/itrontests/itronsem01/system.h b/testsuites/itrontests/itronsem01/system.h
deleted file mode 100644
index 5e468f266b..0000000000
--- a/testsuites/itrontests/itronsem01/system.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-2009.
- * 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 <rtems/itron.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 <rtems/confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */