summaryrefslogtreecommitdiffstats
path: root/c/src/tests/libtests/rtmonuse
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/tests/libtests/rtmonuse/.cvsignore2
-rw-r--r--c/src/tests/libtests/rtmonuse/Makefile.am42
-rw-r--r--c/src/tests/libtests/rtmonuse/getall.c42
-rw-r--r--c/src/tests/libtests/rtmonuse/init.c70
-rw-r--r--c/src/tests/libtests/rtmonuse/rtmonuse.scn27
-rw-r--r--c/src/tests/libtests/rtmonuse/system.h61
-rw-r--r--c/src/tests/libtests/rtmonuse/task1.c123
7 files changed, 0 insertions, 367 deletions
diff --git a/c/src/tests/libtests/rtmonuse/.cvsignore b/c/src/tests/libtests/rtmonuse/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/c/src/tests/libtests/rtmonuse/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/c/src/tests/libtests/rtmonuse/Makefile.am b/c/src/tests/libtests/rtmonuse/Makefile.am
deleted file mode 100644
index b153c9815d..0000000000
--- a/c/src/tests/libtests/rtmonuse/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-
-TEST = rtmonuse
-
-MANAGERS = io rate_monotonic
-
-C_FILES = init.c getall.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-include $(top_srcdir)/libtests.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
diff --git a/c/src/tests/libtests/rtmonuse/getall.c b/c/src/tests/libtests/rtmonuse/getall.c
deleted file mode 100644
index b2ce0f72cc..0000000000
--- a/c/src/tests/libtests/rtmonuse/getall.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Get_all_counters
- *
- * This routine allows TA5 to atomically obtain the iteration counters.
- *
- * 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$
- */
-
-#include "system.h"
-
-void Get_all_counters()
-{
- rtems_mode previous_mode;
- rtems_status_code status;
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode to RTEMS_NO_PREEMPT" );
-
- Temporary_count = Count;
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode to RTEMS_PREEMPT" );
-}
diff --git a/c/src/tests/libtests/rtmonuse/init.c b/c/src/tests/libtests/rtmonuse/init.c
deleted file mode 100644
index be2281f1c9..0000000000
--- a/c/src/tests/libtests/rtmonuse/init.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task 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:
- * 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$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-#include <rtems/rtmonuse.h>
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_status_code status;
-
- puts( "\n\n*** RATE MONOTONIC PERIOD STATISTICS TEST ***" );
- Period_usage_Initialize();
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_create(
- Task_name[ index ],
- Priorities[ index ],
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- (index == 5) ? RTEMS_FLOATING_POINT : RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
- }
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_start( Task_id[ index ], Task_1_through_5, index );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/c/src/tests/libtests/rtmonuse/rtmonuse.scn b/c/src/tests/libtests/rtmonuse/rtmonuse.scn
deleted file mode 100644
index bb4e8814da..0000000000
--- a/c/src/tests/libtests/rtmonuse/rtmonuse.scn
+++ /dev/null
@@ -1,27 +0,0 @@
-*** TEST 20 ***
-TA1 - rtems_rate_monotonic_create id = 0x28010001
-TA1 - rtems_rate_monotonic_ident id = 0x28010001
-TA1 - (0x28010001) period 2
-TA2 - rtems_rate_monotonic_create id = 0x28010002
-TA2 - rtems_rate_monotonic_ident id = 0x28010002
-TA2 - (0x28010002) period 2
-TA3 - rtems_rate_monotonic_create id = 0x28010003
-TA3 - rtems_rate_monotonic_ident id = 0x28010003
-TA3 - (0x28010003) period 2
-TA4 - rtems_rate_monotonic_create id = 0x28010004
-TA4 - rtems_rate_monotonic_ident id = 0x28010004
-TA4 - (0x28010004) period 2
-TA5 - rtems_rate_monotonic_create id = 0x28010005
-TA5 - rtems_rate_monotonic_ident id = 0x28010005
-TA5 - (0x28010005) period 100
-TA5 - PERIODS CHECK OK (1)
-TA5 - PERIODS CHECK OK (2)
-TA5 - PERIODS CHECK OK (3)
-TA5 - PERIODS CHECK OK (4)
-TA5 - PERIODS CHECK OK (5)
-TA5 - PERIODS CHECK OK (6)
-TA5 - PERIODS CHECK OK (7)
-TA5 - PERIODS CHECK OK (8)
-TA5 - PERIODS CHECK OK (9)
-TA5 - PERIODS CHECK OK (10)
-*** END OF TEST 20 ***
diff --git a/c/src/tests/libtests/rtmonuse/system.h b/c/src/tests/libtests/rtmonuse/system.h
deleted file mode 100644
index 67b1b9b0cd..0000000000
--- a/c/src/tests/libtests/rtmonuse/system.h
+++ /dev/null
@@ -1,61 +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>
-
-/* types */
-
-struct counters {
- rtems_unsigned32 count[6];
-};
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-);
-
-void Get_all_counters( void );
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 6
-#define CONFIGURE_MAXIMUM_PERIODS 10
-
-#define CONFIGURE_INIT_TASK_PRIORITY 10
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (15 * RTEMS_MINIMUM_STACK_SIZE)
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-TEST_EXTERN struct counters Count; /* iteration counters */
-TEST_EXTERN struct counters Temporary_count;
-extern rtems_task_priority Priorities[ 6 ];
-
-/* end of include file */
diff --git a/c/src/tests/libtests/rtmonuse/task1.c b/c/src/tests/libtests/rtmonuse/task1.c
deleted file mode 100644
index aae5cce94b..0000000000
--- a/c/src/tests/libtests/rtmonuse/task1.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Task_1_through_5
- *
- * This routine serves as a test task for the period capabilities of the
- * Rate Monotonic 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"
-
-#include <rtems/cpuuse.h>
-#include <rtems/rtmonuse.h>
-
-rtems_unsigned32 Periods[6] = { 0, 2, 2, 2, 2, 100 };
-rtems_unsigned32 Iterations[6] = { 0, 50, 50, 50, 50, 1 };
-rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 };
-
-rtems_task Task_1_through_5(
- rtems_unsigned32 argument
-)
-{
- rtems_id rmid;
- rtems_id test_rmid;
- rtems_unsigned32 index;
- rtems_unsigned32 pass;
- rtems_unsigned32 failed;
- rtems_status_code status;
-
- status = rtems_rate_monotonic_create( argument, &rmid );
- directive_failed( status, "rtems_rate_monotonic_create" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_create id = 0x%08x\n", rmid );
-
- status = rtems_rate_monotonic_ident( argument, &test_rmid );
- directive_failed( status, "rtems_rate_monotonic_ident" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_ident id = 0x%08x\n", test_rmid );
-
- if ( rmid != test_rmid ) {
- printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
- rtems_test_exit( 0 );
- }
-
- put_name( Task_name[ argument ], FALSE );
- printf( "- (0x%08x) period %d\n", rmid, Periods[ argument ] );
-
- status = rtems_task_wake_after( 2 );
- directive_failed( status, "rtems_task_wake_after" );
-
- switch ( argument ) {
- case 1:
- case 2:
- case 3:
- case 4:
- while ( FOREVER ) {
- Period_usage_Update( rmid );
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period" );
- Count.count[ argument ]++;
- }
- break;
- case 5:
- pass = 0;
- failed = 0;
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 1 of TA5" );
-
- Get_all_counters();
-
- while ( FOREVER ) {
- Period_usage_Update( rmid );
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 2 of TA5" );
-
- Get_all_counters();
-
- for( index = 1 ; index <= 4 ; index++ ) {
- if ( Temporary_count.count[ index ] != Iterations[ index ] ) {
- puts_nocr( "FAIL -- " );
- put_name ( Task_name[ index ], FALSE );
- printf ( " Actual=%d, Expected=%d\n",
- Temporary_count.count[ index ],
- Iterations[ index ]
- );
- failed += 1;
- }
- }
-
- if ( failed == 5 )
- rtems_test_exit( 0 );
-
- pass += 1;
-
- printf( "TA5 - PERIODS CHECK OK (%d)\n", pass );
-
- fflush( stdout );
-
- if ( pass == 10 ) {
- puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" );
- CPU_usage_Dump();
- Period_usage_Dump();
- rtems_test_exit( 0 );
- }
-
- }
- break;
- }
-}