diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-06 01:53:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-06 01:53:09 +0000 |
commit | bfaa6d3ec11b134afa4e34b63860db874ad12334 (patch) | |
tree | 7c6783b820fb61c0295561b2f5d2d7cca0164f30 /testsuites/sptests/spfatal20 | |
parent | 2010-07-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-bfaa6d3ec11b134afa4e34b63860db874ad12334.tar.bz2 |
2010-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new fatal error test for termios
initialize.
* spfatal20/.cvsignore, spfatal20/Makefile.am, spfatal20/spfatal20.doc,
spfatal20/spfatal20.scn, spfatal20/testcase.h: New files.
Diffstat (limited to 'testsuites/sptests/spfatal20')
-rw-r--r-- | testsuites/sptests/spfatal20/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal20/Makefile.am | 29 | ||||
-rw-r--r-- | testsuites/sptests/spfatal20/spfatal20.doc | 22 | ||||
-rw-r--r-- | testsuites/sptests/spfatal20/spfatal20.scn | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal20/testcase.h | 29 |
5 files changed, 84 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal20/.cvsignore b/testsuites/sptests/spfatal20/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spfatal20/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spfatal20/Makefile.am b/testsuites/sptests/spfatal20/Makefile.am new file mode 100644 index 0000000000..4faca8f716 --- /dev/null +++ b/testsuites/sptests/spfatal20/Makefile.am @@ -0,0 +1,29 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spfatal20 +spfatal20_SOURCES = ../spfatal_support/init.c \ + ../spfatal_support/consume_sems.c \ + ../spfatal_support/system.h testcase.h + +dist_rtems_tests_DATA = spfatal20.scn +dist_rtems_tests_DATA += spfatal20.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 +AM_CPPFLAGS += -DSEMAPHORES_REMAINING=0 + +LINK_OBJS = $(spfatal20_OBJECTS) $(spfatal20_LDADD) +LINK_LIBS = $(spfatal20_LDLIBS) + +spfatal20$(EXEEXT): $(spfatal20_OBJECTS) $(spfatal20_DEPENDENCIES) + @rm -f spfatal20$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spfatal20/spfatal20.doc b/testsuites/sptests/spfatal20/spfatal20.doc new file mode 100644 index 0000000000..7f3847f5b4 --- /dev/null +++ b/testsuites/sptests/spfatal20/spfatal20.doc @@ -0,0 +1,22 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2010. +# 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: spfatal20 + +directives: + + rtems_termios_initialize + +concepts: + ++ fatal error for unable to create a semaphore diff --git a/testsuites/sptests/spfatal20/spfatal20.scn b/testsuites/sptests/spfatal20/spfatal20.scn new file mode 100644 index 0000000000..ae8d11f127 --- /dev/null +++ b/testsuites/sptests/spfatal20/spfatal20.scn @@ -0,0 +1,2 @@ +Fatal error (rtems_termios_initialize cannot create semaphore) hit + diff --git a/testsuites/sptests/spfatal20/testcase.h b/testsuites/sptests/spfatal20/testcase.h new file mode 100644 index 0000000000..566c4bfc36 --- /dev/null +++ b/testsuites/sptests/spfatal20/testcase.h @@ -0,0 +1,29 @@ +/* + * COPYRIGHT (c) 1989-2010. + * 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$ + */ + +/* generate fatal errors in termios.c + * rtems_semaphore_create( rtems_build_name ('T', 'R', 'r', c),...); + */ + +#define FATAL_ERROR_TEST_NAME "20" +#define FATAL_ERROR_DESCRIPTION \ + "rtems_termios_initialize cannot create semaphore" +#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API +#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE +#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY + +#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \ + CONSUME_SEMAPHORE_DRIVERS + +void force_error() +{ + /* we will not run this far */ +} |