sptests: refactor sp09/screen13 into a new test spclock_err02

This commit is contained in:
Chirayu Desai
2013-12-24 19:02:37 +05:30
committed by Gedare Bloom
parent 0c09ccf3d5
commit 7b5f6643b2
10 changed files with 88 additions and 34 deletions

View File

@@ -38,6 +38,7 @@ SUBDIRS += speventsystem01
SUBDIRS += spinternalerror01
SUBDIRS += spinternalerror02
SUBDIRS += sptimer_err01 sptimer_err02
SUBDIRS += spclock_err02
if HAS_CPUSET
SUBDIRS += spcpuset01

View File

@@ -124,6 +124,7 @@ spcbssched02/Makefile
spcbssched03/Makefile
spchain/Makefile
spclockget/Makefile
spclock_err02/Makefile
spcoverage/Makefile
spedfsched01/Makefile
spedfsched02/Makefile

View File

@@ -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

View File

@@ -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 ***

View File

@@ -72,8 +72,6 @@ void Screen11( void );
void Screen12( void );
void Screen13( void );
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER

View File

@@ -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 );

View File

@@ -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

View File

@@ -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"
void Screen13()
/* forward declaration to avoid warnings */
rtems_task Init(rtems_task_argument argument);
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 */

View File

@@ -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.

View File

@@ -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 ***