diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-26 20:53:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-26 20:53:09 +0000 |
commit | 6b95d5c0f78010c490fe568151be29ab16dcb538 (patch) | |
tree | 468ae51df7b295f623af01e19608c8222aab27ee /testsuites/sptests | |
parent | 2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-6b95d5c0f78010c490fe568151be29ab16dcb538.tar.bz2 |
2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* Makefile.am, configure.ac: New test to get coverage of core mutex
obtain while in ISR or other dispatch disabled critical section but
no wait.
* sp75/.cvsignore, sp75/Makefile.am, sp75/init.c, sp75/sp75.doc,
sp75/sp75.scn: New files.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/ChangeLog | 8 | ||||
-rw-r--r-- | testsuites/sptests/Makefile.am | 2 | ||||
-rw-r--r-- | testsuites/sptests/configure.ac | 1 | ||||
-rw-r--r-- | testsuites/sptests/sp75/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp75/Makefile.am | 26 | ||||
-rw-r--r-- | testsuites/sptests/sp75/init.c | 57 | ||||
-rw-r--r-- | testsuites/sptests/sp75/sp75.doc | 22 | ||||
-rw-r--r-- | testsuites/sptests/sp75/sp75.scn | 1 |
8 files changed, 118 insertions, 1 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index dcd88f2b0e..707398fd1a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,13 @@ 2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> + * Makefile.am, configure.ac: New test to get coverage of core mutex + obtain while in ISR or other dispatch disabled critical section but + no wait. + * sp75/.cvsignore, sp75/Makefile.am, sp75/init.c, sp75/sp75.doc, + sp75/sp75.scn: New files. + +2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> + * sp74/init.c, sp74/sp74.scn: Fix to get the case hit per coverage reports. diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 05f5ed3adf..c2f6d8290f 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = \ sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \ sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \ sp60 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \ - sp70 sp71 sp72 sp73 sp74 \ + sp70 sp71 sp72 sp73 sp74 sp75 \ spassoc01 spchain spclockget spcoverage spobjgetnext \ spnotepad01 spprintk spprivenv01 sprbtree01 spsize spstkalloc \ spthreadq01 spwatchdog spwkspace \ diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 982ade71d8..11875997ea 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -100,6 +100,7 @@ sp71/Makefile sp72/Makefile sp73/Makefile sp74/Makefile +sp75/Makefile spassoc01/Makefile spchain/Makefile spclockget/Makefile diff --git a/testsuites/sptests/sp75/.cvsignore b/testsuites/sptests/sp75/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp75/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp75/Makefile.am b/testsuites/sptests/sp75/Makefile.am new file mode 100644 index 0000000000..badddbc1dd --- /dev/null +++ b/testsuites/sptests/sp75/Makefile.am @@ -0,0 +1,26 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp75 +sp75_SOURCES = init.c + +dist_rtems_tests_DATA = sp75.scn +dist_rtems_tests_DATA += sp75.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 = $(sp75_OBJECTS) $(sp75_LDADD) +LINK_LIBS = $(sp75_LDLIBS) + +sp75$(EXEEXT): $(sp75_OBJECTS) $(sp75_DEPENDENCIES) + @rm -f sp75$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp75/init.c b/testsuites/sptests/sp75/init.c new file mode 100644 index 0000000000..0ce2da2f4c --- /dev/null +++ b/testsuites/sptests/sp75/init.c @@ -0,0 +1,57 @@ +/* + * COPYRIGHT (c) 1989-2011. + * 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 "test_support.h" + +rtems_task Init( + rtems_task_argument argument +) +{ + rtems_status_code sc; + rtems_id mutex; + + puts( "\n\n*** TEST SP75 ***" ); + + sc = rtems_semaphore_create( + rtems_build_name('M', 'U', 'T', 'X'), + 0, + RTEMS_BINARY_SEMAPHORE, + 0, + &mutex + ); + directive_failed(sc, "rtems_semaphore_create"); + + _Thread_Disable_dispatch(); + + sc = rtems_semaphore_obtain(mutex, RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT); + directive_failed(sc, "rtems_semaphore_obtain"); + + _Thread_Enable_dispatch(); + + puts( "*** END OF TEST SP75 ***" ); + 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_SEMAPHORES 1 +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> +/* end of file */ diff --git a/testsuites/sptests/sp75/sp75.doc b/testsuites/sptests/sp75/sp75.doc new file mode 100644 index 0000000000..bfc62e7bd0 --- /dev/null +++ b/testsuites/sptests/sp75/sp75.doc @@ -0,0 +1,22 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2011. +# 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: sp75 + +directives: + + XXX list them + +concepts: + ++ XXX list them diff --git a/testsuites/sptests/sp75/sp75.scn b/testsuites/sptests/sp75/sp75.scn new file mode 100644 index 0000000000..a63612096b --- /dev/null +++ b/testsuites/sptests/sp75/sp75.scn @@ -0,0 +1 @@ +XXX fill in with test output |