diff options
Diffstat (limited to '')
-rw-r--r-- | testsuites/itrontests/itrontask03/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/Makefile.am | 28 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/init.c | 137 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/itrontask03.doc | 54 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/itrontask03.scn | 21 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/preempt.c | 52 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/system.h | 49 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/task1.c | 57 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/task2.c | 31 | ||||
-rw-r--r-- | testsuites/itrontests/itrontask03/task3.c | 39 |
10 files changed, 0 insertions, 470 deletions
diff --git a/testsuites/itrontests/itrontask03/.cvsignore b/testsuites/itrontests/itrontask03/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/testsuites/itrontests/itrontask03/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/testsuites/itrontests/itrontask03/Makefile.am b/testsuites/itrontests/itrontask03/Makefile.am deleted file mode 100644 index 5d4a514977..0000000000 --- a/testsuites/itrontests/itrontask03/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## -## $Id$ -## - -MANAGERS = all - -rtems_tests_PROGRAMS = itrontask03 -itrontask03_SOURCES = init.c preempt.c task1.c task2.c task3.c system.h - -dist_rtems_tests_DATA = itrontask03.scn -dist_rtems_tests_DATA += itrontask03.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -itrontask03_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(itrontask03_OBJECTS) $(itrontask03_LDADD) -LINK_LIBS = $(itrontask03_LDLIBS) - -itrontask03$(EXEEXT): $(itrontask03_OBJECTS) $(itrontask03_DEPENDENCIES) - @rm -f itrontask03$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/itrontests/itrontask03/init.c b/testsuites/itrontests/itrontask03/init.c deleted file mode 100644 index 1b204805d0..0000000000 --- a/testsuites/itrontests/itrontask03/init.c +++ /dev/null @@ -1,137 +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> - -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(); - rtems_test_assert(0); -} diff --git a/testsuites/itrontests/itrontask03/itrontask03.doc b/testsuites/itrontests/itrontask03/itrontask03.doc deleted file mode 100644 index 35cf95f975..0000000000 --- a/testsuites/itrontests/itrontask03/itrontask03.doc +++ /dev/null @@ -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: - - - - - - diff --git a/testsuites/itrontests/itrontask03/itrontask03.scn b/testsuites/itrontests/itrontask03/itrontask03.scn deleted file mode 100644 index 50b468e44a..0000000000 --- a/testsuites/itrontests/itrontask03/itrontask03.scn +++ /dev/null @@ -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 -*** END OF ITRON TASK TEST 3 *** diff --git a/testsuites/itrontests/itrontask03/preempt.c b/testsuites/itrontests/itrontask03/preempt.c deleted file mode 100644 index 0ff6101c23..0000000000 --- a/testsuites/itrontests/itrontask03/preempt.c +++ /dev/null @@ -1,52 +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-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 "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"); - rtems_test_assert( pk_rtsk.tskpri == PREEMPT_PRIORITY ); - rtems_test_assert( pk_rtsk.itskpri == PREEMPT_PRIORITY ); - rtems_test_assert( pk_rtsk.task == Preempt_task ); - rtems_test_assert( pk_rtsk.stksz >= RTEMS_MINIMUM_STACK_SIZE ); - rtems_test_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( ); - rtems_test_assert( 0 ); - } else { - Preempt_task_Count ++; - puts( "PREEMPT - exd_tsk - Exit and Delete task" ); - exd_tsk( ); - rtems_test_assert( 0 ); - } -} diff --git a/testsuites/itrontests/itrontask03/system.h b/testsuites/itrontests/itrontask03/system.h deleted file mode 100644 index 400fdd0a18..0000000000 --- a/testsuites/itrontests/itrontask03/system.h +++ /dev/null @@ -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 <rtems/itron.h> - -/* functions */ - -void ITRON_Init( void ); -void Preempt_task(void); -void Task_1(void); -void Task_2(void); -void Task_3(void); - -/* 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 <rtems/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 */ diff --git a/testsuites/itrontests/itrontask03/task1.c b/testsuites/itrontests/itrontask03/task1.c deleted file mode 100644 index f5f75bb456..0000000000 --- a/testsuites/itrontests/itrontask03/task1.c +++ /dev/null @@ -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-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 "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*rtems_clock_get_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*rtems_clock_get_ticks_per_second() ); - directive_failed( status, "rtems_task_wake_after" ); - - puts( "*** END OF ITRON TASK TEST 3 ***" ); - rtems_test_exit( 0 ); -} diff --git a/testsuites/itrontests/itrontask03/task2.c b/testsuites/itrontests/itrontask03/task2.c deleted file mode 100644 index 2541a80f66..0000000000 --- a/testsuites/itrontests/itrontask03/task2.c +++ /dev/null @@ -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-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 "system.h" - -void Task_2() -{ - rtems_status_code status; - - puts( "TA2 - rtems_task_wake_after - sleep 1 minute" ); - status = rtems_task_wake_after( 60*rtems_clock_get_ticks_per_second() ); - directive_failed( status, "rtems_task_wake_after in TA2" ); -} diff --git a/testsuites/itrontests/itrontask03/task3.c b/testsuites/itrontests/itrontask03/task3.c deleted file mode 100644 index 7e394d99c3..0000000000 --- a/testsuites/itrontests/itrontask03/task3.c +++ /dev/null @@ -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-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 "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*rtems_clock_get_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" ); -} |