[rtems commit] spratemon_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: 9c88bc6e80fd40115fdf7ede3cef50264d656ee6
Changeset: http://git.rtems.org/rtems/commit/?id=9c88bc6e80fd40115fdf7ede3cef50264d656ee6
Author: Bjorn Larsson <bjornlarsson at oarcorp.com>
Date: Tue Mar 25 09:13:03 2014 -0500
spratemon_err01: New test split from sp09.
---
testsuites/sptests/Makefile.am | 2 +-
testsuites/sptests/configure.ac | 1 +
testsuites/sptests/sp09/Makefile.am | 4 +-
testsuites/sptests/sp09/screen03.c | 11 ---
testsuites/sptests/sp09/sp09.scn | 27 -------
testsuites/sptests/sp09/system.h | 8 +--
testsuites/sptests/sp09/task1.c | 4 +-
testsuites/sptests/spratemon_err01/Makefile.am | 23 ++++++
testsuites/sptests/spratemon_err01/init.c | 42 +++++++++++
.../sptests/{sp09 => spratemon_err01}/screen10.c | 2 +-
.../sptests/spratemon_err01/spratemon_err01.doc | 25 +++++++
.../sptests/spratemon_err01/spratemon_err01.scn | 28 +++++++
testsuites/sptests/spratemon_err01/system.h | 75 ++++++++++++++++++++
.../sptests/{sp09 => spratemon_err01}/task4.c | 2 +-
14 files changed, 201 insertions(+), 53 deletions(-)
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 3150694..6a4070f 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
+ spregion_err01 sppartition_err01 spratemon_err01
SUBDIRS += spprofiling01
SUBDIRS += spcache01
SUBDIRS += sptls03
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 71f0c8d..df8009d 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -200,6 +200,7 @@ sppagesize/Makefile
spprintk/Makefile
spprivenv01/Makefile
spqreslib/Makefile
+spratemon_err01/Makefile
sprbtree01/Makefile
spsem01/Makefile
spsem02/Makefile
diff --git a/testsuites/sptests/sp09/Makefile.am b/testsuites/sptests/sp09/Makefile.am
index 67e97ce..f486853 100644
--- a/testsuites/sptests/sp09/Makefile.am
+++ b/testsuites/sptests/sp09/Makefile.am
@@ -1,8 +1,8 @@
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 \
- task1.c task2.c task3.c task4.c \
+ screen05.c screen06.c screen07.c screen08.c screen09.c \
+ task1.c task2.c task3.c \
system.h
dist_rtems_tests_DATA = sp09.scn
diff --git a/testsuites/sptests/sp09/screen03.c b/testsuites/sptests/sp09/screen03.c
index 3fd3fc9..7debabc 100644
--- a/testsuites/sptests/sp09/screen03.c
+++ b/testsuites/sptests/sp09/screen03.c
@@ -134,17 +134,6 @@ void Screen3()
puts( "TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL" );
status = rtems_task_create(
- Task_name[ 4 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
- puts( "TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
Task_name[ 5 ],
4,
RTEMS_MINIMUM_STACK_SIZE,
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index 9cd3545..5539b1f 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -65,7 +65,6 @@ 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
@@ -192,30 +191,4 @@ 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
*** END OF TEST 9 ***
diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h
index 812868d..628aa87 100644
--- a/testsuites/sptests/sp09/system.h
+++ b/testsuites/sptests/sp09/system.h
@@ -37,10 +37,6 @@ rtems_task Task_3(
rtems_task_argument argument
);
-rtems_task Task_4(
- rtems_task_argument argument
-);
-
rtems_isr Service_routine(
rtems_vector_number ignored
);
@@ -67,14 +63,12 @@ void Screen8( void );
void Screen9( void );
-void Screen10( void );
-
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_MAXIMUM_TASKS 10
+#define CONFIGURE_MAXIMUM_TASKS 9
#define CONFIGURE_MAXIMUM_TIMERS 1
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
index 0f58de6..2cd6fb8 100644
--- a/testsuites/sptests/sp09/task1.c
+++ b/testsuites/sptests/sp09/task1.c
@@ -50,10 +50,8 @@ rtems_task Task_1(
rtems_test_pause_and_screen_number( 9 );
Screen9();
- rtems_test_pause_and_screen_number( 10 );
-
- Screen10();
TEST_END();
+
rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/spratemon_err01/Makefile.am b/testsuites/sptests/spratemon_err01/Makefile.am
new file mode 100644
index 0000000..e068243
--- /dev/null
+++ b/testsuites/sptests/spratemon_err01/Makefile.am
@@ -0,0 +1,23 @@
+
+rtems_tests_PROGRAMS = spratemon_err01
+spratemon_err01_SOURCES = init.c screen10.c \
+ task4.c system.h
+
+dist_rtems_tests_DATA = spratemon_err01.scn
+dist_rtems_tests_DATA += spratemon_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 = $(spratemon_err01_OBJECTS)
+LINK_LIBS = $(spratemon_err01_LDLIBS)
+
+spratemon_err01$(EXEEXT): $(spratemon_err01_OBJECTS) $(spratemon_err01_DEPENDENCIES)
+ @rm -f spratemon_err01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spratemon_err01/init.c b/testsuites/sptests/spratemon_err01/init.c
new file mode 100644
index 0000000..2243da5
--- /dev/null
+++ b/testsuites/sptests/spratemon_err01/init.c
@@ -0,0 +1,42 @@
+/*
+ * 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 RATE MONOTONIC ERROR 01";
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+
+ TEST_BEGIN();
+ Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
+ Period_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
+
+ status = rtems_task_create(
+ Task_name[ 4 ],
+ 1,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &Task_id[ 4 ]
+ );
+ directive_failed( status, "rtems_task_create of TA4" );
+ puts( "TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL" );
+
+ Screen10();
+ TEST_END();
+}
diff --git a/testsuites/sptests/sp09/screen10.c b/testsuites/sptests/spratemon_err01/screen10.c
similarity index 99%
rename from testsuites/sptests/sp09/screen10.c
rename to testsuites/sptests/spratemon_err01/screen10.c
index e7a883a..d1c1850 100644
--- a/testsuites/sptests/sp09/screen10.c
+++ b/testsuites/sptests/spratemon_err01/screen10.c
@@ -11,7 +11,7 @@
*
* 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.
+ * http://www.rtems.com/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spratemon_err01/spratemon_err01.doc b/testsuites/sptests/spratemon_err01/spratemon_err01.doc
new file mode 100644
index 0000000..bf1a43c
--- /dev/null
+++ b/testsuites/sptests/spratemon_err01/spratemon_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: spratemon_err01
+
+ directives:
+ rm_create, rm_period, rm_stats, rm_gstatus, rm_cancel, rm_delete
+
+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/spratemon_err01/spratemon_err01.scn b/testsuites/sptests/spratemon_err01/spratemon_err01.scn
new file mode 100644
index 0000000..ca2cebd
--- /dev/null
+++ b/testsuites/sptests/spratemon_err01/spratemon_err01.scn
@@ -0,0 +1,28 @@
+*** TEST RATE MONOTONIC ERROR 01 ***
+TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL
+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
+*** END TEST RATE MONOTONIC ERROR 01 ***
diff --git a/testsuites/sptests/spratemon_err01/system.h b/testsuites/sptests/spratemon_err01/system.h
new file mode 100644
index 0000000..52bb580
--- /dev/null
+++ b/testsuites/sptests/spratemon_err01/system.h
@@ -0,0 +1,75 @@
+/*
+ * 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_timer_service_routine Delayed_routine(
+ rtems_id ignored_id,
+ void *ignored_address
+);
+
+rtems_task Task_4(
+ rtems_task_argument argument
+);
+
+void Screen10( 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_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/sp09/task4.c b/testsuites/sptests/spratemon_err01/task4.c
similarity index 96%
rename from testsuites/sptests/sp09/task4.c
rename to testsuites/sptests/spratemon_err01/task4.c
index 4e8df72..73a52ea 100644
--- a/testsuites/sptests/sp09/task4.c
+++ b/testsuites/sptests/spratemon_err01/task4.c
@@ -14,7 +14,7 @@
*
* 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.
+ * http://www.rtems.com/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
More information about the vc
mailing list