[PATCH 5/9] sptests: Split sp09 screens 7, 8 into spmsg1_err01 and spmsgq_err02.

Jennifer Averett jennifer.averett at oarcorp.com
Thu Mar 27 15:30:02 UTC 2014


From: Björn Larsson <BjornL at rtems.org>

spmsgq_err01 test replaces rtems_message_queue_XXX error tests from
sp09 screen 7.  spmsgq_err02 replaces rtems_message_queue_XXX error
tests from sp09 screen 8.
---
 testsuites/sptests/Makefile.am                   |   2 +-
 testsuites/sptests/configure.ac                  |   2 +
 testsuites/sptests/sp09/Makefile.am              |   2 +-
 testsuites/sptests/sp09/screen07.c               | 397 ----------------------
 testsuites/sptests/sp09/screen08.c               | 131 --------
 testsuites/sptests/sp09/sp09.scn                 |  55 ----
 testsuites/sptests/sp09/system.h                 |   4 -
 testsuites/sptests/sp09/task1.c                  |   6 -
 testsuites/sptests/spmsgq_err01/Makefile.am      |  22 ++
 testsuites/sptests/spmsgq_err01/init.c           | 403 +++++++++++++++++++++++
 testsuites/sptests/spmsgq_err01/spmsgq_err01.doc |  25 ++
 testsuites/sptests/spmsgq_err01/spmsgq_err01.scn |  35 ++
 testsuites/sptests/spmsgq_err01/system.h         |  64 ++++
 testsuites/sptests/spmsgq_err02/Makefile.am      |  22 ++
 testsuites/sptests/spmsgq_err02/init.c           | 155 +++++++++
 testsuites/sptests/spmsgq_err02/spmsgq_err02.doc |  26 ++
 testsuites/sptests/spmsgq_err02/spmsgq_err02.scn |  24 ++
 testsuites/sptests/spmsgq_err02/system.h         |  68 ++++
 testsuites/sptests/spmsgq_err02/task3.c          |  54 +++
 19 files changed, 902 insertions(+), 595 deletions(-)
 delete mode 100644 testsuites/sptests/sp09/screen07.c
 delete mode 100644 testsuites/sptests/sp09/screen08.c
 create mode 100644 testsuites/sptests/spmsgq_err01/Makefile.am
 create mode 100644 testsuites/sptests/spmsgq_err01/init.c
 create mode 100644 testsuites/sptests/spmsgq_err01/spmsgq_err01.doc
 create mode 100644 testsuites/sptests/spmsgq_err01/spmsgq_err01.scn
 create mode 100644 testsuites/sptests/spmsgq_err01/system.h
 create mode 100644 testsuites/sptests/spmsgq_err02/Makefile.am
 create mode 100644 testsuites/sptests/spmsgq_err02/init.c
 create mode 100644 testsuites/sptests/spmsgq_err02/spmsgq_err02.doc
 create mode 100644 testsuites/sptests/spmsgq_err02/spmsgq_err02.scn
 create mode 100644 testsuites/sptests/spmsgq_err02/system.h
 create mode 100644 testsuites/sptests/spmsgq_err02/task3.c

diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 625b6d6..94e0878 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -30,7 +30,7 @@ SUBDIRS = \
     spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \
     spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
     spregion_err01 sppartition_err01 spratemon_err01 spintr_err01 \
-    spsignal_err01 spport_err01
+    spsignal_err01 spport_err01 spmsgq_err01 spmsgq_err02
 SUBDIRS += spprofiling01
 SUBDIRS += spcache01
 SUBDIRS += sptls03
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 809957d..0f88f68 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -193,6 +193,8 @@ spintrcritical17/Makefile
 spheapprot/Makefile
 spmkdir/Makefile
 spmountmgr01/Makefile
+spmsgq_err01/Makefile
+spmsgq_err02/Makefile
 spnotepad01/Makefile
 spnsext01/Makefile
 spobjgetnext/Makefile
diff --git a/testsuites/sptests/sp09/Makefile.am b/testsuites/sptests/sp09/Makefile.am
index 5e92d87..ada2075 100644
--- a/testsuites/sptests/sp09/Makefile.am
+++ b/testsuites/sptests/sp09/Makefile.am
@@ -1,7 +1,7 @@
 
 rtems_tests_PROGRAMS = sp09
 sp09_SOURCES = init.c delay.c isr.c screen01.c screen02.c screen03.c screen04.c \
-    screen05.c screen06.c screen07.c screen08.c \
+    screen05.c screen06.c \
     task1.c task2.c task3.c \
     system.h
 
