diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 18:09:04 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 18:09:04 +0000 |
commit | 81110848dcb5ed0c1373464e02777708f02d30af (patch) | |
tree | 5ffcf3f6db1e935db8767caffca97dcde56ddb13 /testsuites/libtests | |
parent | 2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff) | |
download | rtems-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')
-rw-r--r-- | testsuites/libtests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/libtests/malloctest/init.c | 7 |
2 files changed, 11 insertions, 0 deletions
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 <Jennifer.Averett@OARcorp.com> + + * malloctest/init.c: Added test to check failure branch on calloc. + 2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com> * 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(); |