[rtems commit] spregion_err01: New test refactored from sp09

Joel Sherrill joel at rtems.org
Mon Dec 30 15:47:33 UTC 2013


Module:    rtems
Branch:    master
Commit:    dfcb3ace791d6133f0518d3dba738e57b1d02ce7
Changeset: http://git.rtems.org/rtems/commit/?id=dfcb3ace791d6133f0518d3dba738e57b1d02ce7

Author:    Mandar Juvekar <mjuvekar0 at gmail.com>
Date:      Mon Dec 30 09:44:13 2013 +0530

spregion_err01: New test refactored from sp09

---

 testsuites/sptests/Makefile.am                     |    3 +-
 testsuites/sptests/configure.ac                    |    1 +
 testsuites/sptests/sp09/Makefile.am                |    2 +-
 testsuites/sptests/sp09/system.h                   |    2 +-
 testsuites/sptests/sp09/task1.c                    |    3 -
 testsuites/sptests/spregion_err01/Makefile.am      |   24 ++
 testsuites/sptests/spregion_err01/delay.c          |   29 ++
 testsuites/sptests/spregion_err01/init.c           |  108 ++++++++
 testsuites/sptests/spregion_err01/isr.c            |   28 ++
 .../sptests/{sp09 => spregion_err01}/screen12.c    |    0
 testsuites/sptests/spregion_err01/sp09.doc         |   30 ++
 testsuites/sptests/spregion_err01/sp09.scn         |  282 ++++++++++++++++++++
 testsuites/sptests/spregion_err01/system.h         |  132 +++++++++
 testsuites/sptests/spregion_err01/task1.c          |   34 +++
 testsuites/sptests/spregion_err01/task2.c          |   49 ++++
 testsuites/sptests/spregion_err01/task3.c          |   54 ++++
 testsuites/sptests/spregion_err01/task4.c          |   51 ++++
 17 files changed, 826 insertions(+), 6 deletions(-)

diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 18566d2..2b31c29 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -28,7 +28,8 @@ SUBDIRS = \
     spintrcritical17 spintrcritical18 spmkdir spmountmgr01 spheapprot \
     sppagesize spsem01 spsem02 spsimplesched01 spsimplesched02 \
     spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \
-    spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01
+    spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
+    spregion_err01
 SUBDIRS += spintrcritical20
 SUBDIRS += spintrcritical19
 SUBDIRS += spcontext01
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index e17dc10..68ba090 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -205,5 +205,6 @@ spwkspace/Makefile
 sptimer_err01/Makefile
 sptimer_err02/Makefile
 spcpuset01/Makefile
+spregion_err01/Makefile
 ])
 AC_OUTPUT
diff --git a/testsuites/sptests/sp09/Makefile.am b/testsuites/sptests/sp09/Makefile.am
index 05e71e6..3436845 100644
--- a/testsuites/sptests/sp09/Makefile.am
+++ b/testsuites/sptests/sp09/Makefile.am
@@ -2,7 +2,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 screen09.c screen10.c \
-    screen11.c screen12.c task1.c task2.c task3.c task4.c \
+    screen11.c task1.c task2.c task3.c task4.c \
     system.h
 
 dist_rtems_tests_DATA = sp09.scn
diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h
index 5f880cc..aed0ca9 100644
--- a/testsuites/sptests/sp09/system.h
+++ b/testsuites/sptests/sp09/system.h
@@ -70,7 +70,7 @@ void Screen10( void );
 
 void Screen11( void );
 