diff --git a/testsuites/sptests/sp09/screen07.c b/testsuites/sptests/sp09/screen07.c
deleted file mode 100644
index 536d23f..0000000
--- a/testsuites/sptests/sp09/screen07.c
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- *  COPYRIGHT (c) 1989-2011.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "system.h"
-
-#define MESSAGE_SIZE (sizeof(long) * 4)
-
-void Screen7()
-{
-  long              buffer[ 4 ];
-  uint32_t          count;
-  size_t            size;
-  rtems_status_code status;
-
-  status = rtems_message_queue_broadcast( 100, buffer, MESSAGE_SIZE, &count );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_broadcast with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID" );
-
-  /* null ID parameter */
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    3,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    NULL
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_create with null param"
-  );
-  puts( "TA1 - rtems_message_queue_create - NULL Id - RTEMS_INVALID_ADDRESS" );
-
-  /* count == 0 */
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    0,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Junk_id
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_NUMBER,
-    "rtems_message_queue_create with 0 count"
-  );
-  puts( "TA1 - rtems_message_queue_create - count = 0 - RTEMS_INVALID_NUMBER" );
-
-  /* max size == 0 */
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    3,
-    0,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Junk_id
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_SIZE,
-    "rtems_message_queue_create with 0 msg size"
-  );
-  puts( "TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE" );
-
-  /* bad name parameter */
-  status = rtems_message_queue_create(
-    0,
-    3,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Junk_id
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_NAME,
-    "rtems_message_queue_create with illegal name"
-  );
-  puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME" );
-
-  /*
-   *  The check for an object being global is only made if
-   *  multiprocessing is enabled.
-   */
-
-#if defined(RTEMS_MULTIPROCESSING)
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    1,
-    MESSAGE_SIZE,
-    RTEMS_GLOBAL,
-    &Junk_id
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_MP_NOT_CONFIGURED,
-    "rtems_message_queue_create of mp not configured"
-  );
-#endif
-  puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED" );
-
-  /* not enough memory for messages */
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    INT_MAX,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_UNSATISFIED,
-    "rtems_message_queue_create unsatisfied"
-  );
-  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED" );
-
-  /* too large a request for messages */
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    INT_MAX,
-    INT_MAX,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_UNSATISFIED,
-    "rtems_message_queue_create unsatisfied"
-  );
-  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2" );
-
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    2,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  directive_failed( status, "rtems_message_queue_create successful" );
-  puts( "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_create(
-    Queue_name[ 2 ],
-    1,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Junk_id
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_TOO_MANY,
-    "rtems_message_queue_create of too many"
-  );
-  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY" );
-
-  status = rtems_message_queue_delete( 100 );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_create with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_delete( rtems_build_id( 1, 1, 1, 256 ) );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_delete with local illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_NAME,
-    "rtems_message_queue_ident with illegal name"
-  );
-  puts( "TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME" );
-
-  /* number pending - bad Id */
-  status = rtems_message_queue_get_number_pending( Queue_id[ 1 ], NULL );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_get_number_pending with NULL param"
-  );
-  puts("TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ADDRESS");
-
-  /* number pending - bad Id */
-  status = rtems_message_queue_get_number_pending( 100, &count );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_get_number_pending with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID" );
-
-  /* flush null param */
-  status = rtems_message_queue_flush( Queue_id[ 1 ], NULL );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_flush with NULL param"
-  );
-  puts( "TA1 - rtems_message_queue_flush - RTEMS_INVALID_ADDRESS" );
-
-  /* flush invalid id */
-  status = rtems_message_queue_flush( 100, &count );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_flush with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_receive(
-    100,
-    (long (*)[4]) buffer,
-    &size,
-    RTEMS_DEFAULT_OPTIONS,
-    0
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_receive with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_receive(
-    Queue_id[ 1 ],
-    NULL,
-    &size,
-    RTEMS_NO_WAIT,
-    RTEMS_NO_TIMEOUT
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_receive NULL buffer"
-  );
-  puts(
-    "TA1 - rtems_message_queue_receive - Q 1 - "
-      "RTEMS_INVALID_ADDRESS NULL buffer"
-  );
-
-  status = rtems_message_queue_receive(
-    Queue_id[ 1 ],
-    (long (*)[4]) buffer,
-    NULL,
-    RTEMS_NO_WAIT,
-    RTEMS_NO_TIMEOUT
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_receive NULL size"
-  );
-  puts(
-    "TA1 - rtems_message_queue_receive - Q 1 - "
-      "RTEMS_INVALID_ADDRESS NULL size"
-  );
-
-  status = rtems_message_queue_receive(
-    Queue_id[ 1 ],
-    (long (*)[4]) buffer,
-    &size,
-    RTEMS_NO_WAIT,
-    RTEMS_NO_TIMEOUT
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_UNSATISFIED,
-    "rtems_message_queue_receive unsatisfied"
-  );
-  puts( "TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED" );
-
-  puts( "TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds" );
-  status = rtems_message_queue_receive(
-    Queue_id[ 1 ],
-    (long (*)[4]) buffer,
-    &size,
-    RTEMS_DEFAULT_OPTIONS,
-    3 * rtems_clock_get_ticks_per_second()
-  );
-  fatal_directive_status(
-    status,
-    RTEMS_TIMEOUT,
-    "rtems_message_queue_receive 3 second timeout"
-  );
-
-  puts(
-    "TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT"
-  );
-
-  /* send NULL message*/
-  status = rtems_message_queue_send( Queue_id[ 1 ], NULL, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_send with NULL buffer"
-  );
-  puts(
-    "TA1 - rtems_message_queue_send - NULL buffer - RTEMS_INVALID_ADDRESS"
-  );
-
-  /* send bad id */
-  status = rtems_message_queue_send( 100, buffer, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_send with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_send - RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_TOO_MANY,
-    "rtems_message_queue_send too many to a limited queue"
-  );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
-
-  /* urgent NULL message*/
-  status = rtems_message_queue_urgent( Queue_id[ 1 ], NULL, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_urgent with NULL buffer"
-  );
-  puts(
-    "TA1 - rtems_message_queue_urgent - NULL buffer - RTEMS_INVALID_ADDRESS"
-  );
-
-  /* urgent bad Id */
-  status = rtems_message_queue_urgent( 100, buffer, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ID,
-    "rtems_message_queue_urgent with illegal id"
-  );
-  puts( "TA1 - rtems_message_queue_urgent - RTEMS_INVALID_ID" );
-
-  status = rtems_message_queue_broadcast(
-     Queue_id[ 1 ], NULL, MESSAGE_SIZE, &count );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_broadcast with NULL count"
-  );
-  puts(
-    "TA1 - rtems_message_queue_broadcast - NULL buffer - RTEMS_INVALID_ADDRESS"
-  );
-
-  status = rtems_message_queue_broadcast(
-     Queue_id[ 1 ], buffer, MESSAGE_SIZE + 1, &count );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_SIZE,
-    "rtems_message_queue_broadcast with too large"
-  );
-  puts(
-    "TA1 - rtems_message_queue_broadcast - too large - RTEMS_INVALID_SIZE"
-  );
-
-  status = rtems_message_queue_broadcast(
-      Queue_id[ 1 ], buffer, MESSAGE_SIZE, NULL );
-  fatal_directive_status(
-    status,
-    RTEMS_INVALID_ADDRESS,
-    "rtems_message_queue_broadcast with NULL count"
-  );
-  puts(
-    "TA1 - rtems_message_queue_broadcast - NULL count - RTEMS_INVALID_ADDRESS"
-  );
-
-}
diff --git a/testsuites/sptests/sp09/screen08.c b/testsuites/sptests/sp09/screen08.c
deleted file mode 100644
index caf755e..0000000
--- a/testsuites/sptests/sp09/screen08.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*  Screen8
- *
- *  This routine generates error screen 8 for test 9.
- *
- *  Input parameters:  NONE
- *
- *  Output parameters:  NONE
- *
- *  COPYRIGHT (c) 1989-1999.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "system.h"
-
-#define MESSAGE_SIZE (sizeof(long) * 4)
-
-void Screen8()
-{
-  long              buffer[ 4 ];
-  rtems_status_code status;
-
-  status = rtems_message_queue_delete( Queue_id[ 1 ] );
-  directive_failed( status, "rtems_message_queue_delete successful" );
-  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    2,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  directive_failed( status, "rtems_message_queue_create successful" );
-  puts(
-    "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL"
-  );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send successful" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send successful" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_TOO_MANY,
-    "rtems_message_queue_send too many to limited queue"
-  );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
-
-  status = rtems_message_queue_delete( Queue_id[ 1 ] );
-  directive_failed( status, "rtems_message_queue_delete successful" );
-  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    3,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  directive_failed( status, "rtems_message_queue_create successful" );
-  puts(
-    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
-  );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send successful" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send successful" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  directive_failed( status, "rtems_message_queue_send successful" );
-  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
-  fatal_directive_status(
-    status,
-    RTEMS_TOO_MANY,
-    "rtems_message_queue_send too many to limited queue"
-  );
-  puts(
-    "TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY"
-  );
-
-  status = rtems_message_queue_delete( Queue_id[ 1 ] );
-  directive_failed( status, "rtems_message_queue_delete successful" );
-  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
-  status = rtems_message_queue_create(
-    Queue_name[ 1 ],
-    3,
-    MESSAGE_SIZE,
-    RTEMS_DEFAULT_ATTRIBUTES,
-    &Queue_id[ 1 ]
-  );
-  directive_failed( status, "rtems_message_queue_create successful" );
-  puts(
-    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
-  );
-
-  puts( "TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL" );
-  status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
-  directive_failed( status, "rtems_task_start of TA3" );
-
-  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
-  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  directive_failed( status, "rtems_task_wake_after (yield)" );
-
-  puts( "TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL" );
-  status = rtems_message_queue_delete( Queue_id[ 1 ] );
-  directive_failed( status, "rtems_message_queue_delete successful" );
-
-  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
-  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-  directive_failed( status, "rtems_task_wake_after (yield)" );
-}
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index 5807ebe..8cf36ce 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -120,59 +120,4 @@ TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
 TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED
 TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
 TA1 - rtems_task_delete TA2 - already deleted RTEMS_INVALID_ID
