summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 13:43:17 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 13:43:17 +0000
commitcf7267cfc2f00f412329fed32173d8a6b2982780 (patch)
tree5e20607a7b080f840ac18714abfaaf1e7df5e473
parent2009-07-04 Santosh G Vattam <vattam.santosh@gmail.com> (diff)
downloadrtems-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.
-rw-r--r--testsuites/sptests/ChangeLog9
-rw-r--r--testsuites/sptests/Makefile.am4
-rw-r--r--testsuites/sptests/configure.ac1
-rw-r--r--testsuites/sptests/spfatal11/init.c3
-rw-r--r--testsuites/sptests/spfatal12/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal12/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal12/init.c38
-rw-r--r--testsuites/sptests/spfatal12/spfatal12.doc22
-rw-r--r--testsuites/sptests/spfatal12/spfatal12.scn2
9 files changed, 106 insertions, 4 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index e91da50083..2e0b32dfa1 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp54/init.c, sp54/sp54.doc: Add test for Workspace zeroed.
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 6f981673a2..e5ef12526f 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -9,9 +9,9 @@ SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 sp40 sp41 sp42 sp43 sp44 \
sp45 sp46 sp47 sp48 sp49 sp50 sp51 sp52 sp53 sp54 \
+ spchain spobjgetnext spprintk spsize spstkalloc spwatchdog spwkspace \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
- spfatal08 spfatal09 spfatal10 spfatal11 spchain spobjgetnext spprintk \
- spsize spstkalloc spwatchdog spwkspace
+ spfatal08 spfatal09 spfatal10 spfatal11 spfatal12
DIST_SUBDIRS = $(SUBDIRS) spfatal spfatal_support
EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 98e6b39fff..86a9e30198 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -92,6 +92,7 @@ spfatal08/Makefile
spfatal09/Makefile
spfatal10/Makefile
spfatal11/Makefile
+spfatal12/Makefile
spobjgetnext/Makefile
spprintk/Makefile
spsize/Makefile
diff --git a/testsuites/sptests/spfatal11/init.c b/testsuites/sptests/spfatal11/init.c
index 13e83be900..b7ba85b5f5 100644
--- a/testsuites/sptests/spfatal11/init.c
+++ b/testsuites/sptests/spfatal11/init.c
@@ -20,9 +20,8 @@ rtems_task Init(
{
puts( "\n\n*** TEST FATAL 11 ***" );
- puts( "asserting with non-NULL strings...\n" );
+ puts( "asserting with non-NULL strings..." );
__assert_func( __FILE__, __LINE__, NULL, "forced" );
-
}
/* configuration information */
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