2009-05-07 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac: Add shell of heap walk test for Santosh.
	* heapwalk/.cvsignore, heapwalk/Makefile.am, heapwalk/heapwalk.scn,
	heapwalk/init.c, heapwalk/system.h: New files.
This commit is contained in:
Joel Sherrill
2009-05-07 17:48:15 +00:00
parent 8814cf04cc
commit 56b7951e45
8 changed files with 142 additions and 2 deletions
+6
View File
@@ -1,3 +1,9 @@
2009-05-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add shell of heap walk test for Santosh.
* heapwalk/.cvsignore, heapwalk/Makefile.am, heapwalk/heapwalk.scn,
heapwalk/init.c, heapwalk/system.h: New files.
2009-05-07 Santosh G Vattam <vattam.santosh@gmail.com>
* malloctest/init.c: Add test case for heap resize block when the
+2 -2
View File
@@ -4,8 +4,8 @@
ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = cpuuse malloctest putenvtest monitor monitor02 rtmonuse stackchk termios \
rtems++ tztest
SUBDIRS = cpuuse malloctest heapwalk putenvtest monitor monitor02 rtmonuse \
stackchk termios rtems++ tztest
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am
+1
View File
@@ -34,6 +34,7 @@ AM_CONDITIONAL(HAS_CXX,test "$rtems_cv_HAS_CPLUSPLUS" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
cpuuse/Makefile
heapwalk/Makefile
malloctest/Makefile
monitor/Makefile
monitor02/Makefile
+2
View File
@@ -0,0 +1,2 @@
Makefile
Makefile.in
+27
View File
@@ -0,0 +1,27 @@
##
## $Id$
##
MANAGERS = all
rtems_tests_PROGRAMS = heapwalk
heapwalk_SOURCES = init.c system.h
dist_rtems_tests_DATA = heapwalk.scn
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
heapwalk_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(heapwalk_OBJECTS) $(heapwalk_LDADD)
LINK_LIBS = $(heapwalk_LDLIBS)
heapwalk$(EXEEXT): $(heapwalk_OBJECTS) $(heapwalk_DEPENDENCIES)
@rm -f heapwalk$(EXEEXT)
$(make-exe)
include $(top_srcdir)/../automake/local.am
@@ -0,0 +1,3 @@
*** HEAP WALK TEST ***
Walk freshly initialized heap
*** END OF HEAP WALK TEST ***
+50
View File
@@ -0,0 +1,50 @@
/*
* Test of Heap Walker
*
* COPYRIGHT (c) 1989-2008.
* 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$
*/
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
#define CONFIGURE_INIT
#include "system.h"
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
#include <rtems/score/heap.h>
#define TEST_HEAP_SIZE 1024
uint8_t TestHeapMemory[TEST_HEAP_SIZE];
Heap_Control TestHeap;
void test_heap_init(void)
{
_Heap_Initialize( &TestHeap, TestHeapMemory, TEST_HEAP_SIZE, 0 );
}
void test_walk_freshly_initialized(void)
{
puts( "Walk freshly initialized heap" );
test_heap_init();
_Heap_Walk( &TestHeap, 0x01, true );
}
rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** HEAP WALK TEST ***" );
test_walk_freshly_initialized();
puts( "*** END OF HEAP WALK TEST ***" );
rtems_test_exit(0);
}
+51
View File
@@ -0,0 +1,51 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-1999.
* 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>
/* macros */
/* functions */
rtems_task Init(
rtems_task_argument argument
);
rtems_task Task_1_through_5(
rtems_task_argument argument
);
void blow_stack( void );
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
#define CONFIGURE_EXTRA_TASK_STACKS ((TASK_STACK_SIZE)*5)
#define CONFIGURE_MAXIMUM_TASKS 6
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>
/* global variables */
TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
/* end of include file */