summaryrefslogtreecommitdiffstats
path: root/testsuites/mptests/mp14
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/mptests/mp14')
-rw-r--r--testsuites/mptests/mp14/delay.c34
-rw-r--r--testsuites/mptests/mp14/evtask1.c86
-rw-r--r--testsuites/mptests/mp14/evtmtask.c65
-rw-r--r--testsuites/mptests/mp14/exit.c33
-rw-r--r--testsuites/mptests/mp14/init.c194
-rw-r--r--testsuites/mptests/mp14/msgtask1.c102
-rw-r--r--testsuites/mptests/mp14/node1/mp14.doc50
-rw-r--r--testsuites/mptests/mp14/node1/mp14.scn38
-rw-r--r--testsuites/mptests/mp14/node2/mp14.doc13
-rw-r--r--testsuites/mptests/mp14/node2/mp14.scn35
-rw-r--r--testsuites/mptests/mp14/pttask1.c65
-rw-r--r--testsuites/mptests/mp14/smtask1.c70
-rw-r--r--testsuites/mptests/mp14/system.h31
13 files changed, 816 insertions, 0 deletions
diff --git a/testsuites/mptests/mp14/delay.c b/testsuites/mptests/mp14/delay.c
new file mode 100644
index 0000000000..7062c4ad21
--- /dev/null
+++ b/testsuites/mptests/mp14/delay.c
@@ -0,0 +1,34 @@
+/* Delayed_send_event
+ *
+ * This routine is a timer service routine which sends an event to a task.
+ *
+ * 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 timer_id,
+ void *ignored
+)
+{
+ rtems_status_code status;
+
+ status = rtems_event_send(
+ Task_id[ rtems_get_index( timer_id ) ],
+ RTEMS_EVENT_16
+ );
+ directive_failed( status, "rtems_event_send" );
+}
diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c
new file mode 100644
index 0000000000..6f8175e4d4
--- /dev/null
+++ b/testsuites/mptests/mp14/evtask1.c
@@ -0,0 +1,86 @@
+/* Test_task
+ *
+ * This task either continuously sends events to a remote task, or
+ * continuously receives events sent by a remote task. This decision
+ * is based upon the local node number.
+ *
+ * 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_status_code status;
+ rtems_unsigned32 count;
+ rtems_unsigned32 remote_node;
+ rtems_id remote_tid;
+ rtems_event_set event_out;
+
+ remote_node = ((Multiprocessing_configuration.node == 1) ? 2 : 1);
+
+ puts( "About to go to sleep!" );
+ status = rtems_task_wake_after( TICKS_PER_SECOND );
+ directive_failed( status, "rtems_task_wake_after" );
+ puts( "Waking up!" );
+
+ puts_nocr( "Remote task's name is : " );
+ put_name( Task_name[ remote_node ], TRUE );
+
+ puts( "Getting TID of remote task" );
+ while ( FOREVER ) {
+ status = rtems_task_ident(
+ Task_name[ remote_node ],
+ RTEMS_SEARCH_ALL_NODES,
+ &remote_tid
+ );
+
+ if ( status == RTEMS_SUCCESSFUL )
+ break;
+ puts( "rtems_task_ident" );
+ }
+
+ if ( Multiprocessing_configuration.node == 1 ) {
+ puts( "Sending events to remote task" );
+ while ( Stop_Test == FALSE ) {
+ for ( count=EVENT_TASK_DOT_COUNT; Stop_Test == FALSE && count; count-- ) {
+ status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
+ directive_failed( status, "rtems_event_send" );
+ }
+ put_dot( 'e' );
+ }
+ }
+
+ puts( "Receiving events from remote task" );
+ while ( Stop_Test == FALSE ) {
+ for ( count=EVENT_TASK_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
+ status = rtems_event_receive(
+ RTEMS_EVENT_16,
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT,
+ &event_out
+ );
+ directive_failed( status, "rtems_event_receive" );
+ }
+ put_dot( 'e' );
+ }
+
+ Exit_test();
+}
diff --git a/testsuites/mptests/mp14/evtmtask.c b/testsuites/mptests/mp14/evtmtask.c
new file mode 100644
index 0000000000..c540eb98fb
--- /dev/null
+++ b/testsuites/mptests/mp14/evtmtask.c
@@ -0,0 +1,65 @@
+/* Delayed_events_task
+ *
+ * This task continuously sends itself events at one tick
+ * intervals.
+ *
+ * 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 Delayed_events_task(
+ rtems_task_argument argument
+)
+{
+ rtems_unsigned32 count;
+ rtems_unsigned32 previous_mode;
+ rtems_status_code status;
+ rtems_event_set events;
+
+ status = rtems_task_mode(
+ RTEMS_PREEMPT | RTEMS_TIMESLICE,
+ RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK,
+ &previous_mode
+ );
+ directive_failed( status, "rtems_task_mode" );
+
+ status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
+ directive_failed( status, "rtems_timer_create" );
+
+ while ( Stop_Test == FALSE ) {
+ for ( count=DELAYED_EVENT_DOT_COUNT; Stop_Test == FALSE && count; count-- ){
+ status = rtems_timer_fire_after(
+ Timer_id[ 1 ],
+ 1,
+ Delayed_send_event,
+ NULL
+ );
+ directive_failed( status, "rtems_timer_reset" );
+
+ status = rtems_event_receive(
+ RTEMS_EVENT_16,
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT,
+ &events
+ );
+ directive_failed( status, "rtems_event_receive" );
+ }
+ put_dot('.');
+ }
+
+ Exit_test();
+}
diff --git a/testsuites/mptests/mp14/exit.c b/testsuites/mptests/mp14/exit.c
new file mode 100644
index 0000000000..65fc0df49f
--- /dev/null
+++ b/testsuites/mptests/mp14/exit.c
@@ -0,0 +1,33 @@
+/* Exit_test
+ *
+ * This routine safely stops the test and prints some information
+ *
+ * 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 Exit_test( void )
+{
+ rtems_status_code status;
+ rtems_mode old_mode;
+
+ status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
+ directive_failed( status, "rtems_task_mode" );
+
+ MPCI_Print_statistics();
+
+ rtems_shutdown_executive( 0 );
+}
diff --git a/testsuites/mptests/mp14/init.c b/testsuites/mptests/mp14/init.c
new file mode 100644
index 0000000000..ab403ad395
--- /dev/null
+++ b/testsuites/mptests/mp14/init.c
@@ -0,0 +1,194 @@
+/* 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"
+
+#include "bsp.h"
+
+rtems_unsigned8 my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
+
+rtems_timer_service_routine Stop_Test_TSR(
+ rtems_id ignored_id,
+ void *ignored_address
+)
+{
+ Stop_Test = TRUE;
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_task_priority previous_priority;
+
+ printf(
+ "\n\n*** TEST 14 -- NODE %d ***\n",
+ Multiprocessing_configuration.node
+ );
+
+ Stop_Test = FALSE;
+
+ status = rtems_timer_create(
+ rtems_build_name('S', 'T', 'O', 'P'),
+ &timer_id
+ );
+ directive_failed( status, "rtems_timer_create" );
+
+ status = rtems_timer_fire_after(
+ timer_id,
+ MAX_LONG_TEST_DURATION * TICKS_PER_SECOND,
+ Stop_Test_TSR,
+ NULL
+ );
+ directive_failed( status, "rtems_timer_fire_after" );
+
+ Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
+ Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
+
+ Queue_task_name[ 1 ] = rtems_build_name( 'M', 'T', '1', ' ' );
+ Queue_task_name[ 2 ] = rtems_build_name( 'M', 'T', '2', ' ' );
+
+ Partition_task_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' );
+ Partition_task_name[ 2 ] = rtems_build_name( 'P', 'T', '2', ' ' );
+
+ Semaphore_task_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
+ Semaphore_task_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
+
+ Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
+
+ Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
+
+ Partition_name[ 1 ] = rtems_build_name( 'P', 'A', 'R', ' ' );
+
+ Timer_name[ 1 ] = rtems_build_name( 'T', 'M', 'R', ' ' );
+
+ if ( Multiprocessing_configuration.node == 1 ) {
+ puts( "Creating Semaphore (Global)" );
+ status = rtems_semaphore_create(
+ Semaphore_name[ 1 ],
+ 1,
+ RTEMS_GLOBAL,
+ &Semaphore_id[ 1 ]
+ );
+ directive_failed( status, "rtems_semaphore_create" );
+
+ puts( "Creating Message Queue (Global)" );
+ status = rtems_message_queue_create(
+ Queue_name[ 1 ],
+ 1,
+ RTEMS_GLOBAL,
+ &Queue_id[ 1 ]
+ );
+ directive_failed( status, "rtems_message_queue_create" );
+
+ puts( "Creating Partition (Global)" );
+ status = rtems_partition_create(
+ Partition_name[ 1 ],
+ (void *)my_partition,
+ 0x8000,
+ 0x3800,
+ RTEMS_GLOBAL,
+ &Partition_id[ 1 ]
+ );
+ directive_failed( status, "rtems_partition_create" );
+ }
+
+ puts( "Creating Event task (Global)" );
+ status = rtems_task_create(
+ Task_name[ Multiprocessing_configuration.node ],
+ 2,
+ 2048,
+ RTEMS_TIMESLICE,
+ RTEMS_GLOBAL,
+ &Event_task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_create" );
+
+ puts( "Starting Event task (Global)" );
+ status = rtems_task_start( Event_task_id[ 1 ], Test_task, 0 );
+ directive_failed( status, "rtems_task_start" );
+
+ puts( "Creating Semaphore task (Global)" );
+ status = rtems_task_create(
+ Semaphore_task_name[ Multiprocessing_configuration.node ],
+ 2,
+ 2048,
+ RTEMS_TIMESLICE,
+ RTEMS_GLOBAL,
+ &Semaphore_task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_create" );
+
+ puts( "Starting Semaphore task (Global)" );
+ status = rtems_task_start( Semaphore_task_id[ 1 ], Semaphore_task, 0 );
+ directive_failed( status, "rtems_task_start" );
+
+ puts( "Creating Message Queue task (Global)" );
+ status = rtems_task_create(
+ Queue_task_name[ Multiprocessing_configuration.node ],
+ 2,
+ 2048,
+ RTEMS_TIMESLICE,
+ RTEMS_GLOBAL,
+ &Queue_task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_create" );
+
+ /* argument is index into Buffers */
+ puts( "Starting Message Queue task (Global)" );
+ status = rtems_task_start( Queue_task_id[ 1 ], Message_queue_task, 1 );
+ directive_failed( status, "rtems_task_start" );
+
+ puts( "Creating Partition task (Global)" );
+ status = rtems_task_create(
+ Partition_task_name[ Multiprocessing_configuration.node ],
+ 2,
+ 2048,
+ RTEMS_TIMESLICE,
+ RTEMS_GLOBAL,
+ &Partition_task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_create" );
+
+ puts( "Starting Partition task (Global)" );
+ status = rtems_task_start( Partition_task_id[ 1 ], Partition_task, 0 );
+ directive_failed( status, "rtems_task_start" );
+
+ status = rtems_task_set_priority( RTEMS_SELF, 2, &previous_priority );
+ directive_failed( status, "rtems_task_set_priority" );
+
+ status = rtems_task_ident(
+ RTEMS_SELF,
+ RTEMS_SEARCH_ALL_NODES,
+ &Task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_ident" );
+
+ Delayed_events_task( 1 );
+}
diff --git a/testsuites/mptests/mp14/msgtask1.c b/testsuites/mptests/mp14/msgtask1.c
new file mode 100644
index 0000000000..2a9f6e235b
--- /dev/null
+++ b/testsuites/mptests/mp14/msgtask1.c
@@ -0,0 +1,102 @@
+/* Message_queue_task
+ *
+ * This task continuously sends messages to and receives messages from
+ * a global message queue. The message buffer is viewed as an array
+ * of two sixty-four bit counts which are incremented when a message is
+ * received.
+ *
+ * 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 Message_queue_task(
+ rtems_task_argument index
+)
+{
+ rtems_status_code status;
+ rtems_unsigned32 count;
+ rtems_unsigned32 yield_count;
+ rtems_unsigned32 *buffer_count;
+ rtems_unsigned32 *overflow_count;
+
+ Msg_buffer[ index ][0] = 0;
+ Msg_buffer[ index ][1] = 0;
+ Msg_buffer[ index ][2] = 0;
+ Msg_buffer[ index ][3] = 0;
+
+ puts( "Getting ID of msg queue" );
+ while ( FOREVER ) {
+ status = rtems_message_queue_ident(
+ Queue_name[ 1 ],
+ RTEMS_SEARCH_ALL_NODES,
+ &Queue_id[ 1 ]
+ );
+ if ( status == RTEMS_SUCCESSFUL )
+ break;
+ puts( "rtems_message_queue_ident FAILED!!" );
+ }
+
+ if ( Multiprocessing_configuration.node == 1 ) {
+ status = rtems_message_queue_send(
+ Queue_id[ 1 ],
+ (long (*)[4])Msg_buffer[ index ]
+ );
+ directive_failed( status, "rtems_message_queue_send" );
+ overflow_count = &Msg_buffer[ index ][0];
+ buffer_count = &Msg_buffer[ index ][1];
+ } else {
+ overflow_count = &Msg_buffer[ index ][2];
+ buffer_count = &Msg_buffer[ index ][3];
+ }
+
+ while ( Stop_Test == FALSE ) {
+ yield_count = 100;
+
+ for ( count=MESSAGE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
+ status = rtems_message_queue_receive(
+ Queue_id[ 1 ],
+ (long (*)[4])Msg_buffer[ index ],
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT
+ );
+ directive_failed( status, "rtems_message_queue_receive" );
+
+ if ( *buffer_count == (rtems_unsigned32)0xffffffff ) {
+ *buffer_count = 0;
+ *overflow_count += 1;
+ } else
+ *buffer_count += 1;
+
+ status = rtems_message_queue_send(
+ Queue_id[ 1 ],
+ (long (*)[4])Msg_buffer[ index ]
+ );
+ directive_failed( status, "rtems_message_queue_send" );
+
+ if (Stop_Test == FALSE)
+ if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
+ status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ directive_failed( status, "rtems_task_wake_after" );
+
+ yield_count = 100;
+ }
+ }
+ put_dot( 'm' );
+ }
+
+ Exit_test();
+}
diff --git a/testsuites/mptests/mp14/node1/mp14.doc b/testsuites/mptests/mp14/node1/mp14.doc
new file mode 100644
index 0000000000..5ac3f7e47a
--- /dev/null
+++ b/testsuites/mptests/mp14/node1/mp14.doc
@@ -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: test63
+
+INTERRUPT SATURATION TEST
+
+directives:
+ ex_init, ex_start, t_create, t_start, t_ident, tm_tick,
+ tm_evwhen, tm_wkafter, i_return, 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 printing of strings to the CRT on port 2 of the mvme136 board
+ using Print and Println in the board support package.
+
+ d. Verifies printing of strings to the CRT on port 2 of the mvme136 board
+ using Write and Writeln and the TTY driver.
+
+ e. Verifies interrupt handler can handler a task switch from an interrupt
+ as specified with the i_return directive.
+
+ f. Verifies executive initialization performed correctly.
+
+ g. Verifies the executive trap handler except for the halt function.
+
+ h. Verifies that a task can get the task identification number of itself.
+
+ i. Verifies that a task can get the task identification number
+ of another task.
+
+ j. Verifies that events can be sent to a remote task.
diff --git a/testsuites/mptests/mp14/node1/mp14.scn b/testsuites/mptests/mp14/node1/mp14.scn
new file mode 100644
index 0000000000..98202bc439
--- /dev/null
+++ b/testsuites/mptests/mp14/node1/mp14.scn
@@ -0,0 +1,38 @@
+*** TEST 14 -- NODE 1 ***
+Creating Semaphore (Global)
+Creating Message Queue (Global)
+Creating Partition (Global)
+Creating Event task (Global)
+Starting Event task (Global)
+Creating Semaphore task (Global)
+About to go to sleep!
+Starting Semaphore task (Global)
+Creating Message Queue task (Global)
+Getting SMID of semaphore
+Starting Message Queue task (Global)
+Creating Partition task (Global)
+Getting ID of msg queue
+Starting Partition task (Global)
+Getting ID of partition
+Waking up!
+Remote task's name is : 222
+Getting TID of remote task
+Sending events to remote task
+<stream of following characters>
+
+. - indicates 100 iterations of
+ tm_evafter of 1 tick and rtems_event_receive.
+
+e - indicates that 100
+ events have been sent to the remote task.
+
+m - indicates 100 iterations of
+ rtems_message_queue_send and rtems_message_queue_receive.
+
+p - indicates 100 iterations of
+ rtems_partition_get_buffer and rtems_partition_return_buffer.
+
+s - indicates 100 iterations of
+ rtems_semaphore_obtain and rtems_semaphore_release.
+
+NOTE: The messages could be interspersed.
diff --git a/testsuites/mptests/mp14/node2/mp14.doc b/testsuites/mptests/mp14/node2/mp14.doc
new file mode 100644
index 0000000000..0de40191c6
--- /dev/null
+++ b/testsuites/mptests/mp14/node2/mp14.doc
@@ -0,0 +1,13 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+# On-Line Applications Research Corporation (OAR).
+# All rights assigned to U.S. Government, 1994.
+#
+# This material may be reproduced by or for the U.S. Government pursuant
+# to the copyright license under the clause at DFARS 252.227-7013. This
+# notice must appear in all copies of this file and its derivatives.
+#
+
+
diff --git a/testsuites/mptests/mp14/node2/mp14.scn b/testsuites/mptests/mp14/node2/mp14.scn
new file mode 100644
index 0000000000..cd82f3c81b
--- /dev/null
+++ b/testsuites/mptests/mp14/node2/mp14.scn
@@ -0,0 +1,35 @@
+*** TEST 14 -- NODE 2 ***
+Creating Event task (Global)
+Starting Event task (Global)
+Creating Semaphore task (Global)
+About to go to sleep!
+Starting Semaphore task (Global)
+Creating Message Queue task (Global)
+Getting SMID of semaphore
+Starting Message Queue task (Global)
+Creating Partition task (Global)
+Getting ID of msg queue
+Starting Partition task (Global)
+Getting ID of partition
+Waking up!
+Remote task's name is : 111
+Getting TID of remote task
+Receiving events from remote task
+<stream of following characters>
+
+. - indicates 100 iterations of
+ tm_evafter of 1 tick and rtems_event_receive.
+
+e - indicates that 100
+ events have been sent to the remote task.
+
+m - indicates 100 iterations of
+ rtems_message_queue_send and rtems_message_queue_receive.
+
+p - indicates 100 iterations of
+ rtems_partition_get_buffer and rtems_partition_return_buffer.
+
+s - indicates 100 iterations of
+ rtems_semaphore_obtain and rtems_semaphore_release.
+
+NOTE: The messages could be interspersed.
diff --git a/testsuites/mptests/mp14/pttask1.c b/testsuites/mptests/mp14/pttask1.c
new file mode 100644
index 0000000000..f6af1b0969
--- /dev/null
+++ b/testsuites/mptests/mp14/pttask1.c
@@ -0,0 +1,65 @@
+/* Partition_task
+ *
+ * This task continuously gets a buffer from and returns that buffer
+ * to a global partition.
+ *
+ * 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 Partition_task(
+ rtems_task_argument argument
+)
+{
+ rtems_unsigned32 count;
+ rtems_status_code status;
+ void *buffer;
+
+ puts( "Getting ID of partition" );
+ while ( FOREVER ) {
+ status = rtems_partition_ident(
+ Partition_name[ 1 ],
+ RTEMS_SEARCH_ALL_NODES,
+ &Partition_id[ 1 ]
+ );
+
+ if ( status == RTEMS_SUCCESSFUL )
+ break;
+
+ puts( "rtems_partition_ident FAILED!!" );
+ }
+
+ while ( Stop_Test == FALSE ) {
+ for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
+ status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer );
+ directive_failed( status, "rtems_partition_get_buffer" );
+
+ status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer );
+ directive_failed( status, "rtems_partition_return_buffer" );
+
+ if ( Multiprocessing_configuration.node == 1 ) {
+ status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ directive_failed( status, "rtems_task_wake_after" );
+ }
+ }
+ put_dot( 'p' );
+ }
+
+ Exit_test();
+}
diff --git a/testsuites/mptests/mp14/smtask1.c b/testsuites/mptests/mp14/smtask1.c
new file mode 100644
index 0000000000..c4d71c0101
--- /dev/null
+++ b/testsuites/mptests/mp14/smtask1.c
@@ -0,0 +1,70 @@
+/* Sm_test_task
+ *
+ * This task continuously obtains and releases a global 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"
+
+extern rtems_multiprocessing_table Multiprocessing_configuration;
+
+rtems_task Semaphore_task(
+ rtems_task_argument argument
+)
+{
+ rtems_unsigned32 count;
+ rtems_status_code status;
+ rtems_unsigned32 yield_count;
+
+ puts( "Getting SMID of semaphore" );
+ while ( FOREVER ) {
+ status = rtems_semaphore_ident(
+ Semaphore_name[ 1 ],
+ RTEMS_SEARCH_ALL_NODES,
+ &Semaphore_id[ 1 ]
+ );
+ if ( status == RTEMS_SUCCESSFUL )
+ break;
+ puts( "rtems_semaphore_ident FAILED!!" );
+ }
+
+ while ( Stop_Test == FALSE ) {
+ yield_count = 100;
+
+ for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
+ status = rtems_semaphore_obtain(
+ Semaphore_id[ 1 ],
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT
+ );
+ directive_failed( status, "rtems_semaphore_obtain" );
+
+ status = rtems_semaphore_release( Semaphore_id[ 1 ] );
+ directive_failed( status, "rtems_semaphore_release" );
+
+ if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
+ status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ directive_failed( status, "rtems_task_wake_after" );
+
+ yield_count = 100;
+ }
+ }
+ put_dot( 's' );
+ }
+
+ Exit_test();
+}
diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h
new file mode 100644
index 0000000000..f2393df080
--- /dev/null
+++ b/testsuites/mptests/mp14/system.h
@@ -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"
+#include "mpci.h"
+
+/* Miscellaneous */
+
+#define EXTERN extern /* external definition */
+
+/* macros */
+
+/* structures */
+
+#include "gvar.h"
+
+/* end of include file */