From 81110848dcb5ed0c1373464e02777708f02d30af Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Tue, 22 Jun 2010 18:09:04 +0000 Subject: 2010-06-22 Jennifer Averett * malloctest/init.c: Added test to check failure branch on calloc. --- testsuites/libtests/ChangeLog | 4 ++++ testsuites/libtests/malloctest/init.c | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'testsuites') diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index bc05468c42..7d7a36786b 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,7 @@ +2010-06-22 Jennifer Averett + + * malloctest/init.c: Added test to check failure branch on calloc. + 2010-06-21 Joel Sherrill * malloc02/init.c, malloc02/malloc02.doc: Enable malloc dirty helper. diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 625e9569bb..cdb4791060 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -1076,6 +1076,7 @@ rtems_task Init( rtems_task_argument argument ) { + void *p1; rtems_time_of_day time; rtems_status_code status; @@ -1085,6 +1086,12 @@ rtems_task Init( status = rtems_clock_set( &time ); directive_failed( status, "rtems_clock_set" ); + p1 = calloc( 1, SIZE_MAX ); + if (p1) { + printf("ERROR on attempt to calloc SIZE_MAX block expected failure."); + free( p1 ); + } + test_heap_initialize(); test_heap_block_allocate(); test_heap_allocate(); -- cgit v1.2.3