2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac: Readd spfatal09 as a malloc initialization
	fatal error.
	* spfatal09/.cvsignore, spfatal09/Makefile.am, spfatal09/spfatal09.doc,
	spfatal09/spfatal09.scn, spfatal09/testcase.h: New files.
This commit is contained in:
Joel Sherrill
2010-07-08 19:39:14 +00:00
parent 21827289f3
commit c33c353275
8 changed files with 92 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Readd spfatal09 as a malloc initialization
fatal error.
* spfatal09/.cvsignore, spfatal09/Makefile.am, spfatal09/spfatal09.doc,
spfatal09/spfatal09.scn, spfatal09/testcase.h: New files.
2010-07-07 Bharath Suri <bharath.s.jois@gmail.com>
PR 1603/testing
+1 -1
View File
@@ -20,7 +20,7 @@ SUBDIRS = \
spwatchdog spwkspace \
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
+1
View File
@@ -112,6 +112,7 @@ spfatal05/Makefile
spfatal06/Makefile
spfatal07/Makefile
spfatal08/Makefile
spfatal09/Makefile
spfatal10/Makefile
spfatal11/Makefile
spfatal12/Makefile
+2
View File
@@ -0,0 +1,2 @@
Makefile
Makefile.in
+25
View File
@@ -0,0 +1,25 @@
##
## $Id$
##
rtems_tests_PROGRAMS = spfatal09
spfatal09_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h \
testcase.h
dist_rtems_tests_DATA = spfatal09.scn
dist_rtems_tests_DATA += spfatal09.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 = $(spfatal09_OBJECTS) $(spfatal09_LDADD)
LINK_LIBS = $(spfatal09_LDLIBS)
spfatal09$(EXEEXT): $(spfatal09_OBJECTS) $(spfatal09_DEPENDENCIES)
@rm -f spfatal09$(EXEEXT)
$(make-exe)
include $(top_srcdir)/../automake/local.am
@@ -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: spfatal09
directives:
RTEMS_Malloc_Initialize
concepts:
+ fatal error for heap initialization failing
@@ -0,0 +1,4 @@
*** TEST FATAL 9 ***
Fatal error (Bad heap address to malloc) hit
*** END OF TEST ***
+30
View File
@@ -0,0 +1,30 @@
/*
* Malloc Initialization Error
*
* 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$
*/
#include <rtems/malloc.h>
#include <rtems/libcsupport.h>
#define FATAL_ERROR_TEST_NAME "9"
#define FATAL_ERROR_DESCRIPTION "Bad heap address to malloc"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_NO_MEMORY
char Malloc_Heap[ 1 ] CPU_STRUCTURE_ALIGNMENT;
void force_error()
{
RTEMS_Malloc_Initialize( Malloc_Heap, sizeof(Malloc_Heap), 0 );
/* we will not run this far */
}