summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2013-12-24 19:02:37 +0530
committerGedare Bloom <gedare@rtems.org>2013-12-24 09:53:59 -0500
commit7b5f6643b21d87ad462410a2ff4ac02304f7b3e1 (patch)
treeae88a3eab8313b5dad5e7a7034c17c46f3f01872
parentbfin_TLL6527: added new doxygen (diff)
downloadrtems-7b5f6643b21d87ad462410a2ff4ac02304f7b3e1.tar.bz2
sptests: refactor sp09/screen13 into a new test spclock_err02
-rw-r--r--testsuites/sptests/Makefile.am1
-rw-r--r--testsuites/sptests/configure.ac1
-rw-r--r--testsuites/sptests/sp09/Makefile.am2
-rw-r--r--testsuites/sptests/sp09/sp09.scn17
-rw-r--r--testsuites/sptests/sp09/system.h2
-rw-r--r--testsuites/sptests/sp09/task1.c3
-rw-r--r--testsuites/sptests/spclock_err02/Makefile.am22
-rw-r--r--testsuites/sptests/spclock_err02/init.c (renamed from testsuites/sptests/sp09/screen13.c)36
-rw-r--r--testsuites/sptests/spclock_err02/spclock_err02.doc20
-rw-r--r--testsuites/sptests/spclock_err02/spclock_err02.scn18
10 files changed, 88 insertions, 34 deletions
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index da707a97ef..18566d2107 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -38,6 +38,7 @@ SUBDIRS += speventsystem01
SUBDIRS += spinternalerror01
SUBDIRS += spinternalerror02
SUBDIRS += sptimer_err01 sptimer_err02
+SUBDIRS += spclock_err02
if HAS_CPUSET
SUBDIRS += spcpuset01
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index daf72cc8c2..e17dc10f0a 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -124,6 +124,7 @@ spcbssched02/Makefile
spcbssched03/Makefile
spchain/Makefile
spclockget/Makefile
+spclock_err02/Makefile
spcoverage/Makefile
spedfsched01/Makefile
spedfsched02/Makefile
diff --git a/testsuites/sptests/sp09/Makefile.am b/testsuites/sptests/sp09/Makefile.am
index 7af9aea56d..05e71e6223 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 screen13.c task1.c task2.c task3.c task4.c \
+ screen11.c screen12.c task1.c task2.c task3.c task4.c \
system.h
dist_rtems_tests_DATA = sp09.scn
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index a414553b45..c48935728e 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -279,21 +279,4 @@ 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
-<pause - screen 13>
-TA1 - rtems_io_close - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_control - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_open - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_read - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_write - RTEMS_INVALID_NUMBER
-TA1 - rtems_clock_set - 23:59:59 12/31/2000 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get_tod - 00:00:00 01/01/2001 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/1999 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get_tod - 00:00:00 01/01/2000 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/2100 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get_tod - 17:31:44 11/25/1964 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/2099 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get_tod - 17:31:44 11/25/1963 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/1991 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get_tod - 00:00:00 01/01/1992 - RTEMS_SUCCESSFUL
*** END OF TEST 9 ***
diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h
index 04034823b7..5f880cc9e8 100644
--- a/testsuites/sptests/sp09/system.h
+++ b/testsuites/sptests/sp09/system.h
@@ -72,8 +72,6 @@ void Screen11( void );
void Screen12( void );
-void Screen13( void );
-
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
index f3329018ab..1086fc5509 100644
--- a/testsuites/sptests/sp09/task1.c
+++ b/testsuites/sptests/sp09/task1.c
@@ -59,9 +59,6 @@ rtems_task Task_1(
rtems_test_pause_and_screen_number( 12 );
Screen12();
- rtems_test_pause_and_screen_number( 13 );
-
- Screen13();
puts( "*** END OF TEST 9 ***" );
rtems_test_exit( 0 );
diff --git a/testsuites/sptests/spclock_err02/Makefile.am b/testsuites/sptests/spclock_err02/Makefile.am
new file mode 100644
index 0000000000..9067c775c9
--- /dev/null
+++ b/testsuites/sptests/spclock_err02/Makefile.am
@@ -0,0 +1,22 @@
+
+rtems_tests_PROGRAMS = spclock_err02
+spclock_err02_SOURCES = init.c
+
+dist_rtems_tests_DATA = spclock_err02.scn
+dist_rtems_tests_DATA += spclock_err02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spclock_err02_OBJECTS)
+LINK_LIBS = $(spclock_err02_LDLIBS)
+
+spclock_err02$(EXEEXT): $(spclock_err02_OBJECTS) $(spclock_err02_DEPENDENCIES)
+ @rm -f spclock_err02$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/sp09/screen13.c b/testsuites/sptests/spclock_err02/init.c
index 55fe092779..d7d33f2741 100644
--- a/testsuites/sptests/sp09/screen13.c
+++ b/testsuites/sptests/spclock_err02/init.c
@@ -1,12 +1,5 @@
-/* Screen13
- *
- * This routine generates error screen 13 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-2011.
+/*
+ * COPYRIGHT (c) 2013.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -18,10 +11,18 @@
#include "config.h"
#endif
-#include "system.h"
+#include <tmacros.h>
+#include "test_support.h"
+
+/* forward declaration to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
-void Screen13()
+rtems_task Init(
+ rtems_task_argument argument
+)
{
+ puts( "\n\n*** TEST SPCLOCK_ERR02 ***" );
+
rtems_time_of_day time;
rtems_status_code status;
@@ -112,4 +113,17 @@ void Screen13()
status = rtems_clock_get_tod( &time );
directive_failed( status, "rtems_clock_set" );
print_time( "TA1 - rtems_clock_get_tod - ", &time, " - RTEMS_SUCCESSFUL\n" );
+
+ puts( "*** END OF TEST SPCLOCK_ERR02 ***" );
}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
diff --git a/testsuites/sptests/spclock_err02/spclock_err02.doc b/testsuites/sptests/spclock_err02/spclock_err02.doc
new file mode 100644
index 0000000000..51489e10f2
--- /dev/null
+++ b/testsuites/sptests/spclock_err02/spclock_err02.doc
@@ -0,0 +1,20 @@
+# COPYRIGHT (c) 2013.
+# 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: spclock_erro02
+
+directives:
+ rtems_clock_set, rtems_clock_get_tod,
+
+concepts:
+
+ a. Verifies all error codes returned by the executive in single
+ processor configurations.
diff --git a/testsuites/sptests/spclock_err02/spclock_err02.scn b/testsuites/sptests/spclock_err02/spclock_err02.scn
new file mode 100644
index 0000000000..c83b817c3f
--- /dev/null
+++ b/testsuites/sptests/spclock_err02/spclock_err02.scn
@@ -0,0 +1,18 @@
+*** TEST SPCLOCK_ERR02 ***
+TA1 - rtems_io_close - RTEMS_INVALID_NUMBER
+TA1 - rtems_io_control - RTEMS_INVALID_NUMBER
+TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER
+TA1 - rtems_io_open - RTEMS_INVALID_NUMBER
+TA1 - rtems_io_read - RTEMS_INVALID_NUMBER
+TA1 - rtems_io_write - RTEMS_INVALID_NUMBER
+TA1 - rtems_clock_set - 23:59:59 12/31/2000 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_get_tod - 00:00:00 01/01/2001 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_set - 23:59:59 12/31/1999 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_get_tod - 00:00:00 01/01/2000 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_set - 23:59:59 12/31/2100 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_get_tod - 17:31:44 11/24/1964 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_set - 23:59:59 12/31/2099 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_get_tod - 17:31:44 11/25/1963 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_set - 23:59:59 12/31/1991 - RTEMS_SUCCESSFUL
+TA1 - rtems_clock_get_tod - 00:00:00 01/01/1992 - RTEMS_SUCCESSFUL
+*** END OF TEST SPCLOCK_ERR02 ***