diff options
Diffstat (limited to 'c/src/ada-tests/mptests/mp08')
-rw-r--r-- | c/src/ada-tests/mptests/mp08/mptest.adb | 207 | ||||
-rw-r--r-- | c/src/ada-tests/mptests/mp08/mptest.ads | 192 | ||||
-rw-r--r-- | c/src/ada-tests/mptests/mp08/node1/mp08.scn | 9 | ||||
-rw-r--r-- | c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb | 43 | ||||
-rw-r--r-- | c/src/ada-tests/mptests/mp08/node2/mp08.scn | 10 | ||||
-rw-r--r-- | c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb | 43 |
6 files changed, 0 insertions, 504 deletions
diff --git a/c/src/ada-tests/mptests/mp08/mptest.adb b/c/src/ada-tests/mptests/mp08/mptest.adb deleted file mode 100644 index e07fa1dc4c..0000000000 --- a/c/src/ada-tests/mptests/mp08/mptest.adb +++ /dev/null @@ -1,207 +0,0 @@ --- --- MPTEST / BODY --- --- DESCRIPTION: --- --- This package is the implementation for Test 8 of the RTEMS --- Multiprocessor Test Suite. --- --- DEPENDENCIES: --- --- --- --- COPYRIGHT (c) 1989-1997. --- On-Line Applications Research Corporation (OAR). --- Copyright assigned to U.S. Government, 1994. --- --- The license and distribution terms for this file may in --- the file LICENSE in this distribution or at --- http://www.OARcorp.com/rtems/license.html. --- --- $Id$ --- - -with INTERFACES; use INTERFACES; -with RTEMS; -with TEST_SUPPORT; -with TEXT_IO; -with UNSIGNED32_IO; - -package body MPTEST is - - package body PER_NODE_CONFIGURATION is separate; - ---PAGE --- --- INIT --- - - procedure INIT ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ) is - STATUS : RTEMS.STATUS_CODES; - begin - - TEXT_IO.NEW_LINE( 2 ); - TEXT_IO.PUT( "*** TEST 8 -- NODE " ); - UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.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.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' ); - - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then - - TEXT_IO.PUT_LINE( "Creating Semaphore(Global)" ); - - RTEMS.SEMAPHORE_CREATE( - MPTEST.SEMAPHORE_NAME( 1 ), - 1, - RTEMS.GLOBAL, - MPTEST.SEMAPHORE_ID( 1 ), - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" ); - - end if; - - TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); - RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, - 2048, - RTEMS.TIMESLICE, - RTEMS.GLOBAL, - MPTEST.TASK_ID( 1 ), - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" ); - - TEXT_IO.PUT_LINE( "Starting Test_task (Global)" ); - RTEMS.TASK_START( - MPTEST.TASK_ID( 1 ), - MPTEST.TEST_TASK'ACCESS, - 0, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" ); - - TEXT_IO.PUT_LINE( "Deleting initialization task" ); - RTEMS.TASK_DELETE( RTEMS.SELF, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" ); - - end INIT; - ---PAGE --- --- TEST_TASK --- - - procedure TEST_TASK ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ) is - DOTS : RTEMS.UNSIGNED32; - COUNT : RTEMS.UNSIGNED32; - 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 MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then - - RTEMS.SEMAPHORE_DELETE( - MPTEST.SEMAPHORE_ID( 1 ), - STATUS - ); - TEST_SUPPORT.FATAL_DIRECTIVE_STATUS( - STATUS, - RTEMS.ILLEGAL_ON_REMOTE_OBJECT, - "SEMAPHORE_DELETE" - ); - - TEXT_IO.PUT_LINE( - "semaphore_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT" - ); - - end if; - - COUNT := 0; - - loop - - TEST_SUPPORT.PUT_DOT( "p" ); - - RTEMS.SEMAPHORE_OBTAIN( - MPTEST.SEMAPHORE_ID( 1 ), - RTEMS.DEFAULT_OPTIONS, - RTEMS.NO_TIMEOUT, - STATUS - ); - - if not RTEMS.IS_STATUS_SUCCESSFUL( STATUS ) then - - TEST_SUPPORT.FATAL_DIRECTIVE_STATUS( - STATUS, - RTEMS.OBJECT_WAS_DELETED, - "SEMAPHORE_OBTAIN" - ); - - TEXT_IO.NEW_LINE; - - TEXT_IO.PUT_LINE( "Global semaphore deleted" ); - - TEXT_IO.PUT_LINE( "*** END OF TEST 8 ***" ); - - RTEMS.SHUTDOWN_EXECUTIVE( 0 ); - - end if; - - COUNT := COUNT + 1; - - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 and then - COUNT >= 1000 then - - RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - - TEXT_IO.NEW_LINE; - - TEXT_IO.PUT_LINE( "Deleting global semaphore" ); - - RTEMS.SEMAPHORE_DELETE( MPTEST.SEMAPHORE_ID( 1 ), STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE" ); - - TEXT_IO.PUT_LINE( "*** END OF TEST 8 ***" ); - - RTEMS.SHUTDOWN_EXECUTIVE( 0 ); - - end if; - - TEST_SUPPORT.PUT_DOT( "v" ); - - RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS ); - - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" ); - - end loop; - - end TEST_TASK; - -end MPTEST; diff --git a/c/src/ada-tests/mptests/mp08/mptest.ads b/c/src/ada-tests/mptests/mp08/mptest.ads deleted file mode 100644 index 8467cbe217..0000000000 --- a/c/src/ada-tests/mptests/mp08/mptest.ads +++ /dev/null @@ -1,192 +0,0 @@ --- --- MPTEST / SPECIFICATION --- --- DESCRIPTION: --- --- This package is the specification for Test 8 of the RTEMS --- Multiprocessor Test Suite. --- --- DEPENDENCIES: --- --- --- --- COPYRIGHT (c) 1989-1997. --- On-Line Applications Research Corporation (OAR). --- Copyright assigned to U.S. Government, 1994. --- --- The license and distribution terms for this file may in --- the file LICENSE in this distribution or at --- http://www.OARcorp.com/rtems/license.html. --- --- $Id$ --- - -with BSP_MPCI; -with RTEMS; - -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 semaphores 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; - --- --- The number of events to process per dot printed out. --- - - PER_DOT : constant RTEMS.UNSIGNED32 := 100; - --- --- INIT --- --- DESCRIPTION: --- --- This RTEMS task initializes the application. --- - - procedure INIT ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - --- --- TEST_TASK --- --- DESCRIPTION: --- --- This is the body of the RTEMS tasks which constitute this test. --- - - procedure TEST_TASK ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 1, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - -end MPTEST; diff --git a/c/src/ada-tests/mptests/mp08/node1/mp08.scn b/c/src/ada-tests/mptests/mp08/node1/mp08.scn deleted file mode 100644 index ba9f089e96..0000000000 --- a/c/src/ada-tests/mptests/mp08/node1/mp08.scn +++ /dev/null @@ -1,9 +0,0 @@ -*** 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 *** diff --git a/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb deleted file mode 100644 index 7df5087537..0000000000 --- a/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb +++ /dev/null @@ -1,43 +0,0 @@ --- --- MPTEST.PER_NODE_CONFIGURATION / BODY --- --- DESCRIPTION: --- --- This package is the specification for the subpackage --- which will define the per node configuration parameters. --- --- DEPENDENCIES: --- --- --- --- COPYRIGHT (c) 1989-1997. --- On-Line Applications Research Corporation (OAR). --- Copyright assigned to U.S. Government, 1994. --- --- The license and distribution terms for this file may in --- the file LICENSE in this distribution or at --- http://www.OARcorp.com/rtems/license.html. --- --- $Id$ --- - -with RTEMS; - -separate ( MPTEST ) - -package body PER_NODE_CONFIGURATION is - ---PAGE --- --- LOCAL_NODE_NUMBER --- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32 is - begin - - return 1; - - end LOCAL_NODE_NUMBER; - -end PER_NODE_CONFIGURATION; diff --git a/c/src/ada-tests/mptests/mp08/node2/mp08.scn b/c/src/ada-tests/mptests/mp08/node2/mp08.scn deleted file mode 100644 index 8ac712ae93..0000000000 --- a/c/src/ada-tests/mptests/mp08/node2/mp08.scn +++ /dev/null @@ -1,10 +0,0 @@ -*** TEST 8 -- NODE 2 *** -Creating Test_task (Global) -Starting Test_task (Global) -Deleting initialization task -Getting SMID of semaphore -semaphore_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT -pvpvpvpvpvp....... -(continued) pvp -Global semaphore deleted -*** END OF TEST 8 *** diff --git a/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb deleted file mode 100644 index e127cc5573..0000000000 --- a/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb +++ /dev/null @@ -1,43 +0,0 @@ --- --- MPTEST.PER_NODE_CONFIGURATION / BODY --- --- DESCRIPTION: --- --- This package is the specification for the subpackage --- which will define the per node configuration parameters. --- --- DEPENDENCIES: --- --- --- --- COPYRIGHT (c) 1989-1997. --- On-Line Applications Research Corporation (OAR). --- Copyright assigned to U.S. Government, 1994. --- --- The license and distribution terms for this file may in --- the file LICENSE in this distribution or at --- http://www.OARcorp.com/rtems/license.html. --- --- $Id$ --- - -with RTEMS; - -separate ( MPTEST ) - -package body PER_NODE_CONFIGURATION is - ---PAGE --- --- LOCAL_NODE_NUMBER --- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32 is - begin - - return 2; - - end LOCAL_NODE_NUMBER; - -end PER_NODE_CONFIGURATION; |