summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/malloctest
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2010-06-22 18:09:04 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2010-06-22 18:09:04 +0000
commit81110848dcb5ed0c1373464e02777708f02d30af (patch)
tree5ffcf3f6db1e935db8767caffca97dcde56ddb13 /testsuites/libtests/malloctest
parent2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-81110848dcb5ed0c1373464e02777708f02d30af.tar.bz2
2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* malloctest/init.c: Added test to check failure branch on calloc.
Diffstat (limited to 'testsuites/libtests/malloctest')
-rw-r--r--testsuites/libtests/malloctest/init.c7
1 files changed, 7 insertions, 0 deletions
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();