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
This commit is contained in:
Joel Sherrill
2010-07-27 14:45:10 +00:00
parent 8e8775dbad
commit ad7e2f02f0
8 changed files with 123 additions and 1 deletions

View File

@@ -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> 2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1632/testing PR 1632/testing

View File

@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = POSIX SUBDIRS = POSIX
SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \ SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
devnullfatal01 gxx01 \ devnullfatal01 gxx01 gxx02 \
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \ malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \ putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
termios termios01 termios02 termios03 termios04 termios05 \ termios termios01 termios02 termios03 termios04 termios05 \

View File

@@ -51,6 +51,7 @@ devfs03/Makefile
devfs04/Makefile devfs04/Makefile
devnullfatal01/Makefile devnullfatal01/Makefile
gxx01/Makefile gxx01/Makefile
gxx02/Makefile
heapwalk/Makefile heapwalk/Makefile
malloctest/Makefile malloctest/Makefile
malloc02/Makefile malloc02/Makefile

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 */