diff options
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/libtests/malloctest/init.c | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index 0c54099423..40c6a85307 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,8 @@ +2010-07-15 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * malloctest/init.c: Added test for + rtems_heap_allocate_aligned_with_boundary(). + 2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.am, configure.ac: Add new test to exercise devFS_Show(). diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 4b88f3b03f..e0cb60be01 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -14,7 +14,7 @@ * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * - * Copyright (c) 2009 embedded brains GmbH. + * Copyright (c) 2009, 2010 embedded brains GmbH. * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -1023,6 +1023,20 @@ static void test_protected_heap_info(void) rtems_test_assert( rc == false ); } +static void test_rtems_heap_allocate_aligned_with_boundary(void) +{ + void *p = NULL; + + p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1); + rtems_test_assert( p != NULL ); + free(p); + + _Thread_Disable_dispatch(); + p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1); + _Thread_Enable_dispatch(); + rtems_test_assert( p == NULL ); +} + /* * A simple test of posix_memalign */ @@ -1108,6 +1122,7 @@ rtems_task Init( test_heap_extend(); test_heap_info(); test_protected_heap_info(); + test_rtems_heap_allocate_aligned_with_boundary(); test_posix_memalign(); |