diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-06 13:43:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-06 13:43:17 +0000 |
commit | cf7267cfc2f00f412329fed32173d8a6b2982780 (patch) | |
tree | 5e20607a7b080f840ac18714abfaaf1e7df5e473 /testsuites/sptests/spfatal12 | |
parent | 2009-07-04 Santosh G Vattam <vattam.santosh@gmail.com> (diff) | |
download | rtems-cf7267cfc2f00f412329fed32173d8a6b2982780.tar.bz2 |
2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, spfatal11/init.c: Add test of cannot
initialize workspace heap during initialize. Can be caused by
unaligned address or not enough memory to initialize heap required
overhead.
* spfatal12/.cvsignore, spfatal12/Makefile.am, spfatal12/init.c,
spfatal12/spfatal12.doc, spfatal12/spfatal12.scn: New files.
Diffstat (limited to 'testsuites/sptests/spfatal12')
-rw-r--r-- | testsuites/sptests/spfatal12/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal12/Makefile.am | 29 | ||||
-rw-r--r-- | testsuites/sptests/spfatal12/init.c | 38 | ||||
-rw-r--r-- | testsuites/sptests/spfatal12/spfatal12.doc | 22 | ||||
-rw-r--r-- | testsuites/sptests/spfatal12/spfatal12.scn | 2 |
5 files changed, 93 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal12/.cvsignore b/testsuites/sptests/spfatal12/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spfatal12/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/spfatal12/Makefile.am b/testsuites/sptests/spfatal12/Makefile.am new file mode 100644 index 0000000000..6075e02c5b --- /dev/null +++ b/testsuites/sptests/spfatal12/Makefile.am @@ -0,0 +1,29 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = spfatal12 +spfatal12_SOURCES = init.c + +dist_rtems_tests_DATA = spfatal12.scn +dist_rtems_tests_DATA += spfatal12.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +spfatal12_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include +AM_CPPFLAGS += -DUSE_TIMER_SERVER + +LINK_OBJS = $(spfatal12_OBJECTS) $(spfatal12_LDADD) +LINK_LIBS = $(spfatal12_LDLIBS) + +spfatal12$(EXEEXT): $(spfatal12_OBJECTS) $(spfatal12_DEPENDENCIES) + @rm -f spfatal12$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spfatal12/init.c b/testsuites/sptests/spfatal12/init.c new file mode 100644 index 0000000000..2b9d9b7edd --- /dev/null +++ b/testsuites/sptests/spfatal12/init.c @@ -0,0 +1,38 @@ +/* Test fatal error when _Heap_Initialize fails during initialization + * + * 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> + +rtems_task Init( + rtems_task_argument ignored +) +{ + puts( "\n\n*** TEST FATAL 12 ***" ); + + puts( "_Heap_Initialize fails during RTEMS initialization" ); + Configuration.work_space_start = (void *)0x03; + Configuration.work_space_size = sizeof(void *); + rtems_initialize_data_structures(); +} + +/* 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/spfatal12/spfatal12.doc b/testsuites/sptests/spfatal12/spfatal12.doc new file mode 100644 index 0000000000..f075cafc18 --- /dev/null +++ b/testsuites/sptests/spfatal12/spfatal12.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 12 + +directives: + __assert_func + +concepts: + + a. Verify that the __assert_func method works as expected with NULL + function name. diff --git a/testsuites/sptests/spfatal12/spfatal12.scn b/testsuites/sptests/spfatal12/spfatal12.scn new file mode 100644 index 0000000000..2bb7d06c31 --- /dev/null +++ b/testsuites/sptests/spfatal12/spfatal12.scn @@ -0,0 +1,2 @@ +*** TEST FATAL 12 *** +_Heap_Initialize fails during RTEMS initialization |