From ac7d5ef06a6d6e8d84abbd1f0b82162725f98326 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 11 May 1995 17:39:37 +0000 Subject: Initial revision --- testsuites/mptests/mp11/init.c | 106 +++++++++++++++++++++++++++++++++ testsuites/mptests/mp11/node1/mp11.doc | 42 +++++++++++++ testsuites/mptests/mp11/node1/mp11.scn | 10 ++++ testsuites/mptests/mp11/node2/mp11.doc | 13 ++++ testsuites/mptests/mp11/node2/mp11.scn | 2 + testsuites/mptests/mp11/system.h | 30 ++++++++++ 6 files changed, 203 insertions(+) create mode 100644 testsuites/mptests/mp11/init.c create mode 100644 testsuites/mptests/mp11/node1/mp11.doc create mode 100644 testsuites/mptests/mp11/node1/mp11.scn create mode 100644 testsuites/mptests/mp11/node2/mp11.doc create mode 100644 testsuites/mptests/mp11/node2/mp11.scn create mode 100644 testsuites/mptests/mp11/system.h (limited to 'testsuites/mptests/mp11') diff --git a/testsuites/mptests/mp11/init.c b/testsuites/mptests/mp11/init.c new file mode 100644 index 0000000000..7adc391319 --- /dev/null +++ b/testsuites/mptests/mp11/init.c @@ -0,0 +1,106 @@ +/* Init + * + * This routine is the initialization and test routine for + * this test program. It attempts to create more global + * objects than are configured (zero should be configured). + * 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, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" +#undef EXTERN +#define EXTERN +#include "conftbl.h" +#include "gvar.h" + +rtems_unsigned8 my_partition[0x30000]; + +rtems_task Init( + rtems_task_argument argument +) +{ + rtems_id junk_id; + rtems_status_code status; + + printf( + "\n\n*** TEST 11 -- NODE %d ***\n", + Multiprocessing_configuration.node + ); + + Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); + Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' ); + + Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' ); + + Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' ); + + if ( Multiprocessing_configuration.node == 1 ) { + puts( "Attempting to create Test_task (Global)" ); + status = rtems_task_create( + Task_name[ 1 ], + 1, + 1024, + RTEMS_DEFAULT_MODES, + RTEMS_GLOBAL, + &junk_id + ); + fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_task_create" ); + puts( "rtems_task_create correctly returned RTEMS_TOO_MANY" ); + + puts( "Attempting to create Message Queue (Global)" ); + status = rtems_message_queue_create( + Queue_name[ 1 ], + 3, + RTEMS_GLOBAL|RTEMS_LIMIT, + &junk_id + ); + fatal_directive_status( + status, + RTEMS_TOO_MANY, + "rtems_message_queue_create" + ); + puts( "rtems_message_queue_create correctly returned RTEMS_TOO_MANY" ); + + puts( "Attempting to create Semaphore (Global)" ); + status = rtems_semaphore_create( + Semaphore_name[ 1 ], + 1, + RTEMS_GLOBAL, + &junk_id + ); + fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_semaphore_create" ); + puts( "rtems_semaphore_create correctly returned RTEMS_TOO_MANY" ); + + puts( "Attempting to create Partition (Global)" ); + status = rtems_partition_create( + 1, + (rtems_unsigned8 *) my_partition, + 128, + 64, + RTEMS_GLOBAL, + &junk_id + ); + fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_partition_create" ); + puts( "rtems_partition_create correctly returned RTEMS_TOO_MANY" ); + } + puts( "*** END OF TEST 11 ***" ); + exit( 0 ); +} diff --git a/testsuites/mptests/mp11/node1/mp11.doc b/testsuites/mptests/mp11/node1/mp11.doc new file mode 100644 index 0000000000..05113ec6b6 --- /dev/null +++ b/testsuites/mptests/mp11/node1/mp11.doc @@ -0,0 +1,42 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. +# On-Line Applications Research Corporation (OAR). +# All rights assigned to U.S. Government, 1994. +# +# This material may be reproduced by or for the U.S. Government pursuant +# to the copyright license under the clause at DFARS 252.227-7013. This +# notice must appear in all copies of this file and its derivatives. +# + +This file describes the directives and concepts tested by this test set. + +test set name: test60 + +TOO MANY GLOBAL OBJECTS ERROR TEST + +directives: + ex_init, ex_start, t_create, t_start, tm_tick, i_return, + t_create, q_create, sm_create, pt_create + +concepts: + + 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 handler 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 all object create directives correctly return + E_TOOMANYGOBJECTS. diff --git a/testsuites/mptests/mp11/node1/mp11.scn b/testsuites/mptests/mp11/node1/mp11.scn new file mode 100644 index 0000000000..fb26583852 --- /dev/null +++ b/testsuites/mptests/mp11/node1/mp11.scn @@ -0,0 +1,10 @@ +*** TEST 11 -- NODE 1 *** +Attempting to create Test_task (Global) +rtems_task_create correctly returned RTEMS_TOO_MANY +Attempting to create Message Queue (Global) +rtems_message_queue_create correctly returned RTEMS_TOO_MANY +Attempting to create Semaphore (Global) +rtems_semaphore_create correctly returned RTEMS_TOO_MANY +Attempting to create Partition (Global) +rtems_partition_create correctly returned RTEMS_TOO_MANY +*** END OF TEST 11 *** diff --git a/testsuites/mptests/mp11/node2/mp11.doc b/testsuites/mptests/mp11/node2/mp11.doc new file mode 100644 index 0000000000..0de40191c6 --- /dev/null +++ b/testsuites/mptests/mp11/node2/mp11.doc @@ -0,0 +1,13 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. +# On-Line Applications Research Corporation (OAR). +# All rights assigned to U.S. Government, 1994. +# +# This material may be reproduced by or for the U.S. Government pursuant +# to the copyright license under the clause at DFARS 252.227-7013. This +# notice must appear in all copies of this file and its derivatives. +# + + diff --git a/testsuites/mptests/mp11/node2/mp11.scn b/testsuites/mptests/mp11/node2/mp11.scn new file mode 100644 index 0000000000..49bd8a3219 --- /dev/null +++ b/testsuites/mptests/mp11/node2/mp11.scn @@ -0,0 +1,2 @@ +*** TEST 11 -- NODE 2 *** +*** END OF TEST 11 *** diff --git a/testsuites/mptests/mp11/system.h b/testsuites/mptests/mp11/system.h new file mode 100644 index 0000000000..aa2c6d17e4 --- /dev/null +++ b/testsuites/mptests/mp11/system.h @@ -0,0 +1,30 @@ +/* system.h + * + * This include file contains information that is included in every + * function in the test set. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include +#include "tmacros.h" + +/* Miscellaneous */ + +#define EXTERN extern /* external definition */ + +/* macros */ + +/* structures */ + +#include "gvar.h" + +/* end of include file */ -- cgit v1.2.3