summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 14:45:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 14:45:10 +0000
commitad7e2f02f09154451702232e2ee863cf74a5938b (patch)
treec39a8fe0d1ee8ea7856515d11d983d32e0e10a8d /testsuites
parent2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-ad7e2f02f09154451702232e2ee863cf74a5938b.tar.bz2
2010-07-27 Bharath Suri <bharath.s.jois@gmail.com>
PR 1631/testing * gxx02/init.c, gxx02/gxx02.scn, gxx02/gxx02.doc, gxx02/Makefile.am, gxx02/gxx_wrappers.h: New test added * Makefile.am, configure.ac: Changes to accommodate new tests
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/ChangeLog7
-rw-r--r--testsuites/libtests/Makefile.am2
-rw-r--r--testsuites/libtests/configure.ac1
-rw-r--r--testsuites/libtests/gxx02/.cvsignore2
-rw-r--r--testsuites/libtests/gxx02/Makefile.am27
-rw-r--r--testsuites/libtests/gxx02/gxx02.doc23
-rw-r--r--testsuites/libtests/gxx02/gxx02.scn6
-rw-r--r--testsuites/libtests/gxx02/init.c56
8 files changed, 123 insertions, 1 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog
index 4099218aaf..d6f7175a0f 100644
--- a/testsuites/libtests/ChangeLog
+++ b/testsuites/libtests/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-27 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1631/testing
+ * gxx02/init.c, gxx02/gxx02.scn, gxx02/gxx02.doc,
+ gxx02/Makefile.am, gxx02/gxx_wrappers.h: New test added
+ * Makefile.am, configure.ac: Changes to accommodate new tests
+
2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1632/testing
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index f1f5fa5bda..7deac6b08c 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = POSIX
SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
- devnullfatal01 gxx01 \
+ devnullfatal01 gxx01 gxx02 \
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
termios termios01 termios02 termios03 termios04 termios05 \
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index ff3b9cff5a..1e5cc9822c 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -51,6 +51,7 @@ devfs03/Makefile
devfs04/Makefile
devnullfatal01/Makefile
gxx01/Makefile
+gxx02/Makefile
heapwalk/Makefile
malloctest/Makefile
malloc02/Makefile
diff --git a/testsuites/libtests/gxx02/.cvsignore b/testsuites/libtests/gxx02/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/libtests/gxx02/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/libtests/gxx02/Makefile.am b/testsuites/libtests/gxx02/Makefile.am
new file mode 100644
index 0000000000..c5716deedc
--- /dev/null
+++ b/testsuites/libtests/gxx02/Makefile.am
@@ -0,0 +1,27 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = gxx02
+gxx02_SOURCES = init.c
+
+dist_rtems_tests_DATA = gxx02.scn
+dist_rtems_tests_DATA += gxx02.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
+AM_CPPFLAGS += -I$(top_srcdir)/gxx01
+
+LINK_OBJS = $(gxx02_OBJECTS) $(gxx02_LDADD)
+LINK_LIBS = $(gxx02_LDLIBS)
+
+gxx02$(EXEEXT): $(gxx02_OBJECTS) $(gxx02_DEPENDENCIES)
+ @rm -f gxx02$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/gxx02/gxx02.doc b/testsuites/libtests/gxx02/gxx02.doc
new file mode 100644
index 0000000000..bbedaa1cfc
--- /dev/null
+++ b/testsuites/libtests/gxx02/gxx02.doc
@@ -0,0 +1,23 @@
+#
+# $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: gxx01
+
+directives:
+
+ rtems_gxx_getspecific
+
+concepts:
+
++ Exercise an error path in the rtems_gxx_getspecific() routine,
+leading to a rtems_panic
diff --git a/testsuites/libtests/gxx02/gxx02.scn b/testsuites/libtests/gxx02/gxx02.scn
new file mode 100644
index 0000000000..0ed0b038d5
--- /dev/null
+++ b/testsuites/libtests/gxx02/gxx02.scn
@@ -0,0 +1,6 @@
+*** TEST GXX 02 ***
+Init - allocating most of workspace memory
+rtems_gxx_getspecific() - panic and exit
+*** END OF TEST GXX 02 ***
+rtems_gxx_getspecific
+fatal error, exiting
diff --git a/testsuites/libtests/gxx02/init.c b/testsuites/libtests/gxx02/init.c
new file mode 100644
index 0000000000..babf4e6b77
--- /dev/null
+++ b/testsuites/libtests/gxx02/init.c
@@ -0,0 +1,56 @@
+/*
+ * 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 <tmacros.h>
+#include "test_support.h"
+#include "gxx_wrappers.h"
+#include <rtems/score/heap.h>
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+
+ void *alloc_ptr = (void *)0;
+ Heap_Information_block Info;
+ __gthread_key_t key = 0;
+ int status = 0;
+ void *retptr;
+
+ puts( "\n\n*** TEST GXX 02 ***" );
+
+ puts( "Init - allocating most of workspace memory" );
+ status = rtems_workspace_get_information( &Info );
+ rtems_test_assert( status == true );
+ status = rtems_workspace_allocate( Info.Free.largest - 4, &alloc_ptr );
+ rtems_test_assert( status == true );
+
+ puts( "rtems_gxx_getspecific() - panic and exit" );
+
+ puts( "*** END OF TEST GXX 02 ***" );
+
+ /* The below call will not return and hence the END OF above */
+ retptr = rtems_gxx_getspecific( key );
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_SEMAPHORES 2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */