summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/malloctest/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/libtests/malloctest/init.c')
-rw-r--r--testsuites/libtests/malloctest/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
index acf25d7cc5..6123977ff7 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -1375,6 +1375,9 @@ static void test_early_malloc( void )
{
void *p;
char *q;
+ void *r;
+ void *s;
+ void *t;
p = malloc( 1 );
rtems_test_assert( p != NULL );
@@ -1387,6 +1390,20 @@ static void test_early_malloc( void )
rtems_test_assert( q[0] == 0 );
free( q );
+
+ r = realloc( q, 128 );
+ rtems_test_assert( r == q );
+
+ s = malloc( 1 );
+ rtems_test_assert( s != NULL );
+
+ free( s );
+
+ t = realloc( r, 256 );
+ rtems_test_assert( t != NULL );
+ rtems_test_assert( t != r );
+
+ free( t );
}
RTEMS_SYSINIT_ITEM(