diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-24 06:35:29 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-24 06:35:29 +0000 |
commit | 046f47154f6691db5d4bef5493f63eb609c0e57f (patch) | |
tree | a0529e04d3b924f8facca80460091ad650829cfa /testsuites/sptests/spfatal11 | |
parent | 2009-06-18 Fernando Nicodemos <fgnicodemos@terra.com.br> (diff) | |
download | rtems-046f47154f6691db5d4bef5493f63eb609c0e57f.tar.bz2 |
2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, spprintk/init.c, spprintk/spprintk.scn:
Enhance spprintk. Add two new fatal error tests to cover
__assert_func.
* spfatal11/.cvsignore, spfatal11/Makefile.am, spfatal11/init.c,
spfatal11/spfatal11.doc, spfatal11/spfatal11.scn: New files.
Diffstat (limited to 'testsuites/sptests/spfatal11')
-rw-r--r-- | testsuites/sptests/spfatal11/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/Makefile.am | 29 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/init.c | 39 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/spfatal11.doc | 22 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/spfatal11.scn | 5 |
5 files changed, 97 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal11/.cvsignore b/testsuites/sptests/spfatal11/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spfatal11/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spfatal11/Makefile.am b/testsuites/sptests/spfatal11/Makefile.am new file mode 100644 index 0000000000..0f83be669e --- /dev/null +++ b/testsuites/sptests/spfatal11/Makefile.am @@ -0,0 +1,29 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spfatal11 +spfatal11_SOURCES = init.c + +dist_rtems_tests_DATA = spfatal11.scn +dist_rtems_tests_DATA += spfatal11.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spfatal11_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -DUSE_TIMER_SERVER + +LINK_OBJS = $(spfatal11_OBJECTS) $(spfatal11_LDADD) +LINK_LIBS = $(spfatal11_LDLIBS) + +spfatal11$(EXEEXT): $(spfatal11_OBJECTS) $(spfatal11_DEPENDENCIES) + @rm -f spfatal11$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spfatal11/init.c b/testsuites/sptests/spfatal11/init.c new file mode 100644 index 0000000000..13e83be900 --- /dev/null +++ b/testsuites/sptests/spfatal11/init.c @@ -0,0 +1,39 @@ +/* Test __assert_func with NULL function name + * + * 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$ + */ + +#include <tmacros.h> +#undef NDEBUG +#include <assert.h> + +rtems_task Init( + rtems_task_argument ignored +) +{ + puts( "\n\n*** TEST FATAL 11 ***" ); + + puts( "asserting with non-NULL strings...\n" ); + __assert_func( __FILE__, __LINE__, NULL, "forced" ); + +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 1 +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> + +/* global variables */ diff --git a/testsuites/sptests/spfatal11/spfatal11.doc b/testsuites/sptests/spfatal11/spfatal11.doc new file mode 100644 index 0000000000..1d2ff9dd82 --- /dev/null +++ b/testsuites/sptests/spfatal11/spfatal11.doc @@ -0,0 +1,22 @@ +# +# $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: fatal 11 + +directives: + __assert_func + +concepts: + + a. Verify that the __assert_func method works as expected with NULL + function name. diff --git a/testsuites/sptests/spfatal11/spfatal11.scn b/testsuites/sptests/spfatal11/spfatal11.scn new file mode 100644 index 0000000000..4e8a76f809 --- /dev/null +++ b/testsuites/sptests/spfatal11/spfatal11.scn @@ -0,0 +1,5 @@ +*** TEST FATAL 11 *** +asserting with non-NULL strings... + +assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal11/init.c", line 24 +program stopped with signal 2. |