diff options
Diffstat (limited to 'testsuites/mptests/mp09')
-rw-r--r-- | testsuites/mptests/mp09/init.c | 74 | ||||
-rw-r--r-- | testsuites/mptests/mp09/node1/mp09.doc | 50 | ||||
-rw-r--r-- | testsuites/mptests/mp09/node1/mp09.scn | 22 | ||||
-rw-r--r-- | testsuites/mptests/mp09/node2/mp09.doc | 13 | ||||
-rw-r--r-- | testsuites/mptests/mp09/node2/mp09.scn | 27 | ||||
-rw-r--r-- | testsuites/mptests/mp09/recvmsg.c | 47 | ||||
-rw-r--r-- | testsuites/mptests/mp09/sendmsg.c | 60 | ||||
-rw-r--r-- | testsuites/mptests/mp09/system.h | 58 | ||||
-rw-r--r-- | testsuites/mptests/mp09/task1.c | 109 |
9 files changed, 0 insertions, 460 deletions
diff --git a/testsuites/mptests/mp09/init.c b/testsuites/mptests/mp09/init.c deleted file mode 100644 index b6f5195139..0000000000 --- a/testsuites/mptests/mp09/init.c +++ /dev/null @@ -1,74 +0,0 @@ -/* 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$ - */ - -#define TEST_INIT -#include "system.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, - 16, - RTEMS_GLOBAL, - &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, - RTEMS_MINIMUM_STACK_SIZE, - 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" ); -} diff --git a/testsuites/mptests/mp09/node1/mp09.doc b/testsuites/mptests/mp09/node1/mp09.doc deleted file mode 100644 index 15e05aae58..0000000000 --- a/testsuites/mptests/mp09/node1/mp09.doc +++ /dev/null @@ -1,50 +0,0 @@ -# -# $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. diff --git a/testsuites/mptests/mp09/node1/mp09.scn b/testsuites/mptests/mp09/node1/mp09.scn deleted file mode 100644 index 74cf06904d..0000000000 --- a/testsuites/mptests/mp09/node1/mp09.scn +++ /dev/null @@ -1,22 +0,0 @@ -*** 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 -Receiver delaying for a second -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 *** diff --git a/testsuites/mptests/mp09/node2/mp09.doc b/testsuites/mptests/mp09/node2/mp09.doc deleted file mode 100644 index 0de40191c6..0000000000 --- a/testsuites/mptests/mp09/node2/mp09.doc +++ /dev/null @@ -1,13 +0,0 @@ -# -# $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/mp09/node2/mp09.scn b/testsuites/mptests/mp09/node2/mp09.scn deleted file mode 100644 index 1bd17cecd9..0000000000 --- a/testsuites/mptests/mp09/node2/mp09.scn +++ /dev/null @@ -1,27 +0,0 @@ -*** 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 -Receiver delaying for a second -Flushing remote empty queue -0 messages were flushed on the remote queue -Send messages to be flushed from remote queue -Flushing remote queue -1 messages were flushed on the remote queue -Waiting for message queue to be deleted -Global message queue deleted -*** END OF TEST 9 *** diff --git a/testsuites/mptests/mp09/recvmsg.c b/testsuites/mptests/mp09/recvmsg.c deleted file mode 100644 index fcdb75e966..0000000000 --- a/testsuites/mptests/mp09/recvmsg.c +++ /dev/null @@ -1,47 +0,0 @@ -/* 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; - rtems_unsigned32 size; - 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, - &size, - 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" ); -} diff --git a/testsuites/mptests/mp09/sendmsg.c b/testsuites/mptests/mp09/sendmsg.c deleted file mode 100644 index ee555af67c..0000000000 --- a/testsuites/mptests/mp09/sendmsg.c +++ /dev/null @@ -1,60 +0,0 @@ -/* 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, 16 ); - 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, 16 ); - 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, - 16, - &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" ); -} diff --git a/testsuites/mptests/mp09/system.h b/testsuites/mptests/mp09/system.h deleted file mode 100644 index 3060262e8e..0000000000 --- a/testsuites/mptests/mp09/system.h +++ /dev/null @@ -1,58 +0,0 @@ -/* 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 <tmacros.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Test_task( - rtems_task_argument argument -); - -void Receive_messages( void ); - -void Send_messages( void ); - -/* configuration information */ - -#define CONFIGURE_MPTEST - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TIMERS 1 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 - -#include <confdefs.h> - -/* variables */ - -TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */ -TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ - -TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */ -TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */ - -extern char buffer1[16]; -extern char buffer2[16]; -extern char buffer3[16]; -extern char buffer4[16]; - -/* end of include file */ diff --git a/testsuites/mptests/mp09/task1.c b/testsuites/mptests/mp09/task1.c deleted file mode 100644 index c4818af23a..0000000000 --- a/testsuites/mptests/mp09/task1.c +++ /dev/null @@ -1,109 +0,0 @@ -/* 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; - rtems_unsigned32 size; - 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( "%d 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, 16 ); - 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( "%d 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, - &size, - 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 ); -} |