summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-07-15 13:36:25 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-07-15 13:36:25 +0000
commitbe4e3d6fbcc06c0c020bd39a6063a3ae23195d27 (patch)
tree000f508d8e58779a8090a3540b459e0091600a25 /testsuites
parent2010-07-16 Sebastian Huber <Sebastian.Huber@embedded-brains.de> (diff)
downloadrtems-be4e3d6fbcc06c0c020bd39a6063a3ae23195d27.tar.bz2
2010-07-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* malloctest/init.c: Added test for rtems_heap_allocate_aligned_with_boundary().
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/ChangeLog5
-rw-r--r--testsuites/libtests/malloctest/init.c17
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();