forked from Imagelibrary/rtems
Initial revision
This commit is contained in:
39
testsuites/README
Normal file
39
testsuites/README
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This is the directory under which the RTEMS
|
||||
test programs provided with the release are located. The
|
||||
following is a description of the contents of each file and
|
||||
subdirectory directly in this directory:
|
||||
|
||||
NOTE: Other than the 'samples' directory these tests are intended
|
||||
only to exercise RTEMS features and are *not* good examples
|
||||
of programming for RTEMS.
|
||||
|
||||
samples
|
||||
|
||||
This directory contains a set of simple sample applications
|
||||
which can be used either to test a board support package
|
||||
or as the starting point for a custom application.
|
||||
|
||||
mptest
|
||||
|
||||
This directory contains the RTEMS Multiprocessor Test Suite.
|
||||
The tests in this directory provide near complete (98%+) test
|
||||
coverage of the multiprocessor specific code in RTEMS.
|
||||
|
||||
sptest
|
||||
|
||||
This directory contains the RTEMS Single Processor Test Suite.
|
||||
The tests in this directory provide near complete (98%+) test
|
||||
coverage of the non-multiprocessor code in RTEMS.
|
||||
|
||||
tmtest
|
||||
|
||||
This directory contains the RTEMS Timing Test Suite.
|
||||
The tests in this directory are used to measure the execution
|
||||
time of RTEMS directive and some critical internal functions.
|
||||
The results of these test are reported in the Fact Sheets
|
||||
and Supplental Manuals.
|
||||
|
||||
10
testsuites/libtests/README
Normal file
10
testsuites/libtests/README
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This directory contains tests for some of the items in
|
||||
the lib directories. The intent is to be able to
|
||||
verify the basic functionality of a library. For example,
|
||||
it is important to know that the stack checker successfully
|
||||
detects tasks which both stay within and exceed their
|
||||
stack limits.
|
||||
47
testsuites/libtests/stackchk/blow.c
Normal file
47
testsuites/libtests/stackchk/blow.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* task1.c
|
||||
*
|
||||
* This set of three tasks do some simple task switching for about
|
||||
* 15 seconds and then call a routine to "blow the stack".
|
||||
*
|
||||
* 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 <rtems/system.h>
|
||||
#include <rtems/heap.h>
|
||||
#include <rtems/thread.h>
|
||||
|
||||
void b() {}
|
||||
|
||||
void blow_stack( void )
|
||||
{
|
||||
volatile unsigned32 *low, *high;
|
||||
|
||||
b();
|
||||
/*
|
||||
* Destroy the first and last 16 bytes of our stack... Hope it
|
||||
* does not cause problems :)
|
||||
*/
|
||||
|
||||
low = _Thread_Executing->Start.Initial_stack.area + HEAP_OVERHEAD;
|
||||
high = _Thread_Executing->Start.Initial_stack.area +
|
||||
_Thread_Executing->Start.Initial_stack.size - 16;
|
||||
|
||||
low[0] = 0x11111111;
|
||||
low[1] = 0x22222222;
|
||||
low[2] = 0x33333333;
|
||||
low[3] = 0x44444444;
|
||||
|
||||
high[0] = 0x55555555;
|
||||
high[1] = 0x66666666;
|
||||
high[2] = 0x77777777;
|
||||
high[3] = 0x88888888;
|
||||
|
||||
}
|
||||
89
testsuites/libtests/stackchk/init.c
Normal file
89
testsuites/libtests/stackchk/init.c
Normal file
@@ -0,0 +1,89 @@
|
||||
/* 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, 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 "app.h"
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#include "conftbl.h"
|
||||
#include "gvar.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_time_of_day time;
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "\n\n*** TEST STACK CHECKER ***" );
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
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', ' ' );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
1,
|
||||
TASK_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA1" );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 2 ],
|
||||
1,
|
||||
TASK_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 2 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA2" );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 3 ],
|
||||
1,
|
||||
TASK_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 3 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA3" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA1" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA2" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA3" );
|
||||
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
9
testsuites/libtests/stackchk/stackchk.scn
Normal file
9
testsuites/libtests/stackchk/stackchk.scn
Normal file
@@ -0,0 +1,9 @@
|
||||
*** TEST STACK CHECKER ***
|
||||
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
|
||||
TA1 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
---> error indictation
|
||||
44
testsuites/libtests/stackchk/task1.c
Normal file
44
testsuites/libtests/stackchk/task1.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* task1.c
|
||||
*
|
||||
* This set of three tasks do some simple task switching for about
|
||||
* 15 seconds and then call a routine to "blow the stack".
|
||||
*
|
||||
* 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 "app.h"
|
||||
|
||||
rtems_task Task_1_through_3(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_id tid;
|
||||
rtems_time_of_day time;
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
while( FOREVER ) {
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
directive_failed( status, "rtems_clock_get" );
|
||||
|
||||
if ( time.second >= 15 && tid == Task_id[ 1 ] ) {
|
||||
blow_stack();
|
||||
}
|
||||
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
10
testsuites/mptests/README
Normal file
10
testsuites/mptests/README
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This directory contains the RTEMS Multiprocessor Test Suite.
|
||||
The tests in this directory provide near complete (98%+) test
|
||||
coverage of the multiprocessor specific code in RTEMS.
|
||||
|
||||
These tests are designed to test RTEMS in a two node configuration.
|
||||
|
||||
99
testsuites/mptests/mp01/init.c
Normal file
99
testsuites/mptests/mp01/init.c
Normal file
@@ -0,0 +1,99 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_time_of_day time;
|
||||
char c;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 1 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
if ( Multiprocessing_configuration.node != 1 ) c = 'S';
|
||||
else c = 'M';
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( c, 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( c, 'A', '2', ' ' );
|
||||
Task_name[ 3 ] = rtems_build_name( c, 'A', '3', ' ' );
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
puts( "Creating task 1 (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of Task 1" );
|
||||
|
||||
puts( "Creating task 2 (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 2 ],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 2 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of Task 2" );
|
||||
|
||||
puts( "Creating task 3 (Local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 3 ],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 3 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of Task 3" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start of Task 1" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 2 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start of Task 2" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 3 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start of Task 3" );
|
||||
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
53
testsuites/mptests/mp01/node1/mp01.doc
Normal file
53
testsuites/mptests/mp01/node1/mp01.doc
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# $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: test50
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
tm_set, tm_get, tm_wkafter, t_delete
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of a global task on the local processor.
|
||||
|
||||
i. Verifies that a task can delete itself or a global task on
|
||||
the local processor.
|
||||
|
||||
j. Verifies Shared Memory Locked Queue driver for initialization,
|
||||
getting a packet, broadcasting a packet, and returning a packet.
|
||||
|
||||
k. Can be used to verify that global packet type P_SYSVERIFY,
|
||||
P_OBJCREATE (task), and P_OBJDELETE (task) are sent and
|
||||
correctly processed by a remote node.
|
||||
15
testsuites/mptests/mp01/node1/mp01.scn
Normal file
15
testsuites/mptests/mp01/node1/mp01.scn
Normal file
@@ -0,0 +1,15 @@
|
||||
*** TEST 1 -- NODE 1 ***
|
||||
Creating task 1 (Global)
|
||||
Creating task 2 (Global)
|
||||
Creating task 3 (Local)
|
||||
MA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
MA2 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
MA3 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
MA1 - rtems_clock_get - 09:00:05 12/31/1988
|
||||
MA1 - deleting self
|
||||
MA2 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
MA2 - waiting to be deleted by MA3
|
||||
MA3 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
MA3 - getting TID of MA2
|
||||
MA3 - deleting MA2
|
||||
*** END OF TEST 1 ***
|
||||
13
testsuites/mptests/mp01/node2/mp01.doc
Normal file
13
testsuites/mptests/mp01/node2/mp01.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
15
testsuites/mptests/mp01/node2/mp01.scn
Normal file
15
testsuites/mptests/mp01/node2/mp01.scn
Normal file
@@ -0,0 +1,15 @@
|
||||
*** TEST 1 -- NODE 2 ***
|
||||
Creating task 1 (Global)
|
||||
Creating task 2 (Global)
|
||||
Creating task 3 (Local)
|
||||
SA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
SA2 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
SA3 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
SA1 - rtems_clock_get - 09:00:05 12/31/1988
|
||||
SA1 - deleting self
|
||||
SA2 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
SA2 - waiting to be deleted by SA3
|
||||
SA3 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
SA3 - getting TID of SA2
|
||||
SA3 - deleting SA2
|
||||
*** END OF TEST 1 ***
|
||||
30
testsuites/mptests/mp01/system.h
Normal file
30
testsuites/mptests/mp01/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
84
testsuites/mptests/mp01/task1.c
Normal file
84
testsuites/mptests/mp01/task1.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task is used for three test tasks. It obtains its task id and
|
||||
* based upon that id, performs certain actions.
|
||||
*
|
||||
* Task_1 delays 5 seconds and deletes itself.
|
||||
* Task_2 delays 10 seconds and then loops until
|
||||
* deleted by the third task.
|
||||
* Task 3 delays 15 seconds, then deletes task 2 and itself.
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_id tid;
|
||||
rtems_time_of_day time;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
directive_failed( status, "rtems_clock_get" );
|
||||
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
directive_failed( status, "rtems_clock_get" );
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||
|
||||
if ( task_number(tid) == 1 ) { /* TASK 1 */
|
||||
put_name( Task_name[ 1 ], FALSE );
|
||||
printf( " - deleting self\n" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
else if ( task_number(tid) == 2 ) { /* TASK 2 */
|
||||
put_name( Task_name[ 2 ], FALSE );
|
||||
printf( " - waiting to be deleted by " );
|
||||
put_name( Task_name[ 3 ], TRUE );
|
||||
while ( FOREVER );
|
||||
}
|
||||
else { /* TASK 3 */
|
||||
put_name( Task_name[ 3 ], FALSE );
|
||||
printf( " - getting TID of " );
|
||||
put_name( Task_name[ 2 ], TRUE );
|
||||
do {
|
||||
status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
put_name( Task_name[ 3 ], FALSE );
|
||||
printf( " - deleting " );
|
||||
put_name( Task_name[ 2 ], TRUE );
|
||||
status = rtems_task_delete( tid );
|
||||
directive_failed( status, "rtems_task_delete of Task 2" );
|
||||
|
||||
puts( "*** END OF TEST 1 ***" );
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
63
testsuites/mptests/mp02/init.c
Normal file
63
testsuites/mptests/mp02/init.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 2 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[Multiprocessing_configuration.node],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_NO_PREEMPT,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
47
testsuites/mptests/mp02/node1/mp02.doc
Normal file
47
testsuites/mptests/mp02/node1/mp02.doc
Normal file
@@ -0,0 +1,47 @@
|
||||
#
|
||||
# $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: test51
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
tm_set, tm_get, tm_wkafter, t_delete, t_restart, t_getreg, t_setreg
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verifies system can create and start both the executive's system
|
||||
initialization and idle task.
|
||||
|
||||
b. Verifies can print strings to the CRT on port 2 of the mvme136 board
|
||||
using Print and Println in the board support package.
|
||||
|
||||
c. Verifies interrupt handler can handler a task switch from an interrupt
|
||||
as specified with the i_return directive.
|
||||
|
||||
d. Verifies executive initialization performed correctly.
|
||||
|
||||
e. Verifies that a task can get the task identification number of itself.
|
||||
|
||||
f. Verifies that a task can get the task identification number
|
||||
of another task.
|
||||
|
||||
g. Verifies that a task can delete itself or another task.
|
||||
|
||||
h. Verifies that errors are returned in the following situations:
|
||||
1) when attempting to delete a remote task.
|
||||
2) when attempting to start a remote task.
|
||||
3) when attempting to restart a remote task.
|
||||
|
||||
i. Verifies that a remote task's registers can be set and read.
|
||||
14
testsuites/mptests/mp02/node1/mp02.scn
Normal file
14
testsuites/mptests/mp02/node1/mp02.scn
Normal file
@@ -0,0 +1,14 @@
|
||||
*** TEST 2 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 222
|
||||
Getting TID of remote task (all nodes)
|
||||
Getting TID of remote task (1 node)
|
||||
rtems_task_delete of remote task returned the correct error
|
||||
rtems_task_start of remote task returned the correct error
|
||||
rtems_task_restart of remote task returned the correct error
|
||||
Setting notepad 1 of the remote task to 1
|
||||
Getting a notepad of the remote task
|
||||
Remote notepad set and read correctly
|
||||
*** END OF TEST 2 ***
|
||||
13
testsuites/mptests/mp02/node2/mp02.doc
Normal file
13
testsuites/mptests/mp02/node2/mp02.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
14
testsuites/mptests/mp02/node2/mp02.scn
Normal file
14
testsuites/mptests/mp02/node2/mp02.scn
Normal file
@@ -0,0 +1,14 @@
|
||||
*** TEST 2 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 111
|
||||
Getting TID of remote task (all nodes)
|
||||
Getting TID of remote task (1 node)
|
||||
rtems_task_delete of remote task returned the correct error
|
||||
rtems_task_start of remote task returned the correct error
|
||||
rtems_task_restart of remote task returned the correct error
|
||||
Setting notepad 2 of the remote task to 2
|
||||
Getting a notepad of the remote task
|
||||
Remote notepad set and read correctly
|
||||
*** END OF TEST 2 ***
|
||||
30
testsuites/mptests/mp02/system.h
Normal file
30
testsuites/mptests/mp02/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
118
testsuites/mptests/mp02/task1.c
Normal file
118
testsuites/mptests/mp02/task1.c
Normal file
@@ -0,0 +1,118 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task tests the rtems_task_set_note directive on a remote task and that
|
||||
* errors are returned when attempting to delete, start, or restart
|
||||
* a remote task.
|
||||
*
|
||||
* 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"
|
||||
|
||||
extern rtems_multiprocessing_table Multiprocessing_configuration;
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_id tid;
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_id test_tid;
|
||||
rtems_unsigned32 note;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
|
||||
remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
|
||||
printf( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task (all nodes)" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
puts( "Getting TID of remote task (1 node)" );
|
||||
status = rtems_task_ident( Task_name[ remote_node ], remote_node, &test_tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
if ( test_tid != remote_tid ) {
|
||||
puts( "rtems_task_ident tid's do not match!!" );
|
||||
rtems_fatal_error_occurred( status );
|
||||
}
|
||||
|
||||
status = rtems_task_delete( remote_tid );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_task_delete of remote task"
|
||||
);
|
||||
puts( "rtems_task_delete of remote task returned the correct error" );
|
||||
|
||||
status = rtems_task_start( remote_tid, Test_task, 0 );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_task_start of remote task"
|
||||
);
|
||||
puts( "rtems_task_start of remote task returned the correct error" );
|
||||
|
||||
status = rtems_task_restart( remote_tid, 0 );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_task_restart of remote task"
|
||||
);
|
||||
puts( "rtems_task_restart of remote task returned the correct error" );
|
||||
|
||||
printf(
|
||||
"Setting notepad %d of the remote task to %d\n",
|
||||
rtems_get_node(tid),
|
||||
rtems_get_node(tid)
|
||||
);
|
||||
status = rtems_task_set_note(
|
||||
remote_tid,
|
||||
rtems_get_node(tid),
|
||||
rtems_get_node(tid)
|
||||
);
|
||||
directive_failed( status, "rtems_task_set_note" );
|
||||
|
||||
puts( "Getting a notepad of the remote task" );
|
||||
status = rtems_task_get_note( remote_tid, rtems_get_node(tid), ¬e );
|
||||
directive_failed( status, "rtems_task_get_note" );
|
||||
|
||||
if ( note == rtems_get_node(tid) )
|
||||
puts( "Remote notepad set and read correctly" );
|
||||
else
|
||||
printf(
|
||||
"FAILURE!! Remote notepad was not set and read correctly (%d, %d)\n",
|
||||
note,
|
||||
rtems_get_node( tid )
|
||||
);
|
||||
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "*** END OF TEST 2 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
31
testsuites/mptests/mp03/delay.c
Normal file
31
testsuites/mptests/mp03/delay.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Delayed_send_event
|
||||
*
|
||||
* This routine is a timer service routine which sends an event to task 1.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_16 );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
}
|
||||
68
testsuites/mptests/mp03/init.c
Normal file
68
testsuites/mptests/mp03/init.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 3 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ Multiprocessing_configuration.node ],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_NO_PREEMPT,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
|
||||
|
||||
status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
|
||||
directive_failed( status, "rtems_timer_create" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
45
testsuites/mptests/mp03/node1/mp03.doc
Normal file
45
testsuites/mptests/mp03/node1/mp03.doc
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# $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: test52
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
tm_wkafter, t_suspend, t_resume
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of another task (on another node).
|
||||
|
||||
i. Verifies that a task can suspend and resume a remote task.
|
||||
24
testsuites/mptests/mp03/node1/mp03.scn
Normal file
24
testsuites/mptests/mp03/node1/mp03.scn
Normal file
@@ -0,0 +1,24 @@
|
||||
*** TEST 3 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting TID of remote task
|
||||
Remote task's name is : 222
|
||||
111 - Suspending remote task
|
||||
111 - Resuming remote task
|
||||
111 - Suspending remote task
|
||||
111 - Resuming remote task
|
||||
111 - Suspending remote task
|
||||
111 - Resuming remote task
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
|
||||
........
|
||||
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
111 - Have I been suspended?????
|
||||
*** END OF TEST 3 ***
|
||||
13
testsuites/mptests/mp03/node2/mp03.doc
Normal file
13
testsuites/mptests/mp03/node2/mp03.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
24
testsuites/mptests/mp03/node2/mp03.scn
Normal file
24
testsuites/mptests/mp03/node2/mp03.scn
Normal file
@@ -0,0 +1,24 @@
|
||||
*** TEST 3 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting TID of remote task
|
||||
Remote task's name is : 111
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
|
||||
........
|
||||
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
222 - Have I been suspended?????
|
||||
222 - Suspending remote task
|
||||
222 - Resuming remote task
|
||||
222 - Suspending remote task
|
||||
222 - Resuming remote task
|
||||
222 - Suspending remote task
|
||||
222 - Resuming remote task
|
||||
*** END OF TEST 3 ***
|
||||
30
testsuites/mptests/mp03/system.h
Normal file
30
testsuites/mptests/mp03/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
155
testsuites/mptests/mp03/task1.c
Normal file
155
testsuites/mptests/mp03/task1.c
Normal file
@@ -0,0 +1,155 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task suspends and resumes a remote task.
|
||||
*
|
||||
* 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"
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Test_Task_Support
|
||||
*
|
||||
*/
|
||||
|
||||
void Test_Task_Support(
|
||||
rtems_unsigned32 node
|
||||
)
|
||||
{
|
||||
rtems_event_set events;
|
||||
rtems_status_code status;
|
||||
|
||||
if ( Multiprocessing_configuration.node == node ) {
|
||||
|
||||
for ( ; ; ) {
|
||||
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_NO_WAIT,
|
||||
RTEMS_NO_TIMEOUT,
|
||||
&events
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
break;
|
||||
|
||||
fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
|
||||
|
||||
status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
put_name( Task_name[ node ], FALSE );
|
||||
puts( " - Suspending remote task" );
|
||||
|
||||
status = rtems_task_suspend( remote_tid );
|
||||
directive_failed( status, "rtems_task_suspend" );
|
||||
|
||||
status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
put_name( Task_name[ node ], FALSE );
|
||||
puts( " - Resuming remote task" );
|
||||
|
||||
status = rtems_task_resume( remote_tid ) ;
|
||||
directive_failed( status, "rtems_task_resume" );
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for ( ; ; ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_NO_WAIT,
|
||||
RTEMS_NO_TIMEOUT,
|
||||
&events
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
break;
|
||||
|
||||
fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
|
||||
|
||||
put_name( Task_name[ remote_node ], FALSE );
|
||||
puts( " - have I been suspended???" );
|
||||
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND / 2 );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Test_task
|
||||
*/
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_id tid;
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
|
||||
printf( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
5 * TICKS_PER_SECOND,
|
||||
Delayed_send_event,
|
||||
NULL
|
||||
);
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
Test_Task_Support( 1 );
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
5 * TICKS_PER_SECOND,
|
||||
Delayed_send_event,
|
||||
NULL
|
||||
);
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
|
||||
Test_Task_Support( 2 );
|
||||
|
||||
puts( "*** END OF TEST 3 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
63
testsuites/mptests/mp04/init.c
Normal file
63
testsuites/mptests/mp04/init.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 4 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ Multiprocessing_configuration.node ],
|
||||
Multiprocessing_configuration.node,
|
||||
2048,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
41
testsuites/mptests/mp04/node1/mp04.doc
Normal file
41
testsuites/mptests/mp04/node1/mp04.doc
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# $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: test53
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, i_return, t_ident, tm_get,
|
||||
tm_wkafter, tm_setpri
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verifies system can create and start both the executive's system
|
||||
initialization and idle task.
|
||||
|
||||
b. Verifies that the system can get the id of a remote task.
|
||||
|
||||
c. Verifies that the system can change the priority of a remote
|
||||
task.
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can delete itself or another task.
|
||||
8
testsuites/mptests/mp04/node1/mp04.scn
Normal file
8
testsuites/mptests/mp04/node1/mp04.scn
Normal file
@@ -0,0 +1,8 @@
|
||||
*** TEST 4 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting TID of remote task
|
||||
Remote task's name is : 222
|
||||
Local task priority has been set
|
||||
*** END OF TEST 4 ***
|
||||
13
testsuites/mptests/mp04/node2/mp04.doc
Normal file
13
testsuites/mptests/mp04/node2/mp04.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
8
testsuites/mptests/mp04/node2/mp04.scn
Normal file
8
testsuites/mptests/mp04/node2/mp04.scn
Normal file
@@ -0,0 +1,8 @@
|
||||
*** TEST 4 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting TID of remote task
|
||||
Remote task's name is : 111
|
||||
Local task priority has been set
|
||||
*** END OF TEST 4 ***
|
||||
30
testsuites/mptests/mp04/system.h
Normal file
30
testsuites/mptests/mp04/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
83
testsuites/mptests/mp04/task1.c
Normal file
83
testsuites/mptests/mp04/task1.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task tests the rtems_task_set_priority directive on a remote task.
|
||||
*
|
||||
* 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"
|
||||
|
||||
extern rtems_multiprocessing_table Multiprocessing_configuration;
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_id tid;
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_task_priority previous_priority;
|
||||
rtems_task_priority previous_priority_1;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
status = rtems_task_set_priority(
|
||||
remote_tid,
|
||||
Multiprocessing_configuration.node,
|
||||
&previous_priority
|
||||
);
|
||||
directive_failed( status, "rtems_task_set_priority" );
|
||||
|
||||
if ( previous_priority != remote_node ) {
|
||||
printf(
|
||||
"Remote priority (0x%x) does not match remote node (0x%x)!!!\n",
|
||||
previous_priority,
|
||||
remote_node
|
||||
);
|
||||
exit( 0xf0000 );
|
||||
}
|
||||
|
||||
do {
|
||||
status = rtems_task_set_priority(
|
||||
RTEMS_SELF,
|
||||
RTEMS_CURRENT_PRIORITY,
|
||||
&previous_priority_1
|
||||
);
|
||||
directive_failed( status, "rtems_task_set_priority" );
|
||||
} while ( previous_priority_1 != remote_node );
|
||||
|
||||
puts( "Local task priority has been set" );
|
||||
|
||||
puts( "*** END OF TEST 4 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
37
testsuites/mptests/mp05/asr.c
Normal file
37
testsuites/mptests/mp05/asr.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Process_asr
|
||||
*
|
||||
* This routine performs the processing for task 1's RTEMS_ASR. It is called
|
||||
* by an assembly routine which saves the necessary registers.
|
||||
*
|
||||
* Input parameters:
|
||||
* signal - signal set
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_asr Process_asr(
|
||||
rtems_signal_set signal
|
||||
)
|
||||
{
|
||||
if ( signal != expected_signal ) {
|
||||
printf(
|
||||
"ERROR: I was expecting signal 0x%.8x got 0x%.8x\n",
|
||||
expected_signal,
|
||||
signal
|
||||
);
|
||||
rtems_fatal_error_occurred( 0xf0000 );
|
||||
}
|
||||
signal_caught = 1;
|
||||
}
|
||||
68
testsuites/mptests/mp05/init.c
Normal file
68
testsuites/mptests/mp05/init.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 5 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[Multiprocessing_configuration.node],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
|
||||
|
||||
status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
|
||||
directive_failed( status, "rtems_timer_create" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
45
testsuites/mptests/mp05/node1/mp05.doc
Normal file
45
testsuites/mptests/mp05/node1/mp05.doc
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# $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: test54
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
tm_wkafter, as_catch, as_return
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of another task.
|
||||
|
||||
i. Verifies that a signal can be sent to a remote task.
|
||||
11
testsuites/mptests/mp05/node1/mp05.scn
Normal file
11
testsuites/mptests/mp05/node1/mp05.scn
Normal file
@@ -0,0 +1,11 @@
|
||||
*** TEST 5 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
rtems_signal_catch: initializing signal catcher
|
||||
Remote task's name is : 222
|
||||
Getting TID of remote task
|
||||
Sending signal to remote task
|
||||
....................................................
|
||||
....................................................
|
||||
*** END OF TEST 5 ***
|
||||
13
testsuites/mptests/mp05/node2/mp05.doc
Normal file
13
testsuites/mptests/mp05/node2/mp05.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
10
testsuites/mptests/mp05/node2/mp05.scn
Normal file
10
testsuites/mptests/mp05/node2/mp05.scn
Normal file
@@ -0,0 +1,10 @@
|
||||
*** TEST 5 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
rtems_signal_catch: initializing signal catcher
|
||||
Remote task's name is : 111
|
||||
Getting TID of remote task
|
||||
....................................................
|
||||
....................................................
|
||||
*** END OF TEST 5 ***
|
||||
30
testsuites/mptests/mp05/system.h
Normal file
30
testsuites/mptests/mp05/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
106
testsuites/mptests/mp05/task1.c
Normal file
106
testsuites/mptests/mp05/task1.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task initializes the signal catcher, sends the first signal
|
||||
* if running on the first node, and loops while waiting for signals.
|
||||
*
|
||||
* NOTE: The signal catcher is not reentrant and hence RTEMS_NO_ASR must
|
||||
* be a part of its execution mode.
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define SIGNALS_PER_DOT 15
|
||||
|
||||
rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
Stop_Test = TRUE;
|
||||
}
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
Stop_Test = FALSE;
|
||||
|
||||
signal_caught = 0;
|
||||
signal_count = 0;
|
||||
|
||||
puts( "rtems_signal_catch: initializing signal catcher" );
|
||||
status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR|RTEMS_NO_PREEMPT );
|
||||
directive_failed( status, "rtems_signal_catch" );
|
||||
|
||||
if (Multiprocessing_configuration.node == 1) {
|
||||
remote_node = 2;
|
||||
remote_signal = RTEMS_SIGNAL_18;
|
||||
expected_signal = RTEMS_SIGNAL_17;
|
||||
}
|
||||
else {
|
||||
remote_node = 1;
|
||||
remote_signal = RTEMS_SIGNAL_17;
|
||||
expected_signal = RTEMS_SIGNAL_18;
|
||||
}
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
3 * TICKS_PER_SECOND,
|
||||
Stop_Test_TSR,
|
||||
NULL
|
||||
);
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
puts( "Sending signal to remote task" );
|
||||
do {
|
||||
status = rtems_signal_send( remote_tid, remote_signal );
|
||||
if ( status == RTEMS_NOT_DEFINED )
|
||||
continue;
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_signal_send" );
|
||||
}
|
||||
|
||||
while ( Stop_Test == FALSE ) {
|
||||
if ( signal_caught ) {
|
||||
signal_caught = 0;
|
||||
if ( ++signal_count >= SIGNALS_PER_DOT ) {
|
||||
signal_count = 0;
|
||||
put_dot( '.' );
|
||||
}
|
||||
status = rtems_signal_send( remote_tid, remote_signal );
|
||||
directive_failed( status, "rtems_signal_send" );
|
||||
}
|
||||
}
|
||||
puts( "\n*** END OF TEST 5 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
68
testsuites/mptests/mp06/init.c
Normal file
68
testsuites/mptests/mp06/init.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 6 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[Multiprocessing_configuration.node],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
|
||||
|
||||
status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
|
||||
directive_failed( status, "rtems_timer_create" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
45
testsuites/mptests/mp06/node1/mp06.doc
Normal file
45
testsuites/mptests/mp06/node1/mp06.doc
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# $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: test55
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
ev_send, ev_receive
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of another task.
|
||||
|
||||
i. Verifies that events can be sent to a remote task.
|
||||
11
testsuites/mptests/mp06/node1/mp06.scn
Normal file
11
testsuites/mptests/mp06/node1/mp06.scn
Normal file
@@ -0,0 +1,11 @@
|
||||
*** TEST 6 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 222
|
||||
Getting TID of remote task
|
||||
Sending events to remote task
|
||||
....................................................
|
||||
....................................................
|
||||
*** END OF TEST 6 ***
|
||||
|
||||
13
testsuites/mptests/mp06/node2/mp06.doc
Normal file
13
testsuites/mptests/mp06/node2/mp06.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
12
testsuites/mptests/mp06/node2/mp06.scn
Normal file
12
testsuites/mptests/mp06/node2/mp06.scn
Normal file
@@ -0,0 +1,12 @@
|
||||
*** TEST 6 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 111
|
||||
Getting TID of remote task
|
||||
Receiving events from remote task
|
||||
....................................................
|
||||
....................................................
|
||||
rtems_event_receive - correctly returned RTEMS_TIMEOUT
|
||||
*** END OF TEST 6 ***
|
||||
|
||||
31
testsuites/mptests/mp06/system.h
Normal file
31
testsuites/mptests/mp06/system.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* 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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
176
testsuites/mptests/mp06/task1.c
Normal file
176
testsuites/mptests/mp06/task1.c
Normal file
@@ -0,0 +1,176 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task tests global event operations. If running on node one, it
|
||||
* continuously sends events. If running on node two, it continuously
|
||||
* receives events.
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define DOT_COUNT 25
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Stop_Test_TSR
|
||||
*/
|
||||
|
||||
rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
Stop_Test = TRUE;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Event_set_table
|
||||
*/
|
||||
|
||||
rtems_event_set Event_set_table[] = {
|
||||
RTEMS_EVENT_0,
|
||||
RTEMS_EVENT_1,
|
||||
RTEMS_EVENT_2,
|
||||
RTEMS_EVENT_3,
|
||||
RTEMS_EVENT_4,
|
||||
RTEMS_EVENT_5,
|
||||
RTEMS_EVENT_6,
|
||||
RTEMS_EVENT_7,
|
||||
RTEMS_EVENT_8,
|
||||
RTEMS_EVENT_9,
|
||||
RTEMS_EVENT_10,
|
||||
RTEMS_EVENT_11,
|
||||
RTEMS_EVENT_12,
|
||||
RTEMS_EVENT_13,
|
||||
RTEMS_EVENT_14,
|
||||
RTEMS_EVENT_15,
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_EVENT_17,
|
||||
RTEMS_EVENT_18,
|
||||
RTEMS_EVENT_19,
|
||||
RTEMS_EVENT_20,
|
||||
RTEMS_EVENT_21,
|
||||
RTEMS_EVENT_22,
|
||||
RTEMS_EVENT_23,
|
||||
RTEMS_EVENT_24,
|
||||
RTEMS_EVENT_25,
|
||||
RTEMS_EVENT_26,
|
||||
RTEMS_EVENT_27,
|
||||
RTEMS_EVENT_28,
|
||||
RTEMS_EVENT_29,
|
||||
RTEMS_EVENT_30,
|
||||
RTEMS_EVENT_31
|
||||
};
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Test_task
|
||||
*/
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 count;
|
||||
rtems_unsigned32 remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_event_set event_out;
|
||||
rtems_event_set event_for_this_iteration;
|
||||
|
||||
Stop_Test = FALSE;
|
||||
|
||||
remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident FAILED!!" );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 )
|
||||
puts( "Sending events to remote task" );
|
||||
else
|
||||
puts( "Receiving events from remote task" );
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
5 * TICKS_PER_SECOND,
|
||||
Stop_Test_TSR,
|
||||
NULL
|
||||
);
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
count = 0;
|
||||
|
||||
for ( ; ; ) {
|
||||
if ( Stop_Test == TRUE )
|
||||
break;
|
||||
|
||||
event_for_this_iteration = Event_set_table[ count % 32 ];
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
status = rtems_event_send( remote_tid, event_for_this_iteration );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
|
||||
status = rtems_task_wake_after( 1 );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
} else {
|
||||
status = rtems_event_receive(
|
||||
event_for_this_iteration,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
1 * TICKS_PER_SECOND,
|
||||
&event_out
|
||||
);
|
||||
if ( rtems_are_statuses_equal( status, RTEMS_TIMEOUT ) ) {
|
||||
if ( Multiprocessing_configuration.node == 2 )
|
||||
puts( "\nCorrect behavior if the other node exitted." );
|
||||
else
|
||||
puts( "\nERROR... node 1 died" );
|
||||
break;
|
||||
} else
|
||||
directive_failed( status, "rtems_event_receive" );
|
||||
}
|
||||
|
||||
if ( (count % DOT_COUNT) == 0 )
|
||||
put_dot('.');
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
putchar( '\n' );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 2 ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
1 * TICKS_PER_SECOND,
|
||||
&event_out
|
||||
);
|
||||
fatal_directive_status( status, RTEMS_TIMEOUT, "rtems_event_receive" );
|
||||
puts( "rtems_event_receive - correctly returned RTEMS_TIMEOUT" );
|
||||
}
|
||||
puts( "*** END OF TEST 6 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
68
testsuites/mptests/mp07/init.c
Normal file
68
testsuites/mptests/mp07/init.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 7 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[Multiprocessing_configuration.node],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
|
||||
|
||||
status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
|
||||
directive_failed( status, "rtems_timer_create" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
46
testsuites/mptests/mp07/node1/mp07.doc
Normal file
46
testsuites/mptests/mp07/node1/mp07.doc
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# $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: test56
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
ev_send, ev_receive
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of another task.
|
||||
|
||||
i. Verifies that two tasks on different processors can alternate
|
||||
sending each other events.
|
||||
10
testsuites/mptests/mp07/node1/mp07.scn
Normal file
10
testsuites/mptests/mp07/node1/mp07.scn
Normal file
@@ -0,0 +1,10 @@
|
||||
*** TEST 7 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 222
|
||||
Getting TID of remote task
|
||||
Sending first event to remote task
|
||||
....................................................
|
||||
....................................................
|
||||
*** END OF TEST 7 ***
|
||||
13
testsuites/mptests/mp07/node2/mp07.doc
Normal file
13
testsuites/mptests/mp07/node2/mp07.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
9
testsuites/mptests/mp07/node2/mp07.scn
Normal file
9
testsuites/mptests/mp07/node2/mp07.scn
Normal file
@@ -0,0 +1,9 @@
|
||||
*** TEST 7 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Remote task's name is : 111
|
||||
Getting TID of remote task
|
||||
....................................................
|
||||
....................................................
|
||||
*** END OF TEST 7 ***
|
||||
28
testsuites/mptests/mp07/system.h
Normal file
28
testsuites/mptests/mp07/system.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* 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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
95
testsuites/mptests/mp07/task1.c
Normal file
95
testsuites/mptests/mp07/task1.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task continuously sends an event to its counterpart on the
|
||||
* other node, and then waits for it to send an event. The copy
|
||||
* running on node one send the first event.
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define DOT_COUNT 100
|
||||
|
||||
rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
Stop_Test = TRUE;
|
||||
}
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 count;
|
||||
rtems_unsigned32 remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_event_set event_out;
|
||||
|
||||
Stop_Test = FALSE;
|
||||
|
||||
remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
puts( "Sending first event to remote task" );
|
||||
status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
}
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
5 * TICKS_PER_SECOND,
|
||||
Stop_Test_TSR,
|
||||
NULL
|
||||
);
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
while ( Stop_Test == FALSE ) {
|
||||
for ( count=DOT_COUNT ; count ; count-- ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT,
|
||||
&event_out
|
||||
);
|
||||
if ( status == RTEMS_TIMEOUT ) {
|
||||
puts( "\nTA1 - RTEMS_TIMEOUT .. probably OK if the other node exits" );
|
||||
break;
|
||||
} else
|
||||
directive_failed( status, "rtems_event_receive" );
|
||||
|
||||
status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
}
|
||||
put_dot('.');
|
||||
}
|
||||
puts( "\n*** END OF TEST 7 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
76
testsuites/mptests/mp08/init.c
Normal file
76
testsuites/mptests/mp08/init.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 8 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', '\0' );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
puts( "Creating Sempahore (Global)" );
|
||||
status = rtems_semaphore_create(
|
||||
Semaphore_name[ 1 ],
|
||||
1,
|
||||
RTEMS_GLOBAL,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_create" );
|
||||
}
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ Multiprocessing_configuration.node ],
|
||||
1,
|
||||
2048,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_GLOBAL,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (Global)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
52
testsuites/mptests/mp08/node1/mp08.doc
Normal file
52
testsuites/mptests/mp08/node1/mp08.doc
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# $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: test57
|
||||
|
||||
GLOBAL SEMAPHORE TEST
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
sm_create, sm_ident, sm_p, sm_v, sm_delete
|
||||
|
||||
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 a task can get the identification number of
|
||||
a global sempahore.
|
||||
|
||||
h. Verifies that two tasks on different processors can
|
||||
alternate accessing a semaphore.
|
||||
|
||||
i. Verifies operation of sm_delete on global semaphores
|
||||
for both normal and error case.
|
||||
|
||||
j. Verifies Rpc and Process_pkt for packet types Q_SMP, Q_SMV,
|
||||
P_OBJCREATE (semaphore), P_OBJDELETE (semaphore), P_SMDEL_TQ.
|
||||
|
||||
11
testsuites/mptests/mp08/node1/mp08.scn
Normal file
11
testsuites/mptests/mp08/node1/mp08.scn
Normal file
@@ -0,0 +1,11 @@
|
||||
*** TEST 8 -- NODE 1 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting SMID of semaphore
|
||||
pvpvpvpvpvp.......
|
||||
(continued) pvp
|
||||
|
||||
Deleting global semaphore
|
||||
*** END OF TEST 8 ***
|
||||
|
||||
13
testsuites/mptests/mp08/node2/mp08.doc
Normal file
13
testsuites/mptests/mp08/node2/mp08.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
12
testsuites/mptests/mp08/node2/mp08.scn
Normal file
12
testsuites/mptests/mp08/node2/mp08.scn
Normal file
@@ -0,0 +1,12 @@
|
||||
*** TEST 8 -- NODE 2 ***
|
||||
Creating Test_task (Global)
|
||||
Starting Test_task (Global)
|
||||
Deleting initialization task
|
||||
Getting SMID of semaphore
|
||||
rtems_semaphore_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
|
||||
pvpvpvpvpvp.......
|
||||
(continued) pvp
|
||||
|
||||
Global semaphore deleted
|
||||
*** END OF TEST 8 ***
|
||||
|
||||
30
testsuites/mptests/mp08/system.h
Normal file
30
testsuites/mptests/mp08/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
89
testsuites/mptests/mp08/task1.c
Normal file
89
testsuites/mptests/mp08/task1.c
Normal file
@@ -0,0 +1,89 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task tests global semaphore operations. It verifies that
|
||||
* global semaphore errors are correctly returned.
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_unsigned32 count;
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "Getting SMID of semaphore" );
|
||||
|
||||
do {
|
||||
status = rtems_semaphore_ident(
|
||||
Semaphore_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 2 ) {
|
||||
status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_semaphore_delete did not return RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
puts(
|
||||
"rtems_semaphore_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
}
|
||||
|
||||
count = 0; /* number of times node 1 releases semaphore */
|
||||
while ( FOREVER ) {
|
||||
put_dot( 'p' );
|
||||
status = rtems_semaphore_obtain(
|
||||
Semaphore_id[ 1 ],
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
if ( status != RTEMS_SUCCESSFUL ) {
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_OBJECT_WAS_DELETED,
|
||||
"rtems_semaphore_obtain"
|
||||
);
|
||||
puts( "\nGlobal semaphore deleted" );
|
||||
puts( "*** END OF TEST 8 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 && ++count == 1000 ) {
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "\nDeleting global semaphore" );
|
||||
status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
|
||||
directive_failed( status, "rtems_semaphore_delete" );
|
||||
|
||||
puts( "*** END OF TEST 8 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
else {
|
||||
put_dot( 'v' );
|
||||
status = rtems_semaphore_release( Semaphore_id[ 1 ] );
|
||||
directive_failed( status, "rtems_semaphore_release FAILED!!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
76
testsuites/mptests/mp09/init.c
Normal file
76
testsuites/mptests/mp09/init.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 9 -- 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', ' ' );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
puts( "Creating Message Queue (Global)" );
|
||||
status = rtems_message_queue_create(
|
||||
Queue_name[ 1 ],
|
||||
3,
|
||||
RTEMS_GLOBAL|RTEMS_LIMIT,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_create" );
|
||||
}
|
||||
|
||||
puts( "Creating Test_task (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[Multiprocessing_configuration.node],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task (local)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
50
testsuites/mptests/mp09/node1/mp09.doc
Normal file
50
testsuites/mptests/mp09/node1/mp09.doc
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# $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: test58
|
||||
|
||||
GLOBAL MESSAGE QUEUE TEST
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return,
|
||||
tm_wkafter, q_create, q_send, q_broadcast, q_urgent, q_receive,
|
||||
q_delete
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can delete itself.
|
||||
|
||||
i. Verifies Rpc and Process_pkt for message queue related packets.
|
||||
|
||||
j. Verifies normal and error paths for global message queue handling.
|
||||
|
||||
NOTE: The SLAVE must be started first for this test to successfully run.
|
||||
21
testsuites/mptests/mp09/node1/mp09.scn
Normal file
21
testsuites/mptests/mp09/node1/mp09.scn
Normal file
@@ -0,0 +1,21 @@
|
||||
*** TEST 9 -- NODE 1 ***
|
||||
Creating Message Queue (Global)
|
||||
Creating Test_task (local)
|
||||
Starting Test_task (local)
|
||||
Deleting initialization task
|
||||
Getting QID of message queue
|
||||
Receiving message ...
|
||||
Received : 123456789012345
|
||||
Receiving message ...
|
||||
Received : abcdefghijklmno
|
||||
Receiving message ...
|
||||
Received : ABCDEFGHIJKLMNO
|
||||
rtems_message_queue_send: 123456789012345
|
||||
Delaying for a second
|
||||
rtems_message_queue_urgent: abcdefghijklmno
|
||||
Delaying for a second
|
||||
rtems_message_queue_broadcast: ABCDEFGHIJKLMNO
|
||||
Delaying for a second
|
||||
Delaying for 5 seconds
|
||||
Deleting Message queue
|
||||
*** END OF TEST 9 ***
|
||||
13
testsuites/mptests/mp09/node2/mp09.doc
Normal file
13
testsuites/mptests/mp09/node2/mp09.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
27
testsuites/mptests/mp09/node2/mp09.scn
Normal file
27
testsuites/mptests/mp09/node2/mp09.scn
Normal file
@@ -0,0 +1,27 @@
|
||||
*** TEST 9 -- NODE 2 ***
|
||||
Creating Test_task (local)
|
||||
Starting Test_task (local)
|
||||
Deleting initialization task
|
||||
Getting QID of message queue
|
||||
rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
|
||||
rtems_message_queue_send: 123456789012345
|
||||
Delaying for a second
|
||||
rtems_message_queue_urgent: abcdefghijklmno
|
||||
Delaying for a second
|
||||
rtems_message_queue_broadcast: ABCDEFGHIJKLMNO
|
||||
Delaying for a second
|
||||
Receiving message ...
|
||||
Received : 123456789012345
|
||||
Receiving message ...
|
||||
Received : abcdefghijklmno
|
||||
Receiving message ...
|
||||
Received : ABCDEFGHIJKLMNO
|
||||
Flushing remote empty queue
|
||||
00 messages were flushed on the remote queue
|
||||
Send messages to be flushed from remote queue
|
||||
Flushing remote queue
|
||||
01 messages were flushed on the remote queue
|
||||
Waiting for message queue to be deleted
|
||||
|
||||
Global message queue deleted
|
||||
*** END OF TEST 9 ***
|
||||
45
testsuites/mptests/mp09/recvmsg.c
Normal file
45
testsuites/mptests/mp09/recvmsg.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Receive_messages
|
||||
*
|
||||
* This routine receives and prints three messages.
|
||||
* an error condition.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* 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"
|
||||
|
||||
void Receive_messages()
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 index;
|
||||
char receive_buffer[16];
|
||||
|
||||
for ( index=1 ; index <=3 ; index++ ) {
|
||||
puts( "Receiving message ..." );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])receive_buffer,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
puts_nocr( "Received : ");
|
||||
puts( receive_buffer );
|
||||
}
|
||||
|
||||
puts( "Receiver delaying for a second" );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
59
testsuites/mptests/mp09/sendmsg.c
Normal file
59
testsuites/mptests/mp09/sendmsg.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Send_messages
|
||||
*
|
||||
* This routine sends a series of three messages.
|
||||
* an error condition.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* 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"
|
||||
|
||||
void Send_messages()
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 broadcast_count;
|
||||
|
||||
puts_nocr( "rtems_message_queue_send: " );
|
||||
puts( buffer1 );
|
||||
|
||||
status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1 );
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
|
||||
puts( "Delaying for a second" );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts_nocr( "rtems_message_queue_urgent: " );
|
||||
puts( buffer2 );
|
||||
status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2 );
|
||||
directive_failed( status, "rtems_message_queue_urgent" );
|
||||
|
||||
puts( "Delaying for a second" );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts_nocr( "rtems_message_queue_broadcast: " );
|
||||
puts( buffer3 );
|
||||
status = rtems_message_queue_broadcast(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])buffer3,
|
||||
&broadcast_count
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_broadcast" );
|
||||
|
||||
puts( "Delaying for a second" );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
30
testsuites/mptests/mp09/system.h
Normal file
30
testsuites/mptests/mp09/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
107
testsuites/mptests/mp09/task1.c
Normal file
107
testsuites/mptests/mp09/task1.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/* Test_task
|
||||
*
|
||||
* This task tests global message queue operations. It also generates
|
||||
* an error condition.
|
||||
*
|
||||
* 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"
|
||||
|
||||
char buffer1[16] = "123456789012345";
|
||||
char buffer2[16] = "abcdefghijklmno";
|
||||
char buffer3[16] = "ABCDEFGHIJKLMNO";
|
||||
char buffer4[16] = "PQRSTUVWXYZ(){}";
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_unsigned32 count;
|
||||
char receive_buffer[16];
|
||||
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Getting QID of message queue" );
|
||||
|
||||
do {
|
||||
status = rtems_message_queue_ident(
|
||||
Queue_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 2 ) {
|
||||
status = rtems_message_queue_delete( Queue_id[ 1 ] );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_message_queue_delete"
|
||||
);
|
||||
puts(
|
||||
"rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
|
||||
Send_messages();
|
||||
Receive_messages();
|
||||
|
||||
puts( "Flushing remote empty queue" );
|
||||
status = rtems_message_queue_flush( Queue_id[ 1 ], &count );
|
||||
directive_failed( status, "rtems_message_queue_flush" );
|
||||
printf( "%02d messages were flushed on the remote queue\n", count );
|
||||
|
||||
puts( "Send messages to be flushed from remote queue" );
|
||||
status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1 );
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
|
||||
puts( "Flushing remote queue" );
|
||||
status = rtems_message_queue_flush( Queue_id[ 1 ], &count );
|
||||
directive_failed( status, "rtems_message_queue_flush" );
|
||||
printf( "%02d messages were flushed on the remote queue\n", count );
|
||||
|
||||
puts( "Waiting for message queue to be deleted" );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])receive_buffer,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_OBJECT_WAS_DELETED,
|
||||
"rtems_message_queue_receive"
|
||||
);
|
||||
puts( "\nGlobal message queue deleted" );
|
||||
}
|
||||
else { /* node == 1 */
|
||||
Receive_messages();
|
||||
Send_messages();
|
||||
|
||||
puts( "Delaying for 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Deleting Message queue" );
|
||||
status = rtems_message_queue_delete( Queue_id[ 1 ] );
|
||||
directive_failed( status, "rtems_message_queue_delete" );
|
||||
}
|
||||
|
||||
puts( "*** END OF TEST 9 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
144
testsuites/mptests/mp10/init.c
Normal file
144
testsuites/mptests/mp10/init.c
Normal file
@@ -0,0 +1,144 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization routine for this test program.
|
||||
* Other than creating all objects needed by this test, if this routine
|
||||
* is running on node one, it acquires a global semaphore to
|
||||
* force all other tasks to pend. If running on node two, this task
|
||||
* sleeps for a while, and then deletes two local tasks which are
|
||||
* waiting on a remote message queue or a semaphore.
|
||||
* 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 10 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
|
||||
Task_name[ 3 ] = rtems_build_name( 'S', 'A', '3', ' ' );
|
||||
|
||||
Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
|
||||
|
||||
Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
puts( "Creating Message Queue (Global)" );
|
||||
status = rtems_message_queue_create(
|
||||
Queue_name[ 1 ],
|
||||
3,
|
||||
RTEMS_GLOBAL|RTEMS_LIMIT,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_create" );
|
||||
|
||||
puts( "Creating Semaphore (Global)" );
|
||||
status = rtems_semaphore_create(
|
||||
Semaphore_name[ 1 ],
|
||||
0,
|
||||
RTEMS_GLOBAL | RTEMS_PRIORITY,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_create" );
|
||||
|
||||
status = rtems_task_wake_after( 10 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
} else {
|
||||
|
||||
puts( "Creating Test_task 1 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task 1 (local)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task1, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Creating Test_task 2 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 2 ],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 2 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task 2 (local)" );
|
||||
status = rtems_task_start( Task_id[ 2 ], Test_task2, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Creating Test_task 3 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 3 ],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 3 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task 3 (local)" );
|
||||
status = rtems_task_start( Task_id[ 3 ], Test_task2, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Sleeping for 1 seconds ..." );
|
||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Deleting Test_task2" );
|
||||
status = rtems_task_delete( Task_id[ 2 ] );
|
||||
directive_failed( status, "rtems_task_delete of Task 2" );
|
||||
|
||||
puts( "Deleting Test_task1" );
|
||||
status = rtems_task_delete( Task_id[ 1 ] );
|
||||
directive_failed( status, "rtems_task_delete of Task 1" );
|
||||
|
||||
puts( "Restarting Test_task3" );
|
||||
status = rtems_task_restart( Task_id[ 3 ], 1 );
|
||||
directive_failed( status, "rtems_task_restart of Task 3" );
|
||||
|
||||
}
|
||||
puts( "*** END OF TEST 10 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
46
testsuites/mptests/mp10/node1/mp10.doc
Normal file
46
testsuites/mptests/mp10/node1/mp10.doc
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# $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: test59
|
||||
|
||||
GLOBAL SEMAPHORE TEST
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
|
||||
tm_set, tm_get, tm_wkafter
|
||||
|
||||
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 a task can get the task identification number of itself.
|
||||
|
||||
h. Verifies that a task can get the task identification number
|
||||
of another task.
|
||||
|
||||
i. Verifies that a task can delete itself or another task.
|
||||
4
testsuites/mptests/mp10/node1/mp10.scn
Normal file
4
testsuites/mptests/mp10/node1/mp10.scn
Normal file
@@ -0,0 +1,4 @@
|
||||
*** TEST 10 -- NODE 1 ***
|
||||
Creating Message Queue (Global)
|
||||
Creating Semaphore (Global)
|
||||
*** END OF TEST 10 ***
|
||||
13
testsuites/mptests/mp10/node2/mp10.doc
Normal file
13
testsuites/mptests/mp10/node2/mp10.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
19
testsuites/mptests/mp10/node2/mp10.scn
Normal file
19
testsuites/mptests/mp10/node2/mp10.scn
Normal file
@@ -0,0 +1,19 @@
|
||||
*** TEST 10 -- NODE 2 ***
|
||||
Creating Test_task 1 (local)
|
||||
Starting Test_task 1 (local)
|
||||
Creating Test_task 2 (local)
|
||||
Starting Test_task 2 (local)
|
||||
Creating Test_task 3 (local)
|
||||
Starting Test_task 3 (local)
|
||||
Sleeping for 1 seconds ...
|
||||
Getting QID of message queue
|
||||
Attempting to receive message ...
|
||||
Getting SMID of semaphore
|
||||
Attempting to acquire semaphore ...
|
||||
Getting SMID of semaphore
|
||||
Attempting to acquire semaphore ...
|
||||
Deleting Test_task2
|
||||
Deleting Test_task1
|
||||
Restarting Test_task3
|
||||
*** END OF TEST 10 ***
|
||||
|
||||
30
testsuites/mptests/mp10/system.h
Normal file
30
testsuites/mptests/mp10/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
50
testsuites/mptests/mp10/task1.c
Normal file
50
testsuites/mptests/mp10/task1.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Test_task1
|
||||
*
|
||||
* This task attempts to receive a message from a global message queue.
|
||||
* It should never actually receive the message.
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_task Test_task1(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
char receive_buffer[16];
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "Getting QID of message queue" );
|
||||
|
||||
do {
|
||||
status = rtems_message_queue_ident(
|
||||
Queue_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
puts( "Attempting to receive message ..." );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])receive_buffer,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
|
||||
}
|
||||
47
testsuites/mptests/mp10/task2.c
Normal file
47
testsuites/mptests/mp10/task2.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Test_task2
|
||||
*
|
||||
* This task attempts to receive control of a global semaphore.
|
||||
* It should never receive control of the semaphore.
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_task Test_task2(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "Getting SMID of semaphore" );
|
||||
|
||||
do {
|
||||
status = rtems_semaphore_ident(
|
||||
Semaphore_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
puts( "Attempting to acquire semaphore ..." );
|
||||
status = rtems_semaphore_obtain(
|
||||
Semaphore_id[ 1 ],
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_obtain" );
|
||||
}
|
||||
50
testsuites/mptests/mp10/task3.c
Normal file
50
testsuites/mptests/mp10/task3.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Test_task3
|
||||
*
|
||||
* This task attempts to receive control of a global semaphore.
|
||||
* It should never receive control of the semaphore.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* 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"
|
||||
|
||||
rtems_task Test_task3( restart )
|
||||
rtems_task_argument restart;
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
if ( restart == 1 ) {
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete" );
|
||||
}
|
||||
|
||||
puts( "Getting SMID of semaphore" );
|
||||
|
||||
do {
|
||||
status = rtems_semaphore_ident(
|
||||
Semaphore_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
puts( "Attempting to acquire semaphore ..." );
|
||||
status = rtems_semaphore_obtain(
|
||||
Semaphore_id[ 1 ],
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_obtain" );
|
||||
}
|
||||
106
testsuites/mptests/mp11/init.c
Normal file
106
testsuites/mptests/mp11/init.c
Normal file
@@ -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 );
|
||||
}
|
||||
42
testsuites/mptests/mp11/node1/mp11.doc
Normal file
42
testsuites/mptests/mp11/node1/mp11.doc
Normal file
@@ -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.
|
||||
10
testsuites/mptests/mp11/node1/mp11.scn
Normal file
10
testsuites/mptests/mp11/node1/mp11.scn
Normal file
@@ -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 ***
|
||||
13
testsuites/mptests/mp11/node2/mp11.doc
Normal file
13
testsuites/mptests/mp11/node2/mp11.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
2
testsuites/mptests/mp11/node2/mp11.scn
Normal file
2
testsuites/mptests/mp11/node2/mp11.scn
Normal file
@@ -0,0 +1,2 @@
|
||||
*** TEST 11 -- NODE 2 ***
|
||||
*** END OF TEST 11 ***
|
||||
30
testsuites/mptests/mp11/system.h
Normal file
30
testsuites/mptests/mp11/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
116
testsuites/mptests/mp12/init.c
Normal file
116
testsuites/mptests/mp12/init.c
Normal file
@@ -0,0 +1,116 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization routine and test code for
|
||||
* global partitions. It creates a global partition, obtains and
|
||||
* releases a buffer, and deletes the partition. The partition
|
||||
* is created on node one, and an attempt is made to delete it
|
||||
* by node two.
|
||||
* 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 Partition_area[ 1024 ];
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
void *bufaddr;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 12 -- NODE %d ***\n",
|
||||
Multiprocessing_configuration.node
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
|
||||
Partition_name[ 1 ] = rtems_build_name( 'P', 'A', 'R', ' ' );
|
||||
|
||||
puts( "Got to initialization task" );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 2 ) {
|
||||
status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Getting ID of remote Partition (Global)" );
|
||||
|
||||
do {
|
||||
status = rtems_partition_ident(
|
||||
Partition_name[ 1 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Partition_id[ 1 ]
|
||||
);
|
||||
} while ( !rtems_is_status_successful( status ) );
|
||||
|
||||
puts( "Attempting to delete remote Partition (Global)" );
|
||||
status = rtems_partition_delete( Partition_id[ 1 ] );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
|
||||
"rtems_partition_delete"
|
||||
);
|
||||
puts(
|
||||
"rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
|
||||
puts( "Obtaining a buffer from the global partition" );
|
||||
status = rtems_partition_get_buffer( Partition_id[ 1 ], &bufaddr );
|
||||
directive_failed( status, "rtems_partition_get_buffer" );
|
||||
printf( "Address returned was : 0x%p\n", bufaddr );
|
||||
|
||||
puts( "Releasing a buffer to the global partition" );
|
||||
status = rtems_partition_return_buffer( Partition_id[ 1 ], bufaddr );
|
||||
directive_failed( status, "rtems_partition_return_buffer" );
|
||||
|
||||
status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
else {
|
||||
puts( "Creating Partition (Global)" );
|
||||
status = rtems_partition_create(
|
||||
Partition_name[ 1 ],
|
||||
Partition_area,
|
||||
128,
|
||||
64,
|
||||
RTEMS_GLOBAL,
|
||||
&Partition_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_partition_create" );
|
||||
|
||||
puts( "Sleeping for two seconds" );
|
||||
status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Deleting Partition (Global)" );
|
||||
status = rtems_partition_delete( Partition_id[ 1 ] );
|
||||
directive_failed( status, "rtems_partition_delete" );
|
||||
}
|
||||
puts( "*** END OF TEST 12 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
52
testsuites/mptests/mp12/node1/mp12.doc
Normal file
52
testsuites/mptests/mp12/node1/mp12.doc
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# $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: test61
|
||||
|
||||
GLOBAL PARTITION TEST
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
|
||||
pt_create, pt_delete, pt_getbuf, pt_retbuf
|
||||
|
||||
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 the Shared Memory Locked Queue Driver.
|
||||
|
||||
h. Verifies _Rpc() and _Process_pkt() for the following packet types:
|
||||
P_OBJCREATE (partitions),
|
||||
P_OBJDELETE (partitions),
|
||||
P_PTGETBUF, and
|
||||
P_PTRETBUF.
|
||||
|
||||
i. Verifies normal and error paths (other than E_TOOMANYGOBJECTS)
|
||||
for global partitions.
|
||||
|
||||
j. Verifies that a task can delete itself.
|
||||
6
testsuites/mptests/mp12/node1/mp12.scn
Normal file
6
testsuites/mptests/mp12/node1/mp12.scn
Normal file
@@ -0,0 +1,6 @@
|
||||
*** TEST 12 -- NODE 1 ***
|
||||
Got to initialization task
|
||||
Creating Partition (Global)
|
||||
Sleeping for two seconds
|
||||
Deleting Partition (Global)
|
||||
*** END OF TEST 12 ***
|
||||
13
testsuites/mptests/mp12/node2/mp12.doc
Normal file
13
testsuites/mptests/mp12/node2/mp12.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
10
testsuites/mptests/mp12/node2/mp12.scn
Normal file
10
testsuites/mptests/mp12/node2/mp12.scn
Normal file
@@ -0,0 +1,10 @@
|
||||
*** TEST 12 -- NODE 2 ***
|
||||
Got to initialization task
|
||||
Getting ID of remote Partition (Global)
|
||||
Attempting to delete remote Partition (Global)
|
||||
rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
|
||||
Obtaining a buffer from the global partition
|
||||
>>>>>>> address returned will differ
|
||||
Address returned was : 0x200f0000
|
||||
Releasing a buffer to the global partition
|
||||
*** END OF TEST 12 ***
|
||||
30
testsuites/mptests/mp12/system.h
Normal file
30
testsuites/mptests/mp12/system.h
Normal file
@@ -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 <rtems.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
#define EXTERN extern /* external definition */
|
||||
|
||||
/* macros */
|
||||
|
||||
/* structures */
|
||||
|
||||
#include "gvar.h"
|
||||
|
||||
/* end of include file */
|
||||
116
testsuites/mptests/mp13/init.c
Normal file
116
testsuites/mptests/mp13/init.c
Normal file
@@ -0,0 +1,116 @@
|
||||
/* 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, 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_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 13 -- 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( "Creating Message Queue (Global)" );
|
||||
status = rtems_message_queue_create(
|
||||
Queue_name[ 1 ],
|
||||
3,
|
||||
RTEMS_GLOBAL|RTEMS_LIMIT,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_create" );
|
||||
|
||||
puts( "Creating Semaphore (Global)" );
|
||||
status = rtems_semaphore_create(
|
||||
Semaphore_name[ 1 ],
|
||||
1,
|
||||
RTEMS_GLOBAL | RTEMS_PRIORITY,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_create" );
|
||||
|
||||
status = rtems_semaphore_obtain(
|
||||
Semaphore_id[ 1 ],
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_semaphore_obtain" );
|
||||
}
|
||||
|
||||
puts( "Creating Test_task 1 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task 1 (local)" );
|
||||
status = rtems_task_start( Task_id[ 1 ], Test_task1, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
puts( "Creating Test_task 2 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 2 ],
|
||||
1,
|
||||
1024,
|
||||
RTEMS_TIMESLICE,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 2 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create" );
|
||||
|
||||
puts( "Starting Test_task 2 (local)" );
|
||||
status = rtems_task_start( Task_id[ 2 ], Test_task2, 0 );
|
||||
directive_failed( status, "rtems_task_start" );
|
||||
|
||||
if ( Multiprocessing_configuration.node == 1 ) {
|
||||
status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "*** END OF TEST 13 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
puts( "Deleting initialization task" );
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
48
testsuites/mptests/mp13/node1/mp13.doc
Normal file
48
testsuites/mptests/mp13/node1/mp13.doc
Normal file
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# $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: test62
|
||||
|
||||
GLOBAL SEMAPHORE TEST
|
||||
|
||||
directives:
|
||||
ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
|
||||
sm_create, q_create, sm_p, q_receive
|
||||
|
||||
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 the Shared Memory Locked Queue Driver.
|
||||
|
||||
h. Verifies that E_MESSAGETIMEOUT is when waiting on a
|
||||
remote message queue.
|
||||
|
||||
i. Verifies that E_SEMTIMEOUT is when waiting on a remote semaphore.
|
||||
|
||||
j. Verifies that a task can delete itself.
|
||||
14
testsuites/mptests/mp13/node1/mp13.scn
Normal file
14
testsuites/mptests/mp13/node1/mp13.scn
Normal file
@@ -0,0 +1,14 @@
|
||||
*** TEST 13 -- NODE 1 ***
|
||||
Creating Message Queue (Global)
|
||||
Creating Semaphore (Global)
|
||||
Creating Test_task 1 (local)
|
||||
Starting Test_task 1 (local)
|
||||
Creating Test_task 2 (local)
|
||||
Starting Test_task 2 (local)
|
||||
Getting QID of message queue
|
||||
Receiving message ...
|
||||
Getting SMID of semaphore
|
||||
Releasing semaphore ...
|
||||
Getting semaphore ...
|
||||
Getting semaphore ...
|
||||
*** END OF TEST 13 ***
|
||||
13
testsuites/mptests/mp13/node2/mp13.doc
Normal file
13
testsuites/mptests/mp13/node2/mp13.doc
Normal file
@@ -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.
|
||||
#
|
||||
|
||||
|
||||
16
testsuites/mptests/mp13/node2/mp13.scn
Normal file
16
testsuites/mptests/mp13/node2/mp13.scn
Normal file
@@ -0,0 +1,16 @@
|
||||
*** TEST 13 -- NODE 2 ***
|
||||
Creating Test_task 1 (local)
|
||||
Starting Test_task 1 (local)
|
||||
Creating Test_task 2 (local)
|
||||
Starting Test_task 2 (local)
|
||||
Deleting initialization task
|
||||
Getting QID of message queue
|
||||
Getting SMID of semaphore
|
||||
Getting semaphore ...
|
||||
Receiving message ...
|
||||
Releasing semaphore ...
|
||||
Getting semaphore ...
|
||||
rtems_message_queue_receive correctly returned RTEMS_TIMEOUT
|
||||
Deleting self
|
||||
rtems_semaphore_obtain correctly returned RTEMS_TIMEOUT
|
||||
*** END OF TEST 13 ***
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user