forked from Imagelibrary/rtems
2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new test to exercise malloc_get_statistics(). * malloc05/.cvsignore, malloc05/Makefile.am, malloc05/init.c, malloc05/malloc05.doc, malloc05/malloc05.scn: New files.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac: Add new test to exercise
|
||||
malloc_get_statistics().
|
||||
* malloc05/.cvsignore, malloc05/Makefile.am, malloc05/init.c,
|
||||
malloc05/malloc05.doc, malloc05/malloc05.scn: New files.
|
||||
|
||||
2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
PR 1535/tests
|
||||
|
||||
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
SUBDIRS = POSIX
|
||||
|
||||
SUBDIRS += bspcmdline01 cpuuse gxx01 \
|
||||
malloctest malloc02 malloc03 malloc04 heapwalk \
|
||||
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
|
||||
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
|
||||
termios termios01 termios02 termios03 termios04 termios05 termios06 \
|
||||
rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
|
||||
|
||||
@@ -51,6 +51,7 @@ malloctest/Makefile
|
||||
malloc02/Makefile
|
||||
malloc03/Makefile
|
||||
malloc04/Makefile
|
||||
malloc05/Makefile
|
||||
monitor/Makefile
|
||||
monitor02/Makefile
|
||||
putenvtest/Makefile
|
||||
|
||||
2
testsuites/libtests/malloc05/.cvsignore
Normal file
2
testsuites/libtests/malloc05/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
26
testsuites/libtests/malloc05/Makefile.am
Normal file
26
testsuites/libtests/malloc05/Makefile.am
Normal file
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = malloc05
|
||||
malloc05_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = malloc05.scn
|
||||
dist_rtems_tests_DATA += malloc05.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
|
||||
|
||||
LINK_OBJS = $(malloc05_OBJECTS) $(malloc05_LDADD)
|
||||
LINK_LIBS = $(malloc05_LDLIBS)
|
||||
|
||||
malloc05$(EXEEXT): $(malloc05_OBJECTS) $(malloc05_DEPENDENCIES)
|
||||
@rm -f malloc05$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
49
testsuites/libtests/malloc05/init.c
Normal file
49
testsuites/libtests/malloc05/init.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 <rtems/malloc.h>
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
int sc;
|
||||
rtems_malloc_statistics_t stats;
|
||||
|
||||
puts( "\n\n*** TEST MALLOC05 ***" );
|
||||
|
||||
puts( "malloc_get_statistics( NULL ) - returns -1" );
|
||||
sc = malloc_get_statistics( NULL );
|
||||
rtems_test_assert( sc == -1 );
|
||||
|
||||
puts( "malloc_get_statistics( &stats ) - returns -0" );
|
||||
sc = malloc_get_statistics( &stats );
|
||||
rtems_test_assert( sc == 0 );
|
||||
|
||||
puts( "*** END OF TEST MALLOC05 ***" );
|
||||
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
/* end of file */
|
||||
22
testsuites/libtests/malloc05/malloc05.doc
Normal file
22
testsuites/libtests/malloc05/malloc05.doc
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# $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: malloc05
|
||||
|
||||
directives:
|
||||
|
||||
malloc_get_statistics
|
||||
|
||||
concepts:
|
||||
|
||||
+ Fully exercise malloc_get_statistics.
|
||||
4
testsuites/libtests/malloc05/malloc05.scn
Normal file
4
testsuites/libtests/malloc05/malloc05.scn
Normal file
@@ -0,0 +1,4 @@
|
||||
*** TEST MALLOC05 ***
|
||||
malloc_get_statistics( NULL ) - returns -1
|
||||
malloc_get_statistics( &stats ) - returns -0
|
||||
*** END OF TEST MALLOC05 ***
|
||||
Reference in New Issue
Block a user