[rtems commit] sptests: refactor sp09/ screen13 into a new test spclock_err02

Gedare Bloom gedare at rtems.org
Tue Dec 24 14:56:06 UTC 2013


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

Author:    Chirayu Desai <cdesai at cyanogenmod.org>
Date:      Tue Dec 24 19:20:37 2013 +0530

sptests: refactor sp09/screen13 into a new test spclock_err02

---

 testsuites/sptests/Makefile.am                     |    1 +
 testsuites/sptests/configure.ac                    |    1 +
 testsuites/sptests/sp09/Makefile.am                |    2 +-
 testsuites/sptests/sp09/sp09.scn                   |   17 ---------
 testsuites/sptests/sp09/system.h                   |    2 -
 testsuites/sptests/sp09/task1.c                    |    3 --
 testsuites/sptests/spclock_err02/Makefile.am       |   22 ++++++++++++
 .../{sp09/screen13.c => spclock_err02/init.c}      |   36 ++++++++++++++------
 testsuites/sptests/spclock_err02/spclock_err02.doc |   20 +++++++++++
 testsuites/sptests/spclock_err02/spclock_err02.scn |   18 ++++++++++
 10 files changed, 88 insertions(+), 34 deletions(-)

diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index da707a9..18566d2 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 daf72cc..e17dc10 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 7af9aea..05e71e6 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 a414553..c489357 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 0403482..5f880cc 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 f332901..1086fc5 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 0000000..9067c77
--- /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 at .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
similarity index 87%
rename from testsuites/sptests/sp09/screen13.c
rename to testsuites/sptests/spclock_err02/init.c
index 55fe092..d7d33f2 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 0000000..51489e1
--- /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 0000000..c83b817
--- /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 ***




More information about the vc mailing list