[rtems commit] spintr_err01: New test split from sp09.

Jennifer Averett jennifer at rtems.org
Fri Mar 28 18:38:33 UTC 2014


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

Author:    Bjorn Larsson <bjornlarsson at oarcorp.com>
Date:      Tue Mar 25 09:43:09 2014 -0500

spintr_err01: New test split from sp09.

This test contains the interrupt catch error tests from sp09
screen 9.

---

 testsuites/sptests/Makefile.am                   |    2 +-
 testsuites/sptests/configure.ac                  |    1 +
 testsuites/sptests/sp09/screen09.c               |   40 -------------
 testsuites/sptests/sp09/sp09.scn                 |    3 -
 testsuites/sptests/spintr_err01/Makefile.am      |   22 +++++++
 testsuites/sptests/spintr_err01/init.c           |   67 +++++++++++++++++++++
 testsuites/sptests/spintr_err01/isr.c            |   28 +++++++++
 testsuites/sptests/spintr_err01/spintr_err01.doc |   25 ++++++++
 testsuites/sptests/spintr_err01/spintr_err01.scn |    5 ++
 testsuites/sptests/spintr_err01/system.h         |   68 ++++++++++++++++++++++
 10 files changed, 217 insertions(+), 44 deletions(-)

diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 6a4070f..160de20 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -29,7 +29,7 @@ SUBDIRS = \
     sppagesize spsem01 spsem02 spsimplesched01 spsimplesched02 \
     spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \
     spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
-    spregion_err01 sppartition_err01 spratemon_err01
+    spregion_err01 sppartition_err01 spratemon_err01 spintr_err01
 SUBDIRS += spprofiling01
 SUBDIRS += spcache01
 SUBDIRS += sptls03
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index df8009d..a22545f 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -173,6 +173,7 @@ spfifo03/Makefile
 spfifo04/Makefile
 spfifo05/Makefile
 spfreechain01/Makefile
+spintr_err01/Makefile
 spintrcritical01/Makefile
 spintrcritical02/Makefile
 spintrcritical03/Makefile
diff --git a/testsuites/sptests/sp09/screen09.c b/testsuites/sptests/sp09/screen09.c
index 407c45e..6fc0923 100644
--- a/testsuites/sptests/sp09/screen09.c
+++ b/testsuites/sptests/sp09/screen09.c
@@ -25,46 +25,6 @@ void Screen9()
   void              *converted;
   rtems_status_code status;
 
