summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal09/testcase.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-08 19:39:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-08 19:39:14 +0000
commitc33c3532754e33676207f8d43d3eec171c0e0405 (patch)
treedfd1e4e6bef1b02a9623143fe6be5c709027048f /testsuites/sptests/spfatal09/testcase.h
parent2010-07-08 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-c33c3532754e33676207f8d43d3eec171c0e0405.tar.bz2
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.
Diffstat (limited to 'testsuites/sptests/spfatal09/testcase.h')
-rw-r--r--testsuites/sptests/spfatal09/testcase.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal09/testcase.h b/testsuites/sptests/spfatal09/testcase.h
new file mode 100644
index 0000000000..ee87c1e729
--- /dev/null
+++ b/testsuites/sptests/spfatal09/testcase.h
@@ -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 */
+}