-<pause - screen 7>
-TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_create - NULL Id - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_create - count = 0 - RTEMS_INVALID_NUMBER
-TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE
-TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME
-TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED
-TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED
-TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2
-TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID
-TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME
-TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_flush - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL buffer
-TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL size
-TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED
-TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds
-TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT
-TA1 - rtems_message_queue_send - NULL buffer - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_send - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_urgent - NULL buffer - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_urgent - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_broadcast - NULL buffer - RTEMS_INVALID_ADDRESS
-TA1 - rtems_message_queue_broadcast - too large - RTEMS_INVALID_SIZE
-TA1 - rtems_message_queue_broadcast - NULL count - RTEMS_INVALID_ADDRESS
-<pause - screen 8>
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER
-TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED
-TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
 *** END OF TEST 9 ***
diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h
index 92d66fd..30b34e1 100644
--- a/testsuites/sptests/sp09/system.h
+++ b/testsuites/sptests/sp09/system.h
@@ -57,10 +57,6 @@ void Screen5( void );
 
 void Screen6( void );
 
-void Screen7( void );
-
-void Screen8( void );
-
 /* configuration information */
 
 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
index 6ebb5c1..403f36c 100644
--- a/testsuites/sptests/sp09/task1.c
+++ b/testsuites/sptests/sp09/task1.c
@@ -41,12 +41,6 @@ rtems_task Task_1(
   rtems_test_pause_and_screen_number( 6 );
 
   Screen6();
-  rtems_test_pause_and_screen_number( 7 );
-
-  Screen7();
-  rtems_test_pause_and_screen_number( 8 );
-
-  Screen8();
   
   puts( "*** END OF TEST 9 ***" );
   rtems_test_exit( 0 );
diff --git a/testsuites/sptests/spmsgq_err01/Makefile.am b/testsuites/sptests/spmsgq_err01/Makefile.am
new file mode 100644
index 0000000..65060bf
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err01/Makefile.am
@@ -0,0 +1,22 @@
+
+rtems_tests_PROGRAMS = spmsgq_err01
+spmsgq_err01_SOURCES = init.c system.h
+
+dist_rtems_tests_DATA = spmsgq_err01.scn
+dist_rtems_tests_DATA += spmsgq_err01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spmsgq_err01_OBJECTS)
+LINK_LIBS = $(spmsgq_err01_LDLIBS)
+
+spmsgq_err01$(EXEEXT): $(spmsgq_err01_OBJECTS) $(spmsgq_err01_DEPENDENCIES)
+	@rm -f spmsgq_err01$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spmsgq_err01/init.c b/testsuites/sptests/spmsgq_err01/init.c
new file mode 100644
index 0000000..f3fdfdb
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err01/init.c
@@ -0,0 +1,403 @@
+/*
+ *  COPYRIGHT (c) 2014.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define CONFIGURE_INIT
+#include "system.h"
+#define MESSAGE_SIZE (sizeof(long) * 4)
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  long              buffer[ 4 ];
+  uint32_t          count;
+  size_t            size;
+  rtems_status_code status;
+  
+  puts( "\n\n*** TEST MESSAGE QUEUE ERROR 01 ***" );
+  Queue_name[ 1 ]      =  rtems_build_name( 'M', 'Q', '1', ' ' );
+  Queue_name[ 2 ]      =  rtems_build_name( 'M', 'Q', '2', ' ' );
+  
+  status = rtems_message_queue_broadcast( 100, buffer, MESSAGE_SIZE, &count );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_broadcast with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID" );
+
+  /* null ID parameter */
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    3,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    NULL
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_create with null param"
+  );
+  puts( "TA1 - rtems_message_queue_create - NULL Id - RTEMS_INVALID_ADDRESS" );
+
+  /* count == 0 */
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    0,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Junk_id
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_NUMBER,
+    "rtems_message_queue_create with 0 count"
+  );
+  puts( "TA1 - rtems_message_queue_create - count = 0 - RTEMS_INVALID_NUMBER" );
+
+  /* max size == 0 */
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    3,
+    0,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Junk_id
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_SIZE,
+    "rtems_message_queue_create with 0 msg size"
+  );
+  puts( "TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE" );
+
+  /* bad name parameter */
+  status = rtems_message_queue_create(
+    0,
+    3,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Junk_id
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_NAME,
+    "rtems_message_queue_create with illegal name"
+  );
+  puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME" );
+
+  /*
+   *  The check for an object being global is only made if
+   *  multiprocessing is enabled.
+   */
+
+#if defined(RTEMS_MULTIPROCESSING)
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    1,
+    MESSAGE_SIZE,
+    RTEMS_GLOBAL,
+    &Junk_id
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_MP_NOT_CONFIGURED,
+    "rtems_message_queue_create of mp not configured"
+  );
+#endif
+  puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED" );
+
+  /* not enough memory for messages */
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    INT_MAX,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_UNSATISFIED,
+    "rtems_message_queue_create unsatisfied"
+  );
+  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED" );
+
+  /* too large a request for messages */
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    INT_MAX,
+    INT_MAX,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_UNSATISFIED,
+    "rtems_message_queue_create unsatisfied"
+  );
+  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2" );
+
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    2,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  directive_failed( status, "rtems_message_queue_create successful" );
+  puts( "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_create(
+    Queue_name[ 2 ],
+    1,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Junk_id
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_TOO_MANY,
+    "rtems_message_queue_create of too many"
+  );
+  puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY" );
+
+  status = rtems_message_queue_delete( 100 );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_create with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_delete( rtems_build_id( 1, 1, 1, 256 ) );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_delete with local illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_NAME,
+    "rtems_message_queue_ident with illegal name"
+  );
+  puts( "TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME" );
+
+  /* number pending - bad Id */
+  status = rtems_message_queue_get_number_pending( Queue_id[ 1 ], NULL );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_get_number_pending with NULL param"
+  );
+  puts("TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ADDRESS");
+
+  /* number pending - bad Id */
+  status = rtems_message_queue_get_number_pending( 100, &count );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_get_number_pending with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID" );
+
+  /* flush null param */
+  status = rtems_message_queue_flush( Queue_id[ 1 ], NULL );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_flush with NULL param"
+  );
+  puts( "TA1 - rtems_message_queue_flush - RTEMS_INVALID_ADDRESS" );
+
+  /* flush invalid id */
+  status = rtems_message_queue_flush( 100, &count );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_flush with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_receive(
+    100,
+    (long (*)[4]) buffer,
+    &size,
+    RTEMS_DEFAULT_OPTIONS,
+    0
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_receive with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_receive(
+    Queue_id[ 1 ],
+    NULL,
+    &size,
+    RTEMS_NO_WAIT,
+    RTEMS_NO_TIMEOUT
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_receive NULL buffer"
+  );
+  puts(
+    "TA1 - rtems_message_queue_receive - Q 1 - "
+      "RTEMS_INVALID_ADDRESS NULL buffer"
+  );
+
+  status = rtems_message_queue_receive(
+    Queue_id[ 1 ],
+    (long (*)[4]) buffer,
+    NULL,
+    RTEMS_NO_WAIT,
+    RTEMS_NO_TIMEOUT
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_receive NULL size"
+  );
+  puts(
+    "TA1 - rtems_message_queue_receive - Q 1 - "
+      "RTEMS_INVALID_ADDRESS NULL size"
+  );
+
+  status = rtems_message_queue_receive(
+    Queue_id[ 1 ],
+    (long (*)[4]) buffer,
+    &size,
+    RTEMS_NO_WAIT,
+    RTEMS_NO_TIMEOUT
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_UNSATISFIED,
+    "rtems_message_queue_receive unsatisfied"
+  );
+  puts( "TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED" );
+
+  puts( "TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds" );
+  status = rtems_message_queue_receive(
+    Queue_id[ 1 ],
+    (long (*)[4]) buffer,
+    &size,
+    RTEMS_DEFAULT_OPTIONS,
+    3 * rtems_clock_get_ticks_per_second()
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_TIMEOUT,
+    "rtems_message_queue_receive 3 second timeout"
+  );
+
+  puts(
+    "TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT"
+  );
+
+  /* send NULL message*/
+  status = rtems_message_queue_send( Queue_id[ 1 ], NULL, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_send with NULL buffer"
+  );
+  puts(
+    "TA1 - rtems_message_queue_send - NULL buffer - RTEMS_INVALID_ADDRESS"
+  );
+
+  /* send bad id */
+  status = rtems_message_queue_send( 100, buffer, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_send with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_send - RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_TOO_MANY,
+    "rtems_message_queue_send too many to a limited queue"
+  );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
+
+  /* urgent NULL message*/
+  status = rtems_message_queue_urgent( Queue_id[ 1 ], NULL, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_urgent with NULL buffer"
+  );
+  puts(
+    "TA1 - rtems_message_queue_urgent - NULL buffer - RTEMS_INVALID_ADDRESS"
+  );
+
+  /* urgent bad Id */
+  status = rtems_message_queue_urgent( 100, buffer, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ID,
+    "rtems_message_queue_urgent with illegal id"
+  );
+  puts( "TA1 - rtems_message_queue_urgent - RTEMS_INVALID_ID" );
+
+  status = rtems_message_queue_broadcast(
+     Queue_id[ 1 ], NULL, MESSAGE_SIZE, &count );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_broadcast with NULL count"
+  );
+  puts(
+    "TA1 - rtems_message_queue_broadcast - NULL buffer - RTEMS_INVALID_ADDRESS"
+  );
+
+  status = rtems_message_queue_broadcast(
+     Queue_id[ 1 ], buffer, MESSAGE_SIZE + 1, &count );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_SIZE,
+    "rtems_message_queue_broadcast with too large"
+  );
+  puts(
+    "TA1 - rtems_message_queue_broadcast - too large - RTEMS_INVALID_SIZE"
+  );
+
+  status = rtems_message_queue_broadcast(
+      Queue_id[ 1 ], buffer, MESSAGE_SIZE, NULL );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_ADDRESS,
+    "rtems_message_queue_broadcast with NULL count"
+  );
+  puts(
+    "TA1 - rtems_message_queue_broadcast - NULL count - RTEMS_INVALID_ADDRESS"
+  );
+
+  puts( "*** END TEST MESSAGE QUEUE ERROR 01 ***" );
+}
diff --git a/testsuites/sptests/spmsgq_err01/spmsgq_err01.doc b/testsuites/sptests/spmsgq_err01/spmsgq_err01.doc
new file mode 100644
index 0000000..16948ca
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err01/spmsgq_err01.doc
@@ -0,0 +1,25 @@
+#  COPYRIGHT (c) 1989-2014.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spmsgq_err01
+
+directives:
+ q_broadcast, q_create, q_delete, q_ident, q_numpending, q_flush, q_receive, q_send, q_urgent,
+
+concepts:
+
+  a.  Verifies all error codes returned by the executive in single
+      processor configurations.
+
+  b.  Verifies error conditions in the following kernel routines or macros:
+        _Ck_date_time, _Expired, _Q_submit, _Get_mnodes, _Get_node,
+        _Free_mem, _Get_mem, _Valid_block, _Set_tcb, _Set_resource,
+        _In_range, _On_boundary
diff --git a/testsuites/sptests/spmsgq_err01/spmsgq_err01.scn b/testsuites/sptests/spmsgq_err01/spmsgq_err01.scn
new file mode 100644
index 0000000..7bd31fc
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err01/spmsgq_err01.scn
@@ -0,0 +1,35 @@
+*** TEST MESSAGE QUEUE ERROR 01 ***
+TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_create - NULL Id - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_create - count = 0 - RTEMS_INVALID_NUMBER
+TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE
+TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME
+TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED
+TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED
+TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2
+TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY
+TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID
+TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID
+TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME
+TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_flush - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL buffer
+TA1 - rtems_message_queue_receive - Q 1 - RTEMS_INVALID_ADDRESS NULL size
+TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED
+TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds
+TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT
+TA1 - rtems_message_queue_send - NULL buffer - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_send - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
+TA1 - rtems_message_queue_urgent - NULL buffer - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_urgent - RTEMS_INVALID_ID
+TA1 - rtems_message_queue_broadcast - NULL buffer - RTEMS_INVALID_ADDRESS
+TA1 - rtems_message_queue_broadcast - too large - RTEMS_INVALID_SIZE
+TA1 - rtems_message_queue_broadcast - NULL count - RTEMS_INVALID_ADDRESS
+*** END TEST MESSAGE QUEUE ERROR 01 ***
diff --git a/testsuites/sptests/spmsgq_err01/system.h b/testsuites/sptests/spmsgq_err01/system.h
new file mode 100644
index 0000000..76426b2
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err01/system.h
@@ -0,0 +1,64 @@
+/*
+ *  This include file contains information that is included in every
+ *  function in the test set.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#include <tmacros.h>
+
+/* functions */
+
+rtems_task Init(
+  rtems_task_argument argument
+);
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS              10
+#define CONFIGURE_MAXIMUM_TIMERS              1
+#define CONFIGURE_MAXIMUM_SEMAPHORES          2
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      1
+#define CONFIGURE_MAXIMUM_PERIODS             1
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
+#define CONFIGURE_TICKS_PER_TIMESLICE       100
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_EXTRA_TASK_STACKS         (20 * RTEMS_MINIMUM_STACK_SIZE)
+
+#include <rtems/confdefs.h>
+
+/* global variables */
+
+TEST_EXTERN rtems_id   Task_id[ 11 ];       /* array of task ids */
+TEST_EXTERN rtems_name Task_name[ 11 ];     /* array of task names */
+
+TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */
+TEST_EXTERN rtems_id   Semaphore_id[ 4 ];   /* array of semaphore ids */
+
+TEST_EXTERN rtems_name Queue_name[ 3 ];     /* array of queue names */
+TEST_EXTERN rtems_id   Queue_id[ 3 ];       /* array of queue ids */
+
+TEST_EXTERN rtems_name Port_name[ 2 ];      /* array of port names */
+TEST_EXTERN rtems_id   Port_id[ 2 ];        /* array of port ids */
+
+TEST_EXTERN rtems_name Period_name[ 2 ];    /* array of period names */
+TEST_EXTERN rtems_id   Period_id[ 2 ];      /* array of period ids */
+
+TEST_EXTERN rtems_id   Junk_id;             /* id used to return errors */
+
+#define Internal_port_area (void *) 0x00001000
+#define External_port_area (void *) 0x00002000
+
+/* end of include file */
diff --git a/testsuites/sptests/spmsgq_err02/Makefile.am b/testsuites/sptests/spmsgq_err02/Makefile.am
new file mode 100644
index 0000000..f7ad4c5
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/Makefile.am
@@ -0,0 +1,22 @@
+
+rtems_tests_PROGRAMS = spmsgq_err02
+spmsgq_err02_SOURCES = init.c task3.c system.h
+
+dist_rtems_tests_DATA = spmsgq_err02.scn
+dist_rtems_tests_DATA += spmsgq_err02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spmsgq_err02_OBJECTS)
+LINK_LIBS = $(spmsgq_err02_LDLIBS)
+
+spmsgq_err02$(EXEEXT): $(spmsgq_err02_OBJECTS) $(spmsgq_err02_DEPENDENCIES)
+	@rm -f spmsgq_err02$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spmsgq_err02/init.c b/testsuites/sptests/spmsgq_err02/init.c
new file mode 100644
index 0000000..344b732
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/init.c
@@ -0,0 +1,155 @@
+/*
+ *  COPYRIGHT (c) 2014.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define CONFIGURE_INIT
+#include "system.h"
+
+#define MESSAGE_SIZE (sizeof(long) * 4)
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  long              buffer[ 4 ];
+  size_t            size;
+  rtems_status_code status;
+  
+  puts( "\n\n*** TEST MESSAGE QUEUE ERROR 02 ***" );
+  Queue_name[ 1 ]      =  rtems_build_name( 'M', 'Q', '1', ' ' );
+  Task_name[ 3 ]       =  rtems_build_name( 'T', 'A', '3', ' ' );
+ 
+  status = rtems_task_create(
+    Task_name[ 3 ],
+    1,
+    RTEMS_MINIMUM_STACK_SIZE,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Task_id[ 3 ]
+  );
+  directive_failed( status, "rtems_task_create of TA3" );
+  puts( "TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL" );
+  
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    2,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  directive_failed( status, "rtems_message_queue_create successful" );
+  puts( "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL" );
+   
+    status = rtems_message_queue_delete( Queue_id[ 1 ] );
+  directive_failed( status, "rtems_message_queue_delete successful" );
+  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    2,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  directive_failed( status, "rtems_message_queue_create successful" );
+  puts(
+    "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL"
+  );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send successful" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send successful" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_TOO_MANY,
+    "rtems_message_queue_send too many to limited queue"
+  );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
+
+  status = rtems_message_queue_delete( Queue_id[ 1 ] );
+  directive_failed( status, "rtems_message_queue_delete successful" );
+  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    3,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  directive_failed( status, "rtems_message_queue_create successful" );
+  puts(
+    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
+  );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send successful" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send successful" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  directive_failed( status, "rtems_message_queue_send successful" );
+  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
+  fatal_directive_status(
+    status,
+    RTEMS_TOO_MANY,
+    "rtems_message_queue_send too many to limited queue"
+  );
+  puts(
+    "TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY"
+  );
+
+  status = rtems_message_queue_delete( Queue_id[ 1 ] );
+  directive_failed( status, "rtems_message_queue_delete successful" );
+  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
+
+  status = rtems_message_queue_create(
+    Queue_name[ 1 ],
+    3,
+    MESSAGE_SIZE,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Queue_id[ 1 ]
+  );
+  directive_failed( status, "rtems_message_queue_create successful" );
+  puts(
+    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
+  );
+
+  puts( "TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL" );
+  status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
+  directive_failed( status, "rtems_task_start of TA3" );
+
+  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
+  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  directive_failed( status, "rtems_task_wake_after (yield)" );
+
+  puts( "TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL" );
+  status = rtems_message_queue_delete( Queue_id[ 1 ] );
+  directive_failed( status, "rtems_message_queue_delete successful" );
+
+  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
+  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+  directive_failed( status, "rtems_task_wake_after (yield)" );
+
+  puts( "*** END TEST MESSAGE QUEUE ERROR 02 ***" );
+}
diff --git a/testsuites/sptests/spmsgq_err02/spmsgq_err02.doc b/testsuites/sptests/spmsgq_err02/spmsgq_err02.doc
new file mode 100644
index 0000000..0ee943e
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/spmsgq_err02.doc
@@ -0,0 +1,26 @@
+#  COPYRIGHT (c) 1989-2014.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spmsgq_err02
+
+directives:
+  t_create, t_start, t_wkafter q_create, q_delete,
+  q_send, 
+
+concepts:
+
+  a.  Verifies all error codes returned by the executive in single
+      processor configurations.
+
+  b.  Verifies error conditions in the following kernel routines or macros:
+        _Ck_date_time, _Expired, _Q_submit, _Get_mnodes, _Get_node,
+        _Free_mem, _Get_mem, _Valid_block, _Set_tcb, _Set_resource,
+        _In_range, _On_boundary
diff --git a/testsuites/sptests/spmsgq_err02/spmsgq_err02.scn b/testsuites/sptests/spmsgq_err02/spmsgq_err02.scn
new file mode 100644
index 0000000..4ef2180
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/spmsgq_err02.scn
@@ -0,0 +1,24 @@
+*** TEST MESSAGE QUEUE ERROR 02 ***
+TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
+TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY
+TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
+TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL
+TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
+TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER
+TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
+TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED
+TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
+*** END TEST MESSAGE QUEUE ERROR 02 ***
diff --git a/testsuites/sptests/spmsgq_err02/system.h b/testsuites/sptests/spmsgq_err02/system.h
new file mode 100644
index 0000000..08523da
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/system.h
@@ -0,0 +1,68 @@
+/*
+ *  This include file contains information that is included in every
+ *  function in the test set.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#include <tmacros.h>
+
+/* functions */
+
+rtems_task Init(
+  rtems_task_argument argument
+);
+
+rtems_task Task_3(
+  rtems_task_argument argument
+);
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS              10
+#define CONFIGURE_MAXIMUM_TIMERS              1
+#define CONFIGURE_MAXIMUM_SEMAPHORES          2
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      1
+#define CONFIGURE_MAXIMUM_PERIODS             1
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
+#define CONFIGURE_TICKS_PER_TIMESLICE       100
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_EXTRA_TASK_STACKS         (20 * RTEMS_MINIMUM_STACK_SIZE)
+
+#include <rtems/confdefs.h>
+
+/* global variables */
+
+TEST_EXTERN rtems_id   Task_id[ 11 ];       /* array of task ids */
+TEST_EXTERN rtems_name Task_name[ 11 ];     /* array of task names */
+
+TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */
+TEST_EXTERN rtems_id   Semaphore_id[ 4 ];   /* array of semaphore ids */
+
+TEST_EXTERN rtems_name Queue_name[ 3 ];     /* array of queue names */
+TEST_EXTERN rtems_id   Queue_id[ 3 ];       /* array of queue ids */
+
+TEST_EXTERN rtems_name Port_name[ 2 ];      /* array of port names */
+TEST_EXTERN rtems_id   Port_id[ 2 ];        /* array of port ids */
+
+TEST_EXTERN rtems_name Period_name[ 2 ];    /* array of period names */
+TEST_EXTERN rtems_id   Period_id[ 2 ];      /* array of period ids */
+
+TEST_EXTERN rtems_id   Junk_id;             /* id used to return errors */
+
+#define Internal_port_area (void *) 0x00001000
+#define External_port_area (void *) 0x00002000
+
+/* end of include file */
diff --git a/testsuites/sptests/spmsgq_err02/task3.c b/testsuites/sptests/spmsgq_err02/task3.c
new file mode 100644
index 0000000..1298b09
--- /dev/null
+++ b/testsuites/sptests/spmsgq_err02/task3.c
@@ -0,0 +1,54 @@
+/*  Task_3
+ *
+ *  This routine serves as a test task.  Its only purpose in life is to
+ *  generate the error where a message queue is deleted while a task
+ *  is waiting there for a message.
+ *
+ *  Input parameters:
+ *    argument - task argument
+ *
+ *  Output parameters:  NONE
+ *
+ *  COPYRIGHT (c) 1989-2007.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_task Task_3(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code status;
+  long              buffer[ 4 ];
+  size_t            size;
+
+  puts( "TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER" );
+  status = rtems_message_queue_receive(
+    Queue_id[ 1 ],
+    (long (*)[4])buffer,
+    &size,
+    RTEMS_DEFAULT_OPTIONS,
+    RTEMS_NO_TIMEOUT
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_OBJECT_WAS_DELETED,
+    "rtems_message_queue_receive waiting to be deleted"
+  );
+  puts(
+    "TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED"
+  );
+
+  puts( "TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
+  status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "rtems_task_delete of TA3" );
+}
-- 
1.8.1.4




More information about the devel mailing list