-#if ((CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE) || \
-       defined(_C3x) || defined(_C4x))
-    puts(
-      "TA1 - rtems_interrupt_catch - "
-      "bad handler RTEMS_INVALID_ADDRESS -- SKIPPED"
-    );
-    puts(
-      "TA1 - rtems_interrupt_catch - "
-      "old isr RTEMS_INVALID_ADDRESS - SKIPPED" );
-#else
-  rtems_isr_entry   old_service_routine;
-    status = rtems_interrupt_catch(
-      Service_routine,
-      ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10,
-      &old_service_routine
-    );
-    fatal_directive_status(
-      status,
-      RTEMS_INVALID_NUMBER,
-      "rtems_interrupt_catch with invalid vector"
-    );
-    puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
-
-    status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
-    fatal_directive_status(
-      status,
-      RTEMS_INVALID_ADDRESS,
-      "rtems_interrupt_catch with invalid handler"
-    );
-    puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
-
-    status = rtems_interrupt_catch( Service_routine, 3, NULL );
-    fatal_directive_status(
-      status,
-      RTEMS_INVALID_ADDRESS,
-      "rtems_interrupt_catch with invalid old isr pointer"
-    );
-    puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
-#endif
-
   /* send invalid id */
   status = rtems_signal_send( 100, RTEMS_SIGNAL_1 );
   fatal_directive_status(
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index 5539b1f..b812410 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -176,9 +176,6 @@ 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
diff --git a/testsuites/sptests/spintr_err01/Makefile.am b/testsuites/sptests/spintr_err01/Makefile.am
new file mode 100644
index 0000000..16060c3
--- /dev/null
+++ b/testsuites/sptests/spintr_err01/Makefile.am
@@ -0,0 +1,22 @@
+
+rtems_tests_PROGRAMS = spintr_err01
+spintr_err01_SOURCES = init.c isr.c system.h
+
+dist_rtems_tests_DATA = spintr_err01.scn
+dist_rtems_tests_DATA += spintr_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 = $(spintr_err01_OBJECTS)
+LINK_LIBS = $(spintr_err01_LDLIBS)
+
+spintr_err01$(EXEEXT): $(spintr_err01_OBJECTS) $(spintr_err01_DEPENDENCIES)
+	@rm -f spintr_err01$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spintr_err01/init.c b/testsuites/sptests/spintr_err01/init.c
new file mode 100644
index 0000000..c2c39ae
--- /dev/null
+++ b/testsuites/sptests/spintr_err01/init.c
@@ -0,0 +1,67 @@
+/*
+ *  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"
+
+const char rtems_test_name[] = "SP INTERRUPT ERROR 1";
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  rtems_status_code status;
+
+  TEST_BEGIN();
+  #if ((CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE) || \
+       defined(_C3x) || defined(_C4x))
+    puts(
+      "TA1 - rtems_interrupt_catch - "
+      "bad handler RTEMS_INVALID_ADDRESS -- SKIPPED"
+    );
+    puts(
+      "TA1 - rtems_interrupt_catch - "
+      "old isr RTEMS_INVALID_ADDRESS - SKIPPED" );
+#else
+  rtems_isr_entry   old_service_routine;
+    status = rtems_interrupt_catch(
+      Service_routine,
+      ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10,
+      &old_service_routine
+    );
+    fatal_directive_status(
+      status,
+      RTEMS_INVALID_NUMBER,
+      "rtems_interrupt_catch with invalid vector"
+    );
+    puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
+
+    status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
+    fatal_directive_status(
+      status,
+      RTEMS_INVALID_ADDRESS,
+      "rtems_interrupt_catch with invalid handler"
+    );
+    puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
+
+    status = rtems_interrupt_catch( Service_routine, 3, NULL );
+    fatal_directive_status(
+      status,
+      RTEMS_INVALID_ADDRESS,
+      "rtems_interrupt_catch with invalid old isr pointer"
+    );
+    puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
+#endif
+ 
+  TEST_END();
+}
diff --git a/testsuites/sptests/spintr_err01/isr.c b/testsuites/sptests/spintr_err01/isr.c
new file mode 100644
index 0000000..31c7ab4
--- /dev/null
+++ b/testsuites/sptests/spintr_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/spintr_err01/spintr_err01.doc b/testsuites/sptests/spintr_err01/spintr_err01.doc
new file mode 100644
index 0000000..b1258d1
--- /dev/null
+++ b/testsuites/sptests/spintr_err01/spintr_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:  spintr_err01
+
+directives:
+  i_catch
+
+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/spintr_err01/spintr_err01.scn b/testsuites/sptests/spintr_err01/spintr_err01.scn
new file mode 100644
index 0000000..09b0c3c
--- /dev/null
+++ b/testsuites/sptests/spintr_err01/spintr_err01.scn
@@ -0,0 +1,5 @@
+*** TEST INTERRUPT CATCH ERROR 01 ***
+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
+*** END TEST INTERRUPT CATCH ERROR 01 ***
diff --git a/testsuites/sptests/spintr_err01/system.h b/testsuites/sptests/spintr_err01/system.h
new file mode 100644
index 0000000..bf91c8f
--- /dev/null
+++ b/testsuites/sptests/spintr_err01/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_isr Service_routine(
+  rtems_vector_number ignored
+);
+
+/* 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 */




More information about the vc mailing list