forked from Imagelibrary/rtems
2009-06-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add sp52 and sp53 based upon bug report from Sergio Faustino <sergio.faustino@edisoft.pt> regarding moving the time of day forward not making server based timers fire. * sp52/.cvsignore, sp52/Makefile.am, sp52/init.c, sp52/sp52.doc, sp52/sp52.scn, sp53/.cvsignore, sp53/Makefile.am, sp53/sp53.doc, sp53/sp53.scn: New files.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2009-06-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac: Add sp52 and sp53 based upon bug report
|
||||||
|
from Sergio Faustino <sergio.faustino@edisoft.pt> regarding moving
|
||||||
|
the time of day forward not making server based timers fire.
|
||||||
|
* sp52/.cvsignore, sp52/Makefile.am, sp52/init.c, sp52/sp52.doc,
|
||||||
|
sp52/sp52.scn, sp53/.cvsignore, sp53/Makefile.am, sp53/sp53.doc,
|
||||||
|
sp53/sp53.scn: New files.
|
||||||
|
|
||||||
2009-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* sp51/init.c, sp51/sp51.scn: Add more priority ceiling test cases.
|
* sp51/init.c, sp51/sp51.scn: Add more priority ceiling test cases.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
|
|||||||
SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
||||||
sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
|
sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
|
||||||
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
|
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
|
||||||
sp45 sp46 sp47 sp48 sp49 sp50 sp51 spsize spwatchdog \
|
sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 spsize spwatchdog \
|
||||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||||
spfatal08 spfatal09 spobjgetnext \
|
spfatal08 spfatal09 spobjgetnext \
|
||||||
spprintk spwkspace
|
spprintk spwkspace
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ sp48/Makefile
|
|||||||
sp49/Makefile
|
sp49/Makefile
|
||||||
sp50/Makefile
|
sp50/Makefile
|
||||||
sp51/Makefile
|
sp51/Makefile
|
||||||
|
sp52/Makefile
|
||||||
|
sp53/Makefile
|
||||||
spwatchdog/Makefile
|
spwatchdog/Makefile
|
||||||
spsize/Makefile
|
spsize/Makefile
|
||||||
spfatal/Makefile
|
spfatal/Makefile
|
||||||
|
|||||||
2
testsuites/sptests/sp52/.cvsignore
Normal file
2
testsuites/sptests/sp52/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
28
testsuites/sptests/sp52/Makefile.am
Normal file
28
testsuites/sptests/sp52/Makefile.am
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
MANAGERS = all
|
||||||
|
|
||||||
|
rtems_tests_PROGRAMS = sp52
|
||||||
|
sp52_SOURCES = init.c
|
||||||
|
|
||||||
|
dist_rtems_tests_DATA = sp52.scn
|
||||||
|
dist_rtems_tests_DATA += sp52.doc
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../automake/compile.am
|
||||||
|
include $(top_srcdir)/../automake/leaf.am
|
||||||
|
|
||||||
|
sp52_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||||
|
|
||||||
|
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||||
|
|
||||||
|
LINK_OBJS = $(sp52_OBJECTS) $(sp52_LDADD)
|
||||||
|
LINK_LIBS = $(sp52_LDLIBS)
|
||||||
|
|
||||||
|
sp52$(EXEEXT): $(sp52_OBJECTS) $(sp52_DEPENDENCIES)
|
||||||
|
@rm -f sp52$(EXEEXT)
|
||||||
|
$(make-exe)
|
||||||
|
|
||||||
|
include $(top_srcdir)/../automake/local.am
|
||||||
116
testsuites/sptests/sp52/init.c
Normal file
116
testsuites/sptests/sp52/init.c
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
* Based upon test code posted on the RTEMS User's Mailing List
|
||||||
|
* by Sergio Faustino <sergio.faustino@edisoft.pt>:
|
||||||
|
*
|
||||||
|
* http://www.rtems.org/pipermail/rtems-users/2009-June/005540.html
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(USE_TIMER_SERVER)
|
||||||
|
#define TEST_NUMBER "53"
|
||||||
|
#define TSR_MODE "Server"
|
||||||
|
#define FIRE_WHEN rtems_timer_server_fire_when
|
||||||
|
#define FIRE_WHEN_STRING "rtems_timer_server_fire_when"
|
||||||
|
#else
|
||||||
|
#define TEST_NUMBER "52"
|
||||||
|
#define TSR_MODE "Interrupt"
|
||||||
|
#define FIRE_WHEN rtems_timer_fire_when
|
||||||
|
#define FIRE_WHEN_STRING "rtems_timer_fire_when"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <tmacros.h>
|
||||||
|
|
||||||
|
#define INITIAL_SECOND 10
|
||||||
|
volatile bool _timer_passage = FALSE;
|
||||||
|
|
||||||
|
/*timer Routine*/
|
||||||
|
rtems_timer_service_routine TIMER_service_routine(
|
||||||
|
rtems_id ignored_id,
|
||||||
|
void *user_data
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_timer_passage = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
rtems_task Init(
|
||||||
|
rtems_task_argument argument
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_status_code status;
|
||||||
|
rtems_id timer_id;
|
||||||
|
rtems_name timer_name;
|
||||||
|
|
||||||
|
rtems_time_of_day global_time;
|
||||||
|
rtems_time_of_day time_to_fire;
|
||||||
|
|
||||||
|
puts( "\n\n*** TEST " TEST_NUMBER " ***" );
|
||||||
|
|
||||||
|
/* build timer name*/
|
||||||
|
timer_name = rtems_build_name('T', 'M', '1', ' ');
|
||||||
|
|
||||||
|
/* create Timer */
|
||||||
|
status = rtems_timer_create(timer_name, &timer_id);
|
||||||
|
directive_failed( status, "rtems_timer_create" );
|
||||||
|
|
||||||
|
#if defined(USE_TIMER_SERVER)
|
||||||
|
/* initiate timer server */
|
||||||
|
status = rtems_timer_initiate_server(
|
||||||
|
RTEMS_MINIMUM_PRIORITY,
|
||||||
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
|
RTEMS_DEFAULT_ATTRIBUTES
|
||||||
|
);
|
||||||
|
directive_failed( status, "rtems_timer_initiate_server" );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set system clock */
|
||||||
|
build_time(&global_time, 6, 8, 2009, 16, 5, INITIAL_SECOND, 0);
|
||||||
|
status = rtems_clock_set(&global_time);
|
||||||
|
directive_failed( status, "rtems_clock_set" );
|
||||||
|
|
||||||
|
/* Set Timer to Fire */
|
||||||
|
/* build fire times */
|
||||||
|
time_to_fire = global_time;
|
||||||
|
|
||||||
|
/* only diferent second */
|
||||||
|
time_to_fire.second = INITIAL_SECOND + 5;
|
||||||
|
|
||||||
|
status = FIRE_WHEN(
|
||||||
|
timer_id,
|
||||||
|
&time_to_fire,
|
||||||
|
TIMER_service_routine,
|
||||||
|
(void*) NULL
|
||||||
|
);
|
||||||
|
directive_failed( status, FIRE_WHEN_STRING );
|
||||||
|
|
||||||
|
/* Set system clock FORWARD */
|
||||||
|
global_time.second = INITIAL_SECOND + 10;
|
||||||
|
status = rtems_clock_set(&global_time);
|
||||||
|
|
||||||
|
if (!_timer_passage) {
|
||||||
|
puts( TSR_MODE " Timer FAILED to fire after setting time forward");
|
||||||
|
rtems_test_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
puts( TSR_MODE " Timer fired after setting time forward -- OK");
|
||||||
|
|
||||||
|
puts( "*** END OF TEST " TEST_NUMBER " ***" );
|
||||||
|
rtems_test_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* configuration stuff */
|
||||||
|
|
||||||
|
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||||
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
|
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||||
|
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||||
|
|
||||||
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
|
#define CONFIGURE_INIT
|
||||||
|
#include <rtems/confdefs.h>
|
||||||
24
testsuites/sptests/sp52/sp52.doc
Normal file
24
testsuites/sptests/sp52/sp52.doc
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# COPYRIGHT (c) 1989-2009.
|
||||||
|
# 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: sp52
|
||||||
|
|
||||||
|
directives:
|
||||||
|
|
||||||
|
rtems_timer_fire_after
|
||||||
|
rtems_clock_set
|
||||||
|
|
||||||
|
concepts:
|
||||||
|
|
||||||
|
+ Ensure that setting the time of day forward fires any interrupt based
|
||||||
|
TSRs that should be fire.
|
||||||
3
testsuites/sptests/sp52/sp52.scn
Normal file
3
testsuites/sptests/sp52/sp52.scn
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*** TEST 52 ***
|
||||||
|
Interrupt Timer fired after setting time forward -- OK
|
||||||
|
*** END OF TEST 52 ***
|
||||||
2
testsuites/sptests/sp53/.cvsignore
Normal file
2
testsuites/sptests/sp53/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
29
testsuites/sptests/sp53/Makefile.am
Normal file
29
testsuites/sptests/sp53/Makefile.am
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
MANAGERS = all
|
||||||
|
|
||||||
|
rtems_tests_PROGRAMS = sp53
|
||||||
|
sp53_SOURCES = ../sp52/init.c
|
||||||
|
|
||||||
|
dist_rtems_tests_DATA = sp53.scn
|
||||||
|
dist_rtems_tests_DATA += sp53.doc
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../automake/compile.am
|
||||||
|
include $(top_srcdir)/../automake/leaf.am
|
||||||
|
|
||||||
|
sp53_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||||
|
|
||||||
|
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||||
|
AM_CPPFLAGS += -DUSE_TIMER_SERVER
|
||||||
|
|
||||||
|
LINK_OBJS = $(sp53_OBJECTS) $(sp53_LDADD)
|
||||||
|
LINK_LIBS = $(sp53_LDLIBS)
|
||||||
|
|
||||||
|
sp53$(EXEEXT): $(sp53_OBJECTS) $(sp53_DEPENDENCIES)
|
||||||
|
@rm -f sp53$(EXEEXT)
|
||||||
|
$(make-exe)
|
||||||
|
|
||||||
|
include $(top_srcdir)/../automake/local.am
|
||||||
25
testsuites/sptests/sp53/sp53.doc
Normal file
25
testsuites/sptests/sp53/sp53.doc
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# COPYRIGHT (c) 1989-2009.
|
||||||
|
# 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: sp53
|
||||||
|
|
||||||
|
directives:
|
||||||
|
|
||||||
|
rtems_timer_server_fire_after
|
||||||
|
rtems_timer_initiate_server
|
||||||
|
rtems_clock_set
|
||||||
|
|
||||||
|
concepts:
|
||||||
|
|
||||||
|
+ Ensure that setting the time of day forward fires any timer server
|
||||||
|
based TSRs that should be fire.
|
||||||
3
testsuites/sptests/sp53/sp53.scn
Normal file
3
testsuites/sptests/sp53/sp53.scn
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*** TEST 53 ***
|
||||||
|
Server Timer fired after setting time forward -- OK
|
||||||
|
*** END OF TEST 53 ***
|
||||||
Reference in New Issue
Block a user