summaryrefslogtreecommitdiffstats
path: root/testsuites/ada/mptests/mp13
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 10:00:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 10:53:16 +0200
commitee537ea3dd964d4de3565a36b4857af31fb5a3f4 (patch)
treead8b328a58469ca0632e3e61cd94f37c9d97cc25 /testsuites/ada/mptests/mp13
parentada-tests: Use _SUBDIRS instead of SUBDIRS (diff)
downloadrtems-ee537ea3dd964d4de3565a36b4857af31fb5a3f4.tar.bz2
ada-tests: Move to testsuites/ada
This solves a build dependency issue, e.g. building tests before librtemsbsp.a exists. Close #3079.
Diffstat (limited to 'testsuites/ada/mptests/mp13')
-rw-r--r--testsuites/ada/mptests/mp13/Makefile.am4
-rw-r--r--testsuites/ada/mptests/mp13/config_base.h28
-rw-r--r--testsuites/ada/mptests/mp13/mptest.adb323
-rw-r--r--testsuites/ada/mptests/mp13/mptest.ads103
-rw-r--r--testsuites/ada/mptests/mp13/node1/Makefile.am19
-rw-r--r--testsuites/ada/mptests/mp13/node1/ada_mp13-node1.scn14
-rw-r--r--testsuites/ada/mptests/mp13/node1/config.h21
-rw-r--r--testsuites/ada/mptests/mp13/node1/mp13_node1.adb56
-rw-r--r--testsuites/ada/mptests/mp13/node2/Makefile.am19
-rw-r--r--testsuites/ada/mptests/mp13/node2/ada_mp13-node2.scn16
-rw-r--r--testsuites/ada/mptests/mp13/node2/config.h21
-rw-r--r--testsuites/ada/mptests/mp13/node2/mp13_node2.adb56
12 files changed, 680 insertions, 0 deletions
diff --git a/testsuites/ada/mptests/mp13/Makefile.am b/testsuites/ada/mptests/mp13/Makefile.am
new file mode 100644
index 0000000000..d1dad5313a
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/Makefile.am
@@ -0,0 +1,4 @@
+_SUBDIRS = node1 node2
+
+include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/ada/mptests/mp13/config_base.h b/testsuites/ada/mptests/mp13/config_base.h
new file mode 100644
index 0000000000..c1b8f24e86
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/config_base.h
@@ -0,0 +1,28 @@
+/* config_base.h
+ *
+ * This include file defines all of the Configuration Table for this test
+ * EXCEPT the NODE NUMBER.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
+
+#include <rtems/confdefs.h>
+
+/* end of include file */
diff --git a/testsuites/ada/mptests/mp13/mptest.adb b/testsuites/ada/mptests/mp13/mptest.adb
new file mode 100644
index 0000000000..6dc79ab486
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/mptest.adb
@@ -0,0 +1,323 @@
+--
+-- MPTEST / BODY
+--
+-- DESCRIPTION:
+--
+-- This package is the implementation for Test 13 of the RTEMS
+-- Multiprocessor Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2011.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with INTERFACES; use INTERFACES;
+with RTEMS;
+with RTEMS.MESSAGE_QUEUE;
+with RTEMS.SEMAPHORE;
+with RTEMS.TASKS;
+with TEST_SUPPORT;
+with TEXT_IO;
+with UNSIGNED32_IO;
+
+package body MPTEST is
+
+--
+-- INIT
+--
+
+ procedure INIT (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ ) is
+ STATUS : RTEMS.STATUS_CODES;
+ begin
+
+ TEXT_IO.NEW_LINE( 2 );
+ TEXT_IO.PUT( "*** TEST 13 -- NODE " );
+ UNSIGNED32_IO.PUT(
+ TEST_SUPPORT.NODE,
+ WIDTH => 1
+ );
+ TEXT_IO.PUT_LINE( " ***" );
+
+ MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
+ MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
+
+ MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
+
+ MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
+
+ if TEST_SUPPORT.NODE = 1 then
+
+ TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
+ RTEMS.MESSAGE_QUEUE.CREATE(
+ MPTEST.QUEUE_NAME( 1 ),
+ 3,
+ RTEMS.GLOBAL + RTEMS.LIMIT,
+ MPTEST.QUEUE_ID( 1 ),
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
+
+ TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" );
+ RTEMS.SEMAPHORE.CREATE(
+ MPTEST.SEMAPHORE_NAME( 1 ),
+ 1,
+ RTEMS.GLOBAL + RTEMS.PRIORITY,
+ MPTEST.SEMAPHORE_ID( 1 ),
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
+
+ RTEMS.SEMAPHORE.OBTAIN(
+ MPTEST.SEMAPHORE_ID( 1 ),
+ RTEMS.DEFAULT_OPTIONS,
+ RTEMS.NO_TIMEOUT,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
+
+ end if;
+
+ TEXT_IO.PUT_LINE( "Creating Test_task 1 (local)" );
+ RTEMS.TASKS.CREATE(
+ MPTEST.TASK_NAME( 1 ),
+ 1,
+ 2048,
+ RTEMS.TIMESLICE,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ MPTEST.TASK_ID( 1 ),
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
+
+ TEXT_IO.PUT_LINE( "Starting Test_task 1 (local)" );
+ RTEMS.TASKS.START(
+ MPTEST.TASK_ID( 1 ),
+ MPTEST.TEST_TASK_1'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
+
+ TEXT_IO.PUT_LINE( "Creating Test_task 2 (local)" );
+ RTEMS.TASKS.CREATE(
+ MPTEST.TASK_NAME( 2 ),
+ 1,
+ 2048,
+ RTEMS.TIMESLICE,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ MPTEST.TASK_ID( 2 ),
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
+
+ TEXT_IO.PUT_LINE( "Starting Test_task 2 (local)" );
+ RTEMS.TASKS.START(
+ MPTEST.TASK_ID( 2 ),
+ MPTEST.TEST_TASK_2'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
+
+ if TEST_SUPPORT.NODE = 1 then
+
+ RTEMS.TASKS.WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "*** END OF TEST 13 ***" );
+
+ RTEMS.SHUTDOWN_EXECUTIVE( 0 );
+
+ end if;
+
+ TEXT_IO.PUT_LINE( "Deleting initialization task" );
+ RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
+
+ end INIT;
+
+--
+-- TEST_TASK_1
+--
+
+ procedure TEST_TASK_1 (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ ) is
+ COUNT : RTEMS.UNSIGNED32;
+ RECEIVE_BUFFER_AREA : RTEMS.BUFFER;
+ RECEIVE_BUFFER : RTEMS.BUFFER_POINTER;
+ STATUS : RTEMS.STATUS_CODES;
+ begin
+
+ RECEIVE_BUFFER :=
+ RTEMS.TO_BUFFER_POINTER( RECEIVE_BUFFER_AREA'ADDRESS );
+
+ TEXT_IO.PUT_LINE( "Getting QID of message queue" );
+
+ loop
+
+ RTEMS.MESSAGE_QUEUE.IDENT(
+ MPTEST.QUEUE_NAME( 1 ),
+ RTEMS.SEARCH_ALL_NODES,
+ MPTEST.QUEUE_ID( 1 ),
+ STATUS
+ );
+
+ exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
+
+ end loop;
+
+ if TEST_SUPPORT.NODE = 1 then
+
+ TEXT_IO.PUT_LINE( "Receiving message ..." );
+ RTEMS.MESSAGE_QUEUE.RECEIVE(
+ MPTEST.QUEUE_ID( 1 ),
+ RECEIVE_BUFFER,
+ RTEMS.DEFAULT_OPTIONS,
+ RTEMS.NO_TIMEOUT,
+ STATUS
+ );
+ TEXT_IO.PUT_LINE( "How did I get back from here???" );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
+
+ end if;
+
+ RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "Receiving message ..." );
+ RTEMS.MESSAGE_QUEUE.RECEIVE(
+ MPTEST.QUEUE_ID( 1 ),
+ RECEIVE_BUFFER,
+ RTEMS.DEFAULT_OPTIONS,
+ 2 * TEST_SUPPORT.TICKS_PER_SECOND,
+ STATUS
+ );
+ TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
+ STATUS,
+ RTEMS.TIMEOUT,
+ "MESSAGE_QUEUE_RECEIVE"
+ );
+ TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
+ STATUS,
+ RTEMS.TIMEOUT,
+ "MESSAGE_QUEUE_OBTAIN"
+ );
+
+ TEXT_IO.PUT_LINE(
+ "message_queue_receive correctly returned TIMEOUT"
+ );
+
+ TEXT_IO.PUT_LINE( "Deleting self" );
+ RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
+
+ end TEST_TASK_1;
+
+--
+-- TEST_TASK_2
+--
+
+ procedure TEST_TASK_2 (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ ) is
+ STATUS : RTEMS.STATUS_CODES;
+ begin
+
+ TEXT_IO.PUT_LINE( "Getting SMID of semaphore" );
+
+ loop
+
+ RTEMS.SEMAPHORE.IDENT(
+ MPTEST.SEMAPHORE_NAME( 1 ),
+ RTEMS.SEARCH_ALL_NODES,
+ MPTEST.SEMAPHORE_ID( 1 ),
+ STATUS
+ );
+
+ exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
+
+ end loop;
+
+ if TEST_SUPPORT.NODE = 1 then
+
+ RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "Releasing semaphore ..." );
+ RTEMS.SEMAPHORE.RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
+
+ RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "Getting semaphore ..." );
+ RTEMS.SEMAPHORE.OBTAIN(
+ MPTEST.SEMAPHORE_ID( 1 ),
+ RTEMS.DEFAULT_OPTIONS,
+ RTEMS.NO_TIMEOUT,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
+
+ TEXT_IO.PUT_LINE( "Getting semaphore ..." );
+ RTEMS.SEMAPHORE.OBTAIN(
+ MPTEST.SEMAPHORE_ID( 1 ),
+ RTEMS.DEFAULT_OPTIONS,
+ RTEMS.NO_TIMEOUT,
+ STATUS
+ );
+ TEXT_IO.PUT_LINE( "How did I get back from here???" );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
+
+ end if;
+
+ RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "Getting semaphore ..." );
+ RTEMS.SEMAPHORE.OBTAIN(
+ MPTEST.SEMAPHORE_ID( 1 ),
+ RTEMS.DEFAULT_OPTIONS,
+ RTEMS.NO_TIMEOUT,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
+
+ TEXT_IO.PUT_LINE( "Releasing semaphore ..." );
+ RTEMS.SEMAPHORE.RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
+
+ RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
+
+ TEXT_IO.PUT_LINE( "Getting semaphore ..." );
+ RTEMS.SEMAPHORE.OBTAIN(
+ MPTEST.SEMAPHORE_ID( 1 ),
+ RTEMS.DEFAULT_OPTIONS,
+ 2 * TEST_SUPPORT.TICKS_PER_SECOND,
+ STATUS
+ );
+ TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
+ STATUS,
+ RTEMS.TIMEOUT,
+ "SEMAPHORE_OBTAIN"
+ );
+ TEXT_IO.PUT_LINE( "semaphore_obtain correctly returned TIMEOUT" );
+
+ TEXT_IO.PUT_LINE( "*** END OF TEST 13 ***" );
+
+ RTEMS.SHUTDOWN_EXECUTIVE( 0 );
+
+ end TEST_TASK_2;
+
+end MPTEST;
diff --git a/testsuites/ada/mptests/mp13/mptest.ads b/testsuites/ada/mptests/mp13/mptest.ads
new file mode 100644
index 0000000000..8caa2347c9
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/mptest.ads
@@ -0,0 +1,103 @@
+--
+-- MPTEST / SPECIFICATION
+--
+-- DESCRIPTION:
+--
+-- This package is the specification for Test 13 of the RTEMS
+-- Multiprocessor Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2011.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with RTEMS;
+with RTEMS.TASKS;
+
+package MPTEST is
+
+--
+-- These arrays contain the IDs and NAMEs of all RTEMS tasks created
+-- by this test.
+--
+
+ TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
+ TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
+
+--
+-- These arrays contain the IDs and NAMEs of all RTEMS message
+-- queues created by this test.
+--
+
+ QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
+ QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
+
+--
+-- These arrays contain the IDs and NAMEs of all RTEMS semaphore
+-- created by this test.
+--
+
+ SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
+ SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
+
+--
+-- This variable contains the ID of the remote task with which this
+-- test interacts.
+--
+
+ REMOTE_TID : RTEMS.ID;
+
+--
+-- This variable contains the node on which the remote task with which
+-- this test interacts resides.
+--
+
+ REMOTE_NODE : RTEMS.UNSIGNED32;
+
+--
+-- INIT
+--
+-- DESCRIPTION:
+--
+-- This RTEMS task initializes the application.
+--
+
+ procedure INIT (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ );
+ pragma Convention (C, INIT);
+
+--
+-- TEST_TASK_1
+--
+-- DESCRIPTION:
+--
+-- This is the body of one of the RTEMS tasks which constitute this test.
+--
+
+ procedure TEST_TASK_1 (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ );
+ pragma Convention (C, TEST_TASK_1);
+
+--
+-- TEST_TASK_2
+--
+-- DESCRIPTION:
+--
+-- This is the body of one of the RTEMS tasks which constitute this test.
+--
+
+ procedure TEST_TASK_2 (
+ ARGUMENT : in RTEMS.TASKS.ARGUMENT
+ );
+ pragma Convention (C, TEST_TASK_2);
+
+end MPTEST;
diff --git a/testsuites/ada/mptests/mp13/node1/Makefile.am b/testsuites/ada/mptests/mp13/node1/Makefile.am
new file mode 100644
index 0000000000..bf641cec25
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node1/Makefile.am
@@ -0,0 +1,19 @@
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+
+include $(top_srcdir)/ada.am
+
+AM_ADAFLAGS += -I$(srcdir)/..
+
+noinst_PROGRAMS = mp13_ada_mp13_node1
+mp13_ada_mp13_node1_SOURCES = mp13_node1.adb ../mptest.adb config.h
+mp13_ada_mp13_node1_SOURCES += ../mptest.ads
+mp13_ada_mp13_node1_SOURCES += ../../../support/init.c
+
+mp13_ada_mp13_node1$(EXEEXT): mp13_node1.adb ../mptest.adb init.$(OBJEXT)
+ $(GNATCOMPILE) -margs -a $< -o $@
+
+scndir = $(rtems_ada_testsdir)
+dist_scn_DATA = ada_mp13-node1.scn
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/ada/mptests/mp13/node1/ada_mp13-node1.scn b/testsuites/ada/mptests/mp13/node1/ada_mp13-node1.scn
new file mode 100644
index 0000000000..d3bd11f65e
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node1/ada_mp13-node1.scn
@@ -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 ***
diff --git a/testsuites/ada/mptests/mp13/node1/config.h b/testsuites/ada/mptests/mp13/node1/config.h
new file mode 100644
index 0000000000..36c9d133e8
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node1/config.h
@@ -0,0 +1,21 @@
+/* config.h
+ *
+ * This include file defines the Configuration Table for this test.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+
+/* configuration information */
+
+#define CONFIGURE_MP_APPLICATION
+#define CONFIGURE_MP_NODE_NUMBER 1
+
+#include "../config_base.h"
+
+/* end of include file */
diff --git a/testsuites/ada/mptests/mp13/node1/mp13_node1.adb b/testsuites/ada/mptests/mp13/node1/mp13_node1.adb
new file mode 100644
index 0000000000..561bc67ba5
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node1/mp13_node1.adb
@@ -0,0 +1,56 @@
+--
+-- MAIN / BODY
+--
+-- DESCRIPTION:
+--
+-- This is the entry point for Test MP13_NODE1 of the Multiprocessor
+-- Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2011.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with RTEMS;
+with RTEMS.TASKS;
+with MPTEST;
+with TEST_SUPPORT;
+
+procedure MP13_NODE1 is
+ INIT_ID : RTEMS.ID;
+ STATUS : RTEMS.STATUS_CODES;
+begin
+
+ RTEMS.TASKS.CREATE(
+ RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
+ 1,
+ RTEMS.MINIMUM_STACK_SIZE,
+ RTEMS.NO_PREEMPT,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ INIT_ID,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
+
+
+ RTEMS.TASKS.START(
+ INIT_ID,
+ MPTEST.INIT'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
+
+ loop
+ delay 120.0;
+ end loop;
+
+end MP13_NODE1;
+
diff --git a/testsuites/ada/mptests/mp13/node2/Makefile.am b/testsuites/ada/mptests/mp13/node2/Makefile.am
new file mode 100644
index 0000000000..95e9798ad7
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node2/Makefile.am
@@ -0,0 +1,19 @@
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+
+include $(top_srcdir)/ada.am
+
+AM_ADAFLAGS += -I$(srcdir)/..
+
+noinst_PROGRAMS = mp13_ada_mp13_node2
+mp13_ada_mp13_node2_SOURCES = mp13_node2.adb ../mptest.adb config.h
+mp13_ada_mp13_node2_SOURCES += ../mptest.ads
+mp13_ada_mp13_node2_SOURCES += ../../../support/init.c
+
+mp13_ada_mp13_node2$(EXEEXT): mp13_node2.adb ../mptest.adb init.$(OBJEXT)
+ $(GNATCOMPILE) -margs -a $< -o $@
+
+scndir = $(rtems_ada_testsdir)
+dist_scn_DATA = ada_mp13-node2.scn
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/ada/mptests/mp13/node2/ada_mp13-node2.scn b/testsuites/ada/mptests/mp13/node2/ada_mp13-node2.scn
new file mode 100644
index 0000000000..3254046292
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node2/ada_mp13-node2.scn
@@ -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 ...
+Releasing semaphore ...
+Receiving message ...
+Getting semaphore ...
+message_queue_receive correctly returned TIMEOUT
+Deleting self
+semaphore_obtain correctly returned TIMEOUT
+*** END OF TEST 13 ***
diff --git a/testsuites/ada/mptests/mp13/node2/config.h b/testsuites/ada/mptests/mp13/node2/config.h
new file mode 100644
index 0000000000..47edf66149
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node2/config.h
@@ -0,0 +1,21 @@
+/* config.h
+ *
+ * This include file defines the Configuration Table for this test.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+
+/* configuration information */
+
+#define CONFIGURE_MP_APPLICATION
+#define CONFIGURE_MP_NODE_NUMBER 2
+
+#include "../config_base.h"
+
+/* end of include file */
diff --git a/testsuites/ada/mptests/mp13/node2/mp13_node2.adb b/testsuites/ada/mptests/mp13/node2/mp13_node2.adb
new file mode 100644
index 0000000000..e197f5aa12
--- /dev/null
+++ b/testsuites/ada/mptests/mp13/node2/mp13_node2.adb
@@ -0,0 +1,56 @@
+--
+-- MAIN / BODY
+--
+-- DESCRIPTION:
+--
+-- This is the entry point for Test MP13_NODE2 of the Multiprocessor
+-- Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2011.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with RTEMS;
+with RTEMS.TASKS;
+with MPTEST;
+with TEST_SUPPORT;
+
+procedure MP13_NODE2 is
+ INIT_ID : RTEMS.ID;
+ STATUS : RTEMS.STATUS_CODES;
+begin
+
+ RTEMS.TASKS.CREATE(
+ RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
+ 1,
+ RTEMS.MINIMUM_STACK_SIZE,
+ RTEMS.NO_PREEMPT,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ INIT_ID,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
+
+
+ RTEMS.TASKS.START(
+ INIT_ID,
+ MPTEST.INIT'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
+
+ loop
+ delay 120.0;
+ end loop;
+
+end MP13_NODE2;
+