-void Screen12( void );
+//void Screen12( void );
 
 /* configuration information */
 
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
index 1086fc5..f8ca3d0 100644
--- a/testsuites/sptests/sp09/task1.c
+++ b/testsuites/sptests/sp09/task1.c
@@ -56,9 +56,6 @@ rtems_task Task_1(
   rtems_test_pause_and_screen_number( 11 );
 
   Screen11();
-  rtems_test_pause_and_screen_number( 12 );
-
-  Screen12();
 
   puts( "*** END OF TEST 9 ***" );
   rtems_test_exit( 0 );
diff --git a/testsuites/sptests/spregion_err01/Makefile.am b/testsuites/sptests/spregion_err01/Makefile.am
new file mode 100644
index 0000000..6585667
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/Makefile.am
@@ -0,0 +1,24 @@
+
+rtems_tests_PROGRAMS = sp09
+sp09_SOURCES = init.c delay.c isr.c screen12.c \
+    task1.c task2.c task3.c task4.c \
+    system.h
+
+dist_rtems_tests_DATA = sp09.scn
+dist_rtems_tests_DATA += sp09.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 = $(sp09_OBJECTS)
+LINK_LIBS = $(sp09_LDLIBS)
+
+sp09$(EXEEXT): $(sp09_OBJECTS) $(sp09_DEPENDENCIES)
+	@rm -f sp09$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spregion_err01/delay.c b/testsuites/sptests/spregion_err01/delay.c
new file mode 100644
index 0000000..2469941
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/delay.c
@@ -0,0 +1,29 @@
+/*  Delayed_routine
+ *
+ *  This routine is used as the timer routine for Timer Manager tests.
+ *
+ *  Input parameters:
+ *    ignored - this parameter is ignored
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_timer_service_routine Delayed_routine(
+  rtems_id  ignored_id,
+  void     *ignored_address
+)
+{
+}
diff --git a/testsuites/sptests/spregion_err01/init.c b/testsuites/sptests/spregion_err01/init.c
new file mode 100644
index 0000000..6adcac5
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/init.c
@@ -0,0 +1,108 @@
+/*
+ *  COPYRIGHT (c) 1989-2009.
+ *  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"
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code status;
+
+  puts( "\n\n*** TEST 9 ***" );
+
+  Task_name[ 1 ]       =  rtems_build_name( 'T', 'A', '1', ' ' );
+  Task_name[ 2 ]       =  rtems_build_name( 'T', 'A', '2', ' ' );
+  Task_name[ 3 ]       =  rtems_build_name( 'T', 'A', '3', ' ' );
+  Task_name[ 4 ]       =  rtems_build_name( 'T', 'A', '4', ' ' );
+  Task_name[ 5 ]       =  rtems_build_name( 'T', 'A', '5', ' ' );
+  Task_name[ 6 ]       =  rtems_build_name( 'T', 'A', '6', ' ' );
+  Task_name[ 7 ]       =  rtems_build_name( 'T', 'A', '7', ' ' );
+  Task_name[ 8 ]       =  rtems_build_name( 'T', 'A', '8', ' ' );
+  Task_name[ 9 ]       =  rtems_build_name( 'T', 'A', '9', ' ' );
+  Task_name[ 10 ]      =  rtems_build_name( 'T', 'A', 'A', ' ' );
+
+  Semaphore_name[ 1 ]  =  rtems_build_name( 'S', 'M', '1', ' ' );
+  Semaphore_name[ 2 ]  =  rtems_build_name( 'S', 'M', '2', ' ' );
+  Semaphore_name[ 3 ]  =  rtems_build_name( 'S', 'M', '3', ' ' );
+
+  Queue_name[ 1 ]      =  rtems_build_name( 'M', 'Q', '1', ' ' );
+  Queue_name[ 2 ]      =  rtems_build_name( 'M', 'Q', '2', ' ' );
+
+  Partition_name[ 1 ]  =  rtems_build_name( 'P', 'T', '1', ' ' );
+
+  Region_name[ 1 ]     =  rtems_build_name( 'R', 'N', '1', ' ' );
+
+  Port_name[ 1 ]       =  rtems_build_name( 'D', 'P', '1', ' ' );
+
+  Period_name[ 1 ]     =  rtems_build_name( 'T', 'M', '1', ' ' );
+
+  /* priority of 0 error */
+  status = rtems_task_create(
+     Task_name[1],
+     0,
+     RTEMS_MINIMUM_STACK_SIZE,
+     RTEMS_DEFAULT_MODES,
+     RTEMS_DEFAULT_ATTRIBUTES,
+     &Task_id[ 1 ]
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_PRIORITY,
+    "rtems_task_create with illegal priority"
+  );
+  puts( "INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY" );
+
+  /* priority > 255 error */
+  status = rtems_task_create(
+     Task_name[1],
+     257,
+     RTEMS_MINIMUM_STACK_SIZE,
+     RTEMS_DEFAULT_MODES,
+     RTEMS_DEFAULT_ATTRIBUTES,
+     &Task_id[ 1 ]
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_INVALID_PRIORITY,
+    "rtems_task_create with illegal priority"
+  );
+  puts(
+    "INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY"
+  );
+
+  status = rtems_task_create(
+    Task_name[ 1 ],
+    4,
+    RTEMS_MINIMUM_STACK_SIZE * 3,
+    RTEMS_DEFAULT_MODES,
+    RTEMS_DEFAULT_ATTRIBUTES,
+    &Task_id[ 1 ]
+  );
+  directive_failed( status, "rtems_task_create of TA1" );
+
+  status = rtems_task_restart( Task_id[ 1 ], 0 );
+  fatal_directive_status(
+    status,
+    RTEMS_INCORRECT_STATE,
+    "rtems_task_restart of DORMANT task"
+  );
+  puts( "INIT - rtems_task_restart - RTEMS_INCORRECT_STATE" );
+
+  status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
+  directive_failed( status, "rtems_task_start of TA1" );
+
+  status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
+}
diff --git a/testsuites/sptests/spregion_err01/isr.c b/testsuites/sptests/spregion_err01/isr.c
new file mode 100644
index 0000000..31c7ab4
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/isr.c
@@ -0,0 +1,28 @@
+/*  Service_routine
+ *
+ *  This routine is used as the timer routine for Interrupt Manager tests.
+ *
+ *  Input parameters:
+ *    ignored - this parameter is ignored
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_isr Service_routine(
+  rtems_vector_number ignored
+)
+{
+}
diff --git a/testsuites/sptests/sp09/screen12.c b/testsuites/sptests/spregion_err01/screen12.c
similarity index 100%
rename from testsuites/sptests/sp09/screen12.c
rename to testsuites/sptests/spregion_err01/screen12.c
diff --git a/testsuites/sptests/spregion_err01/sp09.doc b/testsuites/sptests/spregion_err01/sp09.doc
new file mode 100644
index 0000000..7b6903e
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/sp09.doc
@@ -0,0 +1,30 @@
+#  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.com/license/LICENSE.
+#
+
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  test9
+
+directives:
+  ex_init, ex_start, tm_tick, i_return, t_resume, t_setpri, t_setreg, t_start,
+  t_suspend, tm_wkafter, tm_wkwhen, ev_receive, ev_send, sm_create, sm_delete,
+  sm_ident, sm_p, sm_v, q_broadcast, q_create, q_delete, q_ident, q_receive,
+  q_send, q_urgent, as_catch, as_send, as_return, rn_create, rn_delete,
+  rn_getseg, rn_ident, rn_retseg, pt_create, pt_delete, pt_getbug, pt_ident,
+  pt_retbuf, de_close, de_cntrl, de_init, de_open, de_read, de_write
+
+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/spregion_err01/sp09.scn b/testsuites/sptests/spregion_err01/sp09.scn
new file mode 100644
index 0000000..c489357
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/sp09.scn
@@ -0,0 +1,282 @@
+*** TEST 9 ***
+INIT - rtems_task_create - priority of 0 - RTEMS_INVALID_PRIORITY
+INIT - rtems_task_create - priority too high - RTEMS_INVALID_PRIORITY
+INIT - rtems_task_restart - RTEMS_INCORRECT_STATE
+TA1 - rtems_task_is_suspended - RTEMS_INVALID_ID
+TA1 - rtems_task_delete - RTEMS_INVALID_ID
+TA1 - rtems_task_get_note - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER
+TA1 - rtems_task_get_note - RTEMS_INVALID_ID
+TA1 - rtems_task_get_note - RTEMS_INVALID_ID
+TA1 - rtems_task_ident - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
+TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
+TA1 - rtems_task_ident - local RTEMS_INVALID_NAME
+TA1 - rtems_task_ident - RTEMS_INVALID_NODE
+TA1 - rtems_task_restart - RTEMS_INVALID_ID
+TA1 - rtems_task_resume - RTEMS_INVALID_ID
+TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE
+TA1 - rtems_task_set_priority - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY
+TA1 - rtems_task_set_priority - RTEMS_INVALID_ID
+TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER
+TA1 - rtems_task_set_note - RTEMS_INVALID_ID
+TA1 - rtems_task_start - RTEMS_INVALID_ID
+TA1 - rtems_task_start - RTEMS_INCORRECT_STATE
+TA1 - rtems_task_suspend - RTEMS_INVALID_ID
+TA1 - rtems_task_mode - RTEMS_INVALID_ADDRESS
+<pause - screen 2>
+TA1 - rtems_clock_get_tod - RTEMS_INVALID_ADDRESS
+TA1 - rtems_clock_get_tod - RTEMS_NOT_DEFINED
+TA1 - rtems_clock_get_seconds_since_epoch - RTEMS_INVALID_ADDRESS
+TA1 - rtems_clock_get_seconds_since_epoch - RTEMS_NOT_DEFINED
+TA1 - rtems_clock_get_uptime - RTEMS_INVALID_ADDRESS
+TA1 - rtems_clock_get_uptime_timeval
+TA1 - rtems_clock_get_uptime_seconds
+TA1 - rtems_clock_get_uptime_nanoseconds
+TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS
+TA1 - rtems_clock_get_tod_timeval - RTEMS_NOT_DEFINED
+TA1 - rtems_clock_set_nanoseconds_extension - RTEMS_INVALID_ADDRESS
+TA1 - rtems_clock_set - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_wake_when - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED
+TA1 - rtems_timer_fire_when - RTEMS_NOT_DEFINED
+TA1 - rtems_clock_set - 08:30:45   02/05/1987 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:30:45   15/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:30:45   02/32/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 25:30:45   02/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:61:45   02/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:30:61   02/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:30:45   02/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - rtems_clock_set - 08:30:45   02/05/1988 - RTEMS_SUCCESSFUL
+TA1 - rtems_task_wake_when - TICKINVALID - sleep about 3 seconds
+TA1 - rtems_task_wake_when - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_wake_when - TICKINVALID - woke up RTEMS_SUCCESSFUL
+TA1 - rtems_task_wake_when - 08:30:48   02/05/1961 - RTEMS_INVALID_CLOCK
+TA1 - rtems_task_wake_when - 25:30:48   02/05/1988 - RTEMS_INVALID_CLOCK
+TA1 - current time - 08:30:51   02/05/1988
+TA1 - rtems_task_wake_when - 08:30:51   01/05/1988 - RTEMS_INVALID_CLOCK
+<pause - screen 3>
+TA1 - rtems_task_create - RTEMS_INVALID_NAME
+TA1 - rtems_task_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED
+TA1 - rtems_task_create - TA2 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_suspend - suspend TA2 - RTEMS_SUCCESSFUL
+TA1 - rtems_task_suspend - suspend TA2 - RTEMS_ALREADY_SUSPENDED
+TA1 - rtems_task_resume - TA2 resumed - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 5 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 6 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 7 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 8 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 9 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 10 created - RTEMS_SUCCESSFUL
+TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY
+TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED
+<pause - screen 4>
+TA1 - rtems_event_receive - NULL param - RTEMS_INVALID_ADDRESS
+TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )
+TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )
+TA1 - rtems_event_receive - timeout in 3 seconds
+TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT
+TA1 - rtems_event_send - RTEMS_INVALID_ID
+TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_set - 08:30:45   02/05/1988 - RTEMS_SUCCESSFUL
+TA1 - current time - Fri Feb  5 08:30:45 1988
+
+<pause - screen 5>
+TA1 - rtems_semaphore_create - RTEMS_INVALID_NAME
+TA1 - rtems_semaphore_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_semaphore_create - 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_semaphore_create - 2 - RTEMS_SUCCESSFUL
+TA1 - rtems_semaphore_create - 3 - RTEMS_TOO_MANY
+TA1 - rtems_semaphore_create - FIFO and inherit - RTEMS_NOT_DEFINED
+TA1 - rtems_semaphore_create - FIFO and ceiling - RTEMS_NOT_DEFINED
+TA1 - rtems_semaphore_create - ceiling and inherit - RTEMS_NOT_DEFINED
+TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED
+TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER
+TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED
+TA1 - rtems_semaphore_delete - RTEMS_INVALID_ID
+TA1 - rtems_semaphore_delete - local RTEMS_INVALID_ID
+TA1 - rtems_semaphore_ident - global RTEMS_INVALID_NAME
+TA1 - rtems_semaphore_ident - local RTEMS_INVALID_NAME
+TA1 - rtems_semaphore_release - RTEMS_INVALID_ID
+TA1 - rtems_semaphore_flush - RTEMS_INVALID_ID
+<pause - screen 6>
+TA1 - rtems_semaphore_obtain - RTEMS_INVALID_ID
+TA1 - rtems_semaphore_obtain - got sem 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_semaphore_obtain - RTEMS_UNSATISFIED
+TA1 - rtems_semaphore_obtain - timeout in 3 seconds
+TA1 - rtems_semaphore_obtain - woke up with RTEMS_TIMEOUT
+TA1 - rtems_semaphore_release - RTEMS_NOT_OWNER_OF_RESOURCE
+TA1 - rtems_semaphore_release - RTEMS_INVALID_ID
+TA1 - rtems_task_start - start TA2 - RTEMS_SUCCESSFUL
+TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
+TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER
+TA1 - rtems_semaphore_delete - delete sem 1 - RTEMS_SUCCESSFUL
+TA1 - rtems_semaphore_obtain - binary semaphore
+TA1 - rtems_semaphore_delete - delete sem 2 - RTEMS_RESOURCE_IN_USE
+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
+<pause - screen 9>
+TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER
+TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS
+TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS
+TA1 - rtems_signal_send - RTEMS_INVALID_ID
+TA1 - rtems_signal_send - RTEMS_INVALID_NUMBER
+TA1 - rtems_signal_send - RTEMS_NOT_DEFINED
+TA1 - rtems_port_create - RTEMS_INVALID_NAME
+TA1 - rtems_port_create - bad range - RTEMS_INVALID_ADDRESS
+TA1 - rtems_port_create - null id - RTEMS_INVALID_ADDRESS
+TA1 - rtems_port_create - RTEMS_TOO_MANY
+TA1 - rtems_port_delete - RTEMS_INVALID_ID
+TA1 - rtems_port_ident - RTEMS_INVALID_NAME
+TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ADDRESS
+TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID
+TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ADDRESS
+<pause - screen 10>
+TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_NAME
+TA1 - rtems_rate_monotonic_create - RTEMS_SUCCESSFUL
+TA1 - rtems_rate_monotonic_create - RTEMS_TOO_MANY
+TA1 - rtems_rate_monotonic_ident - RTEMS_INVALID_NAME
+TA1 - rtems_rate_monotonic_period - RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_period - local RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_NOT_DEFINED
+TA1 - rtems_rate_monotonic_period - 100 ticks - RTEMS_SUCCESSFUL
+TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_SUCCESSFUL
+TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_TIMEOUT
+TA1 - rtems_rate_monotonic_get_statistics - RTEMS_INVALID_ADDRESS
+TA1 - rtems_rate_monotonic_get_status - RTEMS_INVALID_ADDRESS
+TA1 - rtems_rate_monotonic_get_status - RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_cancel - RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_cancel - local RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_cancel - RTEMS_SUCCESSFUL
+TA1 - rtems_rate_monotonic_period - 5 ticks - RTEMS_TIMEOUT
+TA1 - yielding to TA4
+TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE
+TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE
+TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
+TA1 - rtems_rate_monotonic_delete - RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_delete - local RTEMS_INVALID_ID
+TA1 - rtems_rate_monotonic_delete - RTEMS_SUCCESSFUL
+<pause - screen 11>
+TA1 - rtems_partition_create - RTEMS_INVALID_NAME
+TA1 - rtems_partition_create - length - RTEMS_INVALID_SIZE
+TA1 - rtems_partition_create - buffer size - RTEMS_INVALID_SIZE
+TA1 - rtems_partition_create - length < buffer size - RTEMS_INVALID_SIZE
+TA1 - rtems_partition_create - buffer size < overhead - RTEMS_INVALID_SIZE
+TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED
+TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_partition_create - RTEMS_INVALID_SIZE
+TA1 - rtems_partition_delete - unknown RTEMS_INVALID_ID
+TA1 - rtems_partition_delete - local RTEMS_INVALID_ID
+TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ADDRESS
+TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ID
+TA1 - rtems_partition_ident - RTEMS_INVALID_NAME
+TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ID
+TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_partition_create - RTEMS_SUCCESSFUL
+TA1 - rtems_partition_create - RTEMS_TOO_MANY
+TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
+TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
+TA1 - rtems_partition_get_buffer - RTEMS_UNSATISFIED
+TA1 - rtems_partition_delete - RTEMS_RESOURCE_IN_USE
+TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - out of range
+TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - not on boundary
+<pause - screen 12>
+TA1 - rtems_region_create - RTEMS_INVALID_NAME
+TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_create - RTEMS_INVALID_SIZE
+TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_create - RTEMS_SUCCESSFUL
+TA1 - rtems_region_extend - NULL address - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_extend - address within - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_create - RTEMS_TOO_MANY
+TA1 - rtems_region_delete - unknown RTEMS_INVALID_ID
+TA1 - rtems_region_delete - local RTEMS_INVALID_ID
+TA1 - rtems_region_ident - RTEMS_INVALID_NAME
+TA1 - rtems_region_get_information - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_get_information - unknown RTEMS_INVALID_ID
+TA1 - rtems_region_get_free_information - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_get_free_information - unknown RTEMS_INVALID_ID
+TA1 - rtems_region_get_segment - RTEMS_INVALID_ID
+TA1 - rtems_region_get_segment - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_get_segment - 0 size - RTEMS_INVALID_SIZE
+TA1 - rtems_region_get_segment - too big - RTEMS_INVALID_SIZE
+TA1 - rtems_region_get_segment - RTEMS_SUCCESSFUL
+TA1 - rtems_region_get_segment - RTEMS_UNSATISFIED
+TA1 - rtems_region_get_segment - timeout in 3 seconds
+TA1 - rtems_region_get_segment - woke up with RTEMS_TIMEOUT
+TA1 - rtems_region_get_segment_size - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_get_segment_size - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_get_segment_size - unknown RTEMS_INVALID_ID
+TA1 - rtems_region_delete - RTEMS_RESOURCE_IN_USE
+TA1 - rtems_region_resize_segment - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_resize_segment - RTEMS_INVALID_ADDRESS
+TA1 - rtems_region_resize_segment - RTEMS_INVALID_ID
+TA1 - rtems_region_return_segment - RTEMS_INVALID_ID
+TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS
+TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION
+TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION
+TA1 - rtems_region_extend - RTEMS_INVALID_ID
+TA1 - rtems_region_extend - within heap - RTEMS_INVALID_ADDRESS
+*** END OF TEST 9 ***
diff --git a/testsuites/sptests/spregion_err01/system.h b/testsuites/sptests/spregion_err01/system.h
new file mode 100644
index 0000000..2713762
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/system.h
@@ -0,0 +1,132 @@
+/*  system.h
+ *
+ *  This include file contains information that is included in every
+ *  function in the test set.
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#include <tmacros.h>
+
+/* functions */
+
+rtems_task Init(
+  rtems_task_argument argument
+);
+
+rtems_timer_service_routine Delayed_routine(
+  rtems_id  ignored_id,
+  void     *ignored_address
+);
+
+rtems_task Task_1(
+  rtems_task_argument argument
+);
+
+rtems_task Task_2(
+  rtems_task_argument argument
+);
+
+rtems_task Task_3(
+  rtems_task_argument argument
+);
+
+rtems_task Task_4(
+  rtems_task_argument argument
+);
+
+rtems_isr Service_routine(
+  rtems_vector_number ignored
+);
+
+rtems_timer_service_routine Io_during_interrupt(
+  rtems_id ignored
+);
+
+/*void Screen1( void );
+
+void Screen2( void );
+
+void Screen3( void );
+
+void Screen4( void );
+
+void Screen5( void );
+
+void Screen6( void );
+
+void Screen7( void );
+
+void Screen8( void );
+
+void Screen9( void );
+
+void Screen10( void );
+
+void Screen11( void );*/
+
+void Screen12( void );
+
+/* 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_PARTITIONS          1
+#define CONFIGURE_MAXIMUM_REGIONS             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 Partition_name[ 2 ]; /* array of partition names */
+TEST_EXTERN rtems_id   Partition_id[ 2 ];   /* array of partition ids */
+
+TEST_EXTERN rtems_name Region_name[ 2 ];    /* array of region names */
+TEST_EXTERN rtems_id   Region_id[ 2 ];      /* array of region 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
+
+TEST_EXTERN uint8_t   Partition_good_area[256] CPU_STRUCTURE_ALIGNMENT;
+#define Partition_bad_area (void *) 0x00000005
+
+TEST_EXTERN uint32_t   Region_good_area[4096] CPU_STRUCTURE_ALIGNMENT;
+#define Region_bad_area    (void *) 0x00000005
+#define REGION_START_OFFSET 1024
+#define REGION_LENGTH       512
+
+/* end of include file */
diff --git a/testsuites/sptests/spregion_err01/task1.c b/testsuites/sptests/spregion_err01/task1.c
new file mode 100644
index 0000000..0a1f9f4
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/task1.c
@@ -0,0 +1,34 @@
+/*  Task_1
+ *
+ *  This task generates all possible errors for the RTEMS executive.
+ *
+ *  Input parameters:
+ *    argument - task argument
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_task Task_1(
+  rtems_task_argument argument
+)
+{
+  rtems_test_pause_and_screen_number( 12 );
+
+  Screen12();
+
+  puts( "*** END OF TEST 9 ***" );
+  rtems_test_exit( 0 );
+}
diff --git a/testsuites/sptests/spregion_err01/task2.c b/testsuites/sptests/spregion_err01/task2.c
new file mode 100644
index 0000000..e863081
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/task2.c
@@ -0,0 +1,49 @@
+/*  Task_2
+ *
+ *  This routine serves as a test task.  Its only purpose is to generate the
+ *  error where a semaphore is deleted while a task is waiting for it.
+ *
+ *  Input parameters:
+ *    argument - task argument
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_task Task_2(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code status;
+
+  puts( "TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER" );
+  status = rtems_semaphore_obtain(
+    Semaphore_id[ 1 ],
+    RTEMS_DEFAULT_OPTIONS,
+    RTEMS_NO_TIMEOUT
+  );
+  fatal_directive_status(
+    status,
+    RTEMS_OBJECT_WAS_DELETED,
+    "rtems_semaphore_obtain waiting to be deleted"
+  );
+  puts(
+    "TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED"
+  );
+
+  puts( "TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
+  status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "rtems_task_delete of TA2" );
+}
diff --git a/testsuites/sptests/spregion_err01/task3.c b/testsuites/sptests/spregion_err01/task3.c
new file mode 100644
index 0000000..1298b09
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/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" );
+}
diff --git a/testsuites/sptests/spregion_err01/task4.c b/testsuites/sptests/spregion_err01/task4.c
new file mode 100644
index 0000000..73a52ea
--- /dev/null
+++ b/testsuites/sptests/spregion_err01/task4.c
@@ -0,0 +1,51 @@
+/*  Task_4
+ *
+ *  This routine serves as a test task.  Its only purpose in life is to
+ *  generate the error where a rate monotonic period is accessed by a
+ *  task other than its creator.
+ *
+ *  Input parameters:
+ *    argument - task argument
+ *
+ *  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.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_task Task_4(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code status;
+
+  status = rtems_rate_monotonic_cancel( Period_id[ 1 ] );
+  fatal_directive_status(
+    status,
+    RTEMS_NOT_OWNER_OF_RESOURCE,
+    "rtems_rate_monotonic_cancel not the owner"
+  );
+  puts( "TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE" );
+
+  status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 );
+  fatal_directive_status(
+    status,
+    RTEMS_NOT_OWNER_OF_RESOURCE,
+    "rtems_rate_monotonic_period not the owner"
+  );
+  puts( "TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE" );
+
+  puts( "TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
+  status = rtems_task_delete( RTEMS_SELF );
+  directive_failed( status, "rtems_task_delete of TA4" );
+}




More information about the vc mailing list