From 58b727f6b0eb470cf576d056d4b852d6121fed39 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 3 Dec 2008 21:00:35 +0000 Subject: 2008-12-03 Joel Sherrill PR 1347/cpukit * Makefile.am, configure.ac, sp30/resume.c, sp30/task1.c, sp31/delay.c: Rework Timer Server to ensure that the context allows for blocking, allocating memory, and acquiring semaphores and mutexes. * sp45/.cvsignore, sp45/Makefile.am, sp45/sp45.doc, sp45/sp45.scn: New files. --- testsuites/sptests/ChangeLog | 9 +++++++++ testsuites/sptests/Makefile.am | 2 +- testsuites/sptests/configure.ac | 1 + testsuites/sptests/sp30/resume.c | 2 +- testsuites/sptests/sp30/task1.c | 2 +- testsuites/sptests/sp31/delay.c | 2 +- testsuites/sptests/sp45/.cvsignore | 2 ++ testsuites/sptests/sp45/Makefile.am | 28 ++++++++++++++++++++++++++++ testsuites/sptests/sp45/sp45.doc | 22 ++++++++++++++++++++++ testsuites/sptests/sp45/sp45.scn | 15 +++++++++++++++ 10 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 testsuites/sptests/sp45/.cvsignore create mode 100644 testsuites/sptests/sp45/Makefile.am create mode 100644 testsuites/sptests/sp45/sp45.doc create mode 100644 testsuites/sptests/sp45/sp45.scn (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 0696006895..b46c4cd79f 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,12 @@ +2008-12-03 Joel Sherrill + + PR 1347/cpukit + * Makefile.am, configure.ac, sp30/resume.c, sp30/task1.c, sp31/delay.c: + Rework Timer Server to ensure that the context allows for blocking, + allocating memory, and acquiring semaphores and mutexes. + * sp45/.cvsignore, sp45/Makefile.am, sp45/sp45.doc, sp45/sp45.scn: + New files. + 2008-09-15 Ralf Corsépius * sp19/system.h: Use "double" instead of "rtems_double". diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 28d4c8c245..45024f3e1e 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal 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 \ sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \ - spsize spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 \ + sp45 spsize spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 \ spfatal07 spfatal08 spfatal09 spfatal10 DIST_SUBDIRS = $(SUBDIRS) spfatal spfatal_support diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 8fcfe61f65..5812dca743 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -69,6 +69,7 @@ sp41/Makefile sp42/Makefile sp43/Makefile sp44/Makefile +sp45/Makefile spsize/Makefile spfatal/Makefile spfatal01/Makefile diff --git a/testsuites/sptests/sp30/resume.c b/testsuites/sptests/sp30/resume.c index 715390e16c..f1f4c5a9f2 100644 --- a/testsuites/sptests/sp30/resume.c +++ b/testsuites/sptests/sp30/resume.c @@ -29,5 +29,5 @@ rtems_timer_service_routine Resume_task( task_to_resume = Task_id[ rtems_object_id_get_index( timer_id ) ]; status = rtems_task_resume( task_to_resume ); - directive_failed_with_level( status, "rtems_task_resume", 1 ); + directive_failed( status, "rtems_task_resume" ); } diff --git a/testsuites/sptests/sp30/task1.c b/testsuites/sptests/sp30/task1.c index 178b06a3dd..cb395cecd1 100644 --- a/testsuites/sptests/sp30/task1.c +++ b/testsuites/sptests/sp30/task1.c @@ -36,7 +36,7 @@ rtems_task Task_1_through_3( Timer_id[ argument ], (task_number( tid ) - 1) * 5 * TICKS_PER_SECOND, Resume_task, - NULL + (void *) tid ); directive_failed( status, "rtems_timer_server_fire_after failed" ); diff --git a/testsuites/sptests/sp31/delay.c b/testsuites/sptests/sp31/delay.c index 0caf84ff85..2cce662e47 100644 --- a/testsuites/sptests/sp31/delay.c +++ b/testsuites/sptests/sp31/delay.c @@ -27,5 +27,5 @@ rtems_timer_service_routine Delayed_resume( rtems_status_code status; status = rtems_task_resume( Task_id[ 1 ] ); - directive_failed_with_level( status, "rtems_task_resume of self", 1 ); + directive_failed( status, "rtems_task_resume of self" ); } diff --git a/testsuites/sptests/sp45/.cvsignore b/testsuites/sptests/sp45/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp45/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp45/Makefile.am b/testsuites/sptests/sp45/Makefile.am new file mode 100644 index 0000000000..a1618b3100 --- /dev/null +++ b/testsuites/sptests/sp45/Makefile.am @@ -0,0 +1,28 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp45.exe +sp45_exe_SOURCES = init.c + +dist_rtems_tests_DATA = sp45.scn +dist_rtems_tests_DATA += sp45.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +sp45_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp45_exe_OBJECTS) $(sp45_exe_LDADD) +LINK_LIBS = $(sp45_exe_LDLIBS) + +sp45.exe$(EXEEXT): $(sp45_exe_OBJECTS) $(sp45_exe_DEPENDENCIES) + @rm -f sp45.exe$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp45/sp45.doc b/testsuites/sptests/sp45/sp45.doc new file mode 100644 index 0000000000..7a45209a38 --- /dev/null +++ b/testsuites/sptests/sp45/sp45.doc @@ -0,0 +1,22 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2002. +# 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: test44 + +directives: + +concepts: + +allocating memory from a Timer Service Routine fired from a server +delaying in a Timer Service Routine fired from a server diff --git a/testsuites/sptests/sp45/sp45.scn b/testsuites/sptests/sp45/sp45.scn new file mode 100644 index 0000000000..827b1f071a --- /dev/null +++ b/testsuites/sptests/sp45/sp45.scn @@ -0,0 +1,15 @@ + + +*** TEST 45 *** +INIT - rtems_timer_create - creating timer 1 +INIT - timer 1 has id (0x12010001) +INIT - rtems_timer_create - creating timer 2 +INIT - timer 2 has id (0x12010002) +TA1 - rtems_timer_server_fire_after - timer 1 in 1 seconds +TA1 - rtems_task_wake_after - 2 second +TSR: calling malloc +TSR: calling free +TSR: delaying with rtems_task_wake_after +TSR appears to have executed OK +TA1 - timer_deleting - timer 1 +*** END OF TEST 45 *** -- cgit v1.2.3