diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-10 20:28:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-10 20:28:10 +0000 |
commit | 937a22a7cfcf467a779c7d51d4695f220d39e619 (patch) | |
tree | 623993441d5d40284cd9c5acd618f1500004deb0 | |
parent | 2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-937a22a7cfcf467a779c7d51d4695f220d39e619.tar.bz2 |
2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add new infrastructure which is more
reliable about generating cases which hit interrupt critical
sections. Remove sp41 since it used its own mechanism.
* spintrcritical01/.cvsignore, spintrcritical01/Makefile.am,
spintrcritical01/init.c, spintrcritical01/spintrcritical01.doc,
spintrcritical01/spintrcritical01.scn, spintrcritical02/.cvsignore,
spintrcritical02/Makefile.am, spintrcritical02/spintrcritical02.doc,
spintrcritical02/spintrcritical02.scn, spintrcritical03/.cvsignore,
spintrcritical03/Makefile.am, spintrcritical03/spintrcritical03.doc,
spintrcritical03/spintrcritical03.scn, spintrcritical04/.cvsignore,
spintrcritical04/Makefile.am, spintrcritical04/spintrcritical04.doc,
spintrcritical04/spintrcritical04.scn, spintrcritical05/.cvsignore,
spintrcritical05/Makefile.am, spintrcritical05/spintrcritical05.doc,
spintrcritical05/spintrcritical05.scn: New files.
* sp41/.cvsignore, sp41/Makefile.am, sp41/init.c, sp41/sp41.scn,
sp41/system.h: Removed.
28 files changed, 501 insertions, 285 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 7c7643c4d9..2afc08641d 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,24 @@ 2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com> + * Makefile.am, configure.ac: Add new infrastructure which is more + reliable about generating cases which hit interrupt critical + sections. Remove sp41 since it used its own mechanism. + * spintrcritical01/.cvsignore, spintrcritical01/Makefile.am, + spintrcritical01/init.c, spintrcritical01/spintrcritical01.doc, + spintrcritical01/spintrcritical01.scn, spintrcritical02/.cvsignore, + spintrcritical02/Makefile.am, spintrcritical02/spintrcritical02.doc, + spintrcritical02/spintrcritical02.scn, spintrcritical03/.cvsignore, + spintrcritical03/Makefile.am, spintrcritical03/spintrcritical03.doc, + spintrcritical03/spintrcritical03.scn, spintrcritical04/.cvsignore, + spintrcritical04/Makefile.am, spintrcritical04/spintrcritical04.doc, + spintrcritical04/spintrcritical04.scn, spintrcritical05/.cvsignore, + spintrcritical05/Makefile.am, spintrcritical05/spintrcritical05.doc, + spintrcritical05/spintrcritical05.scn: New files. + * sp41/.cvsignore, sp41/Makefile.am, sp41/init.c, sp41/sp41.scn, + sp41/system.h: Removed. + +2009-07-10 Joel Sherrill <joel.sherrill@OARcorp.com> + * sp41/init.c: Remove incorrect comment. 2009-07-09 Joel Sherrill <joel.sherrill@OARcorp.com> diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index f5935a9dd8..a5fb28dc0b 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -4,17 +4,21 @@ 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 sp27a sp28 \ - sp29 sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 \ - sp44 sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 \ - sp58 sp59 \ +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 sp27a sp28 sp29 \ + sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 \ + sp40 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \ + sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \ spchain spobjgetnext spprintk spsize spstkalloc spthreadq01 \ spwatchdog spwkspace \ spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \ - spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 + spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 \ + spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \ + spintrcritical05 -DIST_SUBDIRS = $(SUBDIRS) spfatal_support +DIST_SUBDIRS = $(SUBDIRS) spfatal_support spintrcritical_support EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h include $(top_srcdir)/../automake/subdirs.am diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 9972157d92..b7f2742fc0 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -12,7 +12,6 @@ RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define foreign 1.10]) AM_MAINTAINER_MODE - RTEMS_ENV_RTEMSBSP RTEMS_CHECK_RTEMS_TEST_NO_PAUSE @@ -66,7 +65,6 @@ sp37/Makefile sp38/Makefile sp39/Makefile sp40/Makefile -sp41/Makefile sp42/Makefile sp43/Makefile sp44/Makefile @@ -98,6 +96,11 @@ spfatal09/Makefile spfatal10/Makefile spfatal11/Makefile spfatal12/Makefile +spintrcritical01/Makefile +spintrcritical02/Makefile +spintrcritical03/Makefile +spintrcritical04/Makefile +spintrcritical05/Makefile spobjgetnext/Makefile spprintk/Makefile spsize/Makefile diff --git a/testsuites/sptests/sp41/Makefile.am b/testsuites/sptests/sp41/Makefile.am deleted file mode 100644 index 204b41354b..0000000000 --- a/testsuites/sptests/sp41/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -## -## $Id$ -## - -MANAGERS = all - -rtems_tests_PROGRAMS = sp41 -sp41_SOURCES = init.c system.h - -dist_rtems_tests_DATA = sp41.scn - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -sp41_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(sp41_OBJECTS) $(sp41_LDADD) -LINK_LIBS = $(sp41_LDLIBS) - -sp41$(EXEEXT): $(sp41_OBJECTS) $(sp41_DEPENDENCIES) - @rm -f sp41$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp41/init.c b/testsuites/sptests/sp41/init.c deleted file mode 100644 index c86eb4bf80..0000000000 --- a/testsuites/sptests/sp41/init.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1 -#include "system.h" - -volatile bool case_hit; - -rtems_id main_task; -rtems_id Semaphore; - -/* prototypes */ -Thread_blocking_operation_States getState(void); -rtems_timer_service_routine test_release_from_isr( - rtems_id timer, - void *arg -); -rtems_timer_service_routine test_release_with_timeout_from_isr( - rtems_id timer, - void *arg -); - -Thread_blocking_operation_States getState(void) -{ - Objects_Locations location; - Semaphore_Control *sem; - - sem = (Semaphore_Control *)_Objects_Get( - &_Semaphore_Information, Semaphore, &location ); - if ( location != OBJECTS_LOCAL ) { - puts( "Bad object lookup" ); - rtems_test_exit(0); - } - _Thread_Unnest_dispatch(); - - return sem->Core_control.semaphore.Wait_queue.sync_state; -} - -rtems_timer_service_routine test_release_from_isr( - rtems_id timer, - void *arg -) -{ - rtems_status_code status; - - if ( getState() == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { - case_hit = TRUE; - } - status = rtems_semaphore_release( Semaphore ); -} - -rtems_timer_service_routine test_release_with_timeout_from_isr( - rtems_id timer, - void *arg -) -{ - rtems_status_code status; - - if ( getState() == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { - /* - * We want to catch the task while it is blocking. Otherwise - * just send and make it happy. - */ - case_hit = TRUE; - } - status = rtems_semaphore_release( Semaphore ); -} - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - rtems_id timer; - int i; - int max; - uint32_t iterations = 0; - - puts( "\n\n*** TEST 41 ***" ); - - main_task = rtems_task_self(); - - /* - * Timer used in multiple ways - */ - status = rtems_timer_create( 1, &timer ); - directive_failed( status, "rtems_timer_create" ); - - status = rtems_semaphore_create( - rtems_build_name( 'S', 'M', '1', ' ' ), - 1, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_NO_PRIORITY, - &Semaphore - ); - directive_failed( status, "rtems_semaphore_create of SM1" ); - - /* - * Test semaphore release successful from ISR -- obtain is forever - */ - case_hit = FALSE; - iterations = 0; - max = 1; - - while (1) { - if ( case_hit ) - break; - status = rtems_timer_fire_after( timer, 1, test_release_from_isr, NULL ); - directive_failed( status, "timer_fire_after failed" ); - - for (i=0 ; i<max ; i++ ) - if ( getState() == THREAD_BLOCKING_OPERATION_SATISFIED ) - break; - - status = rtems_semaphore_obtain( Semaphore, RTEMS_DEFAULT_OPTIONS, 0 ); - directive_failed( status, "rtems_semaphore_obtain" ); - if ( case_hit == TRUE ) - break; - max += 2; - - /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4L * 1000L * 30L) - break; - } - - status = rtems_semaphore_release( Semaphore ); - directive_failed( status, "rtems_semaphore_release" ); - printf( - "Release from ISR hitting synchronization point has %soccurred\n", - (( case_hit == TRUE ) ? "" : "NOT ") - ); - - /* - * Test semaphore release successful from ISR -- obtain has timeout - */ - case_hit = FALSE; - iterations = 0; - max = 1; - - while (1) { - if ( case_hit ) - break; - status = rtems_timer_fire_after( - timer, 1, test_release_with_timeout_from_isr, NULL ); - directive_failed( status, "timer_fire_after failed" ); - - for (i=0 ; i<max ; i++ ) - if ( getState() == THREAD_BLOCKING_OPERATION_SATISFIED ) - break; - - status = rtems_semaphore_obtain( Semaphore, RTEMS_DEFAULT_OPTIONS, 10 ); - directive_failed( status, "rtems_semaphore_obtain" ); - if ( case_hit == TRUE ) - break; - max += 2; - - /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4L * 1000L * 30L) - break; - } - - printf( - "Release from ISR (with timeout) hitting synchronization " - "point has %soccurred\n", - (( case_hit == TRUE ) ? "" : "NOT ") - ); - - /* - * Now try for a timeout case -- semaphore must not be available - */ - iterations = 0; - case_hit = FALSE; - max = 1; - - puts( - "Run multiple times in attempt to hit threadq timeout synchronization point" - ); - while (1) { - - for (i=0 ; i<max ; i++ ) - if ( getState() == THREAD_BLOCKING_OPERATION_SATISFIED ) - break; - - status = rtems_semaphore_obtain( Semaphore, RTEMS_DEFAULT_OPTIONS, 1 ); - fatal_directive_status( status, RTEMS_TIMEOUT, "rtems_semaphore_obtain" ); - - if ( ++max > 10240 ) - max = 0; - - /* with our clock tick, this is about 30 seconds */ - if ( ++iterations >= 4L * 1000L * 30L) - break; - } - - puts( "*** END OF TEST 41 ***" ); - rtems_test_exit( 0 ); -} diff --git a/testsuites/sptests/sp41/sp41.scn b/testsuites/sptests/sp41/sp41.scn deleted file mode 100644 index fb661e3f35..0000000000 --- a/testsuites/sptests/sp41/sp41.scn +++ /dev/null @@ -1,4 +0,0 @@ -*** TEST 41 *** -Release from ISR hitting synchronization point has occurred -Release from ISR (with timeout) hitting synchronization point has occurred -Run multiple times in attempt to hit threadq timeout synchronization point diff --git a/testsuites/sptests/sp41/system.h b/testsuites/sptests/sp41/system.h deleted file mode 100644 index f2a81e6634..0000000000 --- a/testsuites/sptests/sp41/system.h +++ /dev/null @@ -1,39 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-2007. - * 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. - * - * $Id$ - */ - -#include <tmacros.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_MICROSECONDS_PER_TICK 250 - -#define CONFIGURE_MAXIMUM_TASKS 2 -#define CONFIGURE_MAXIMUM_TIMERS 1 -#define CONFIGURE_MAXIMUM_SEMAPHORES 1 - -#include <rtems/confdefs.h> - -/* end of include file */ diff --git a/testsuites/sptests/sp41/.cvsignore b/testsuites/sptests/spintrcritical01/.cvsignore index 282522db03..282522db03 100644 --- a/testsuites/sptests/sp41/.cvsignore +++ b/testsuites/sptests/spintrcritical01/.cvsignore diff --git a/testsuites/sptests/spintrcritical01/Makefile.am b/testsuites/sptests/spintrcritical01/Makefile.am new file mode 100644 index 0000000000..2d1206a910 --- /dev/null +++ b/testsuites/sptests/spintrcritical01/Makefile.am @@ -0,0 +1,30 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spintrcritical01 +spintrcritical01_SOURCES = init.c ../spintrcritical_support/intrcritical.c + +dist_rtems_tests_DATA = spintrcritical01.scn +dist_rtems_tests_DATA += spintrcritical01.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spintrcritical01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support +AM_CPPFLAGS += -DFIFO_NO_TIMEOUT + +LINK_OBJS = $(spintrcritical01_OBJECTS) $(spintrcritical01_LDADD) +LINK_LIBS = $(spintrcritical01_LDLIBS) + +spintrcritical01$(EXEEXT): $(spintrcritical01_OBJECTS) $(spintrcritical01_DEPENDENCIES) + @rm -f spintrcritical01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical01/init.c b/testsuites/sptests/spintrcritical01/init.c new file mode 100644 index 0000000000..7b888c19b3 --- /dev/null +++ b/testsuites/sptests/spintrcritical01/init.c @@ -0,0 +1,144 @@ +/* + * 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. + * + * $Id$ + */ + +#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1 +#include <tmacros.h> +#include <intrcritical.h> + +#if defined(FIFO_NO_TIMEOUT) + #define TEST_NAME "01" + #define TEST_STRING "FIFO/Without Timeout" + #define SEMAPHORE_OBTAIN_TIMEOUT 0 + #define SEMAPHORE_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES + +#elif defined(FIFO_WITH_TIMEOUT) + #define TEST_NAME "02" + #define TEST_STRING "FIFO/With Timeout" + #define SEMAPHORE_OBTAIN_TIMEOUT 10 + #define SEMAPHORE_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES + +#elif defined(PRIORITY_NO_TIMEOUT) + #define TEST_NAME "03" + #define TEST_STRING "Priority/Without Timeout" + #define SEMAPHORE_OBTAIN_TIMEOUT 0 + #define SEMAPHORE_ATTRIBUTES RTEMS_PRIORITY + +#elif defined(PRIORITY_WITH_TIMEOUT) + #define TEST_NAME "04" + #define TEST_STRING "Priority/With Timeout" + #define SEMAPHORE_OBTAIN_TIMEOUT 10 + #define SEMAPHORE_ATTRIBUTES RTEMS_PRIORITY + +#elif defined(PRIORITY_NO_TIMEOUT_REVERSE) + #define TEST_NAME "05" + #define TEST_STRING "Priority/Without Timeout (Reverse)" + #define SEMAPHORE_OBTAIN_TIMEOUT 0 + #define SEMAPHORE_ATTRIBUTES RTEMS_PRIORITY + +#else + + #error "Test Mode not defined" +#endif + +rtems_id Main_task; +rtems_id Semaphore; +volatile bool case_hit; + +Thread_blocking_operation_States getState(void) +{ + Objects_Locations location; + Semaphore_Control *sem; + + sem = (Semaphore_Control *)_Objects_Get( + &_Semaphore_Information, Semaphore, &location ); + if ( location != OBJECTS_LOCAL ) { + puts( "Bad object lookup" ); + rtems_test_exit(0); + } + _Thread_Unnest_dispatch(); + + return sem->Core_control.semaphore.Wait_queue.sync_state; +} + +rtems_timer_service_routine test_release_from_isr( + rtems_id timer, + void *arg +) +{ + rtems_status_code status; + + if ( getState() == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { + case_hit = true; + } + status = rtems_semaphore_release( Semaphore ); +} + + + +rtems_task Init( + rtems_task_argument ignored +) +{ + rtems_status_code status; + + puts( "\n\n*** TEST INTERRUPT CRITICAL SECTION " TEST_NAME " ***" ); + + puts( "Init - Trying to generate semaphore release from ISR while blocking" ); + puts( "Init - Variation is: " TEST_STRING ); + status = rtems_semaphore_create( + rtems_build_name( 'S', 'M', '1', ' ' ), + 1, + SEMAPHORE_ATTRIBUTES, + RTEMS_NO_PRIORITY, + &Semaphore + ); + directive_failed( status, "rtems_semaphore_create of SM1" ); + + Main_task = rtems_task_self(); + + interrupt_critical_section_test_support_initialize( test_release_from_isr ); + + case_hit = false; + + while (!case_hit) { + interrupt_critical_section_test_support_delay(); + + status = rtems_semaphore_obtain( + Semaphore, + RTEMS_DEFAULT_OPTIONS, + SEMAPHORE_OBTAIN_TIMEOUT + ); + directive_failed( status, "rtems_semaphore_obtain" ); + } + + puts( "Init - Case hit" ); + + puts( "*** END OF TEST INTERRUPT CRITICAL SECTION " TEST_NAME " ***" ); + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 1 +#define CONFIGURE_MAXIMUM_TIMERS 1 +#define CONFIGURE_MAXIMUM_SEMAPHORES 1 +#if defined(PRIORITY_NO_TIMEOUT_REVERSE) + #define CONFIGURE_INIT_TASK_PRIORITY 250 +#endif +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> + +/* global variables */ diff --git a/testsuites/sptests/spintrcritical01/spintrcritical01.doc b/testsuites/sptests/spintrcritical01/spintrcritical01.doc new file mode 100644 index 0000000000..aa63cbcb03 --- /dev/null +++ b/testsuites/sptests/spintrcritical01/spintrcritical01.doc @@ -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: spintrcritical01 + +directives: + + _Thread_queue_Enqueue_fifo + _Thread_queue_Dequeue_fifo + - interrupt synchronization + +concepts: + ++ Ensure that unblocking a task from an ISR while the task is in the process + of blocking on a thread queue works as expected. diff --git a/testsuites/sptests/spintrcritical01/spintrcritical01.scn b/testsuites/sptests/spintrcritical01/spintrcritical01.scn new file mode 100644 index 0000000000..cb51f99ae7 --- /dev/null +++ b/testsuites/sptests/spintrcritical01/spintrcritical01.scn @@ -0,0 +1,6 @@ +*** TEST INTERRUPT CRITICAL SECTION 01 *** +Init - Trying to generate semaphore release from ISR while blocking +Init - Variation is: FIFO/Without Timeout +Support - rtems_timer_create - creating timer 1 +Init - Case hit +*** END OF TEST INTERRUPT CRITICAL SECTION 01 *** diff --git a/testsuites/sptests/spintrcritical02/.cvsignore b/testsuites/sptests/spintrcritical02/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spintrcritical02/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spintrcritical02/Makefile.am b/testsuites/sptests/spintrcritical02/Makefile.am new file mode 100644 index 0000000000..8c640ec701 --- /dev/null +++ b/testsuites/sptests/spintrcritical02/Makefile.am @@ -0,0 +1,31 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spintrcritical02 +spintrcritical02_SOURCES = ../spintrcritical01/init.c \ + ../spintrcritical_support/intrcritical.c + +dist_rtems_tests_DATA = spintrcritical02.scn +dist_rtems_tests_DATA += spintrcritical02.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spintrcritical02_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support +AM_CPPFLAGS += -DFIFO_WITH_TIMEOUT + +LINK_OBJS = $(spintrcritical02_OBJECTS) $(spintrcritical02_LDADD) +LINK_LIBS = $(spintrcritical02_LDLIBS) + +spintrcritical02$(EXEEXT): $(spintrcritical02_OBJECTS) $(spintrcritical02_DEPENDENCIES) + @rm -f spintrcritical02$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical02/spintrcritical02.doc b/testsuites/sptests/spintrcritical02/spintrcritical02.doc new file mode 100644 index 0000000000..182e010fe8 --- /dev/null +++ b/testsuites/sptests/spintrcritical02/spintrcritical02.doc @@ -0,0 +1,26 @@ +# +# $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: spintrcritical02 + +directives: + + _Thread_queue_Enqueue_fifo + _Thread_queue_Dequeue_fifo + - interrupt synchronization + +concepts: + ++ Ensure that unblocking a task from an ISR while the task is in the process + of blocking on a thread queue works as expected. This test adds that the + blocking operation has a timeout option. diff --git a/testsuites/sptests/spintrcritical02/spintrcritical02.scn b/testsuites/sptests/spintrcritical02/spintrcritical02.scn new file mode 100644 index 0000000000..ed16ba3f43 --- /dev/null +++ b/testsuites/sptests/spintrcritical02/spintrcritical02.scn @@ -0,0 +1,6 @@ +*** TEST INTERRUPT CRITICAL SECTION 02 *** +Init - Trying to generate semaphore release from ISR while blocking +Init - Variation is: FIFO/With Timeout +Support - rtems_timer_create - creating timer 1 +Init - Case hit +*** END OF TEST INTERRUPT CRITICAL SECTION 02 *** diff --git a/testsuites/sptests/spintrcritical03/.cvsignore b/testsuites/sptests/spintrcritical03/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spintrcritical03/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spintrcritical03/Makefile.am b/testsuites/sptests/spintrcritical03/Makefile.am new file mode 100644 index 0000000000..5375034f62 --- /dev/null +++ b/testsuites/sptests/spintrcritical03/Makefile.am @@ -0,0 +1,31 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spintrcritical03 +spintrcritical03_SOURCES = ../spintrcritical01/init.c \ + ../spintrcritical_support/intrcritical.c + +dist_rtems_tests_DATA = spintrcritical03.scn +dist_rtems_tests_DATA += spintrcritical03.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spintrcritical03_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support +AM_CPPFLAGS += -DPRIORITY_NO_TIMEOUT + +LINK_OBJS = $(spintrcritical03_OBJECTS) $(spintrcritical03_LDADD) +LINK_LIBS = $(spintrcritical03_LDLIBS) + +spintrcritical03$(EXEEXT): $(spintrcritical03_OBJECTS) $(spintrcritical03_DEPENDENCIES) + @rm -f spintrcritical03$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical03/spintrcritical03.doc b/testsuites/sptests/spintrcritical03/spintrcritical03.doc new file mode 100644 index 0000000000..71b9a2a97d --- /dev/null +++ b/testsuites/sptests/spintrcritical03/spintrcritical03.doc @@ -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: spintrcritical03 + +directives: + + _Thread_queue_Enqueue_priority + _Thread_queue_Dequeue_priority + - interrupt synchronization + +concepts: + ++ Ensure that unblocking a task from an ISR while the task is in the process + of blocking on a thread queue works as expected. diff --git a/testsuites/sptests/spintrcritical03/spintrcritical03.scn b/testsuites/sptests/spintrcritical03/spintrcritical03.scn new file mode 100644 index 0000000000..65b8eace3b --- /dev/null +++ b/testsuites/sptests/spintrcritical03/spintrcritical03.scn @@ -0,0 +1,6 @@ +*** TEST INTERRUPT CRITICAL SECTION 03 *** +Init - Trying to generate semaphore release from ISR while blocking +Init - Variation is: Priority/Without Timeout +Support - rtems_timer_create - creating timer 1 +Init - Case hit +*** END OF TEST INTERRUPT CRITICAL SECTION 03 *** diff --git a/testsuites/sptests/spintrcritical04/.cvsignore b/testsuites/sptests/spintrcritical04/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spintrcritical04/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spintrcritical04/Makefile.am b/testsuites/sptests/spintrcritical04/Makefile.am new file mode 100644 index 0000000000..9bfca1a294 --- /dev/null +++ b/testsuites/sptests/spintrcritical04/Makefile.am @@ -0,0 +1,31 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spintrcritical04 +spintrcritical04_SOURCES = ../spintrcritical01/init.c \ + ../spintrcritical_support/intrcritical.c + +dist_rtems_tests_DATA = spintrcritical04.scn +dist_rtems_tests_DATA += spintrcritical04.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spintrcritical04_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support +AM_CPPFLAGS += -DPRIORITY_WITH_TIMEOUT + +LINK_OBJS = $(spintrcritical04_OBJECTS) $(spintrcritical04_LDADD) +LINK_LIBS = $(spintrcritical04_LDLIBS) + +spintrcritical04$(EXEEXT): $(spintrcritical04_OBJECTS) $(spintrcritical04_DEPENDENCIES) + @rm -f spintrcritical04$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical04/spintrcritical04.doc b/testsuites/sptests/spintrcritical04/spintrcritical04.doc new file mode 100644 index 0000000000..eecca2ffe3 --- /dev/null +++ b/testsuites/sptests/spintrcritical04/spintrcritical04.doc @@ -0,0 +1,26 @@ +# +# $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: spintrcritical04 + +directives: + + _Thread_queue_Enqueue_priority + _Thread_queue_Dequeue_priority + - interrupt synchronization + +concepts: + ++ Ensure that unblocking a task from an ISR while the task is in the process + of blocking on a thread queue works as expected. This test adds that the + blocking operation has a timeout option. diff --git a/testsuites/sptests/spintrcritical04/spintrcritical04.scn b/testsuites/sptests/spintrcritical04/spintrcritical04.scn new file mode 100644 index 0000000000..39c54dcefa --- /dev/null +++ b/testsuites/sptests/spintrcritical04/spintrcritical04.scn @@ -0,0 +1,6 @@ +*** TEST INTERRUPT CRITICAL SECTION 04 *** +Init - Trying to generate semaphore release from ISR while blocking +Init - Variation is: Priority/With Timeout +Support - rtems_timer_create - creating timer 1 +Init - Case hit +*** END OF TEST INTERRUPT CRITICAL SECTION 04 *** diff --git a/testsuites/sptests/spintrcritical05/.cvsignore b/testsuites/sptests/spintrcritical05/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spintrcritical05/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spintrcritical05/Makefile.am b/testsuites/sptests/spintrcritical05/Makefile.am new file mode 100644 index 0000000000..3787ee82f9 --- /dev/null +++ b/testsuites/sptests/spintrcritical05/Makefile.am @@ -0,0 +1,31 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spintrcritical05 +spintrcritical05_SOURCES = ../spintrcritical01/init.c \ + ../spintrcritical_support/intrcritical.c + +dist_rtems_tests_DATA = spintrcritical05.scn +dist_rtems_tests_DATA += spintrcritical05.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spintrcritical05_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support +AM_CPPFLAGS += -DPRIORITY_NO_TIMEOUT_REVERSE + +LINK_OBJS = $(spintrcritical05_OBJECTS) $(spintrcritical05_LDADD) +LINK_LIBS = $(spintrcritical05_LDLIBS) + +spintrcritical05$(EXEEXT): $(spintrcritical05_OBJECTS) $(spintrcritical05_DEPENDENCIES) + @rm -f spintrcritical05$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical05/spintrcritical05.doc b/testsuites/sptests/spintrcritical05/spintrcritical05.doc new file mode 100644 index 0000000000..86dd854cce --- /dev/null +++ b/testsuites/sptests/spintrcritical05/spintrcritical05.doc @@ -0,0 +1,28 @@ +# +# $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: spintrcritical05 + +directives: + + _Thread_queue_Enqueue_priorithy + _Thread_queue_Dequeue_priorithy + - interrupt synchronization + +concepts: + ++ Ensure that unblocking a task from an ISR while the task is in the process + of blocking on a thread queue works as expected. This test adds the + variation that the blocking task is of a priority that requires a reverse + search. + diff --git a/testsuites/sptests/spintrcritical05/spintrcritical05.scn b/testsuites/sptests/spintrcritical05/spintrcritical05.scn new file mode 100644 index 0000000000..407e7de2a2 --- /dev/null +++ b/testsuites/sptests/spintrcritical05/spintrcritical05.scn @@ -0,0 +1,6 @@ +*** TEST INTERRUPT CRITICAL SECTION 05 *** +Init - Trying to generate semaphore release from ISR while blocking +Init - Variation is: Priority/Without Timeout (Reverse) +Support - rtems_timer_create - creating timer 1 +Init - Case hit +*** END OF TEST INTERRUPT CRITICAL SECTION 01 *** |