diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-04-15 20:37:27 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-04-15 20:37:27 +0000 |
commit | 1f5d676018f3657d687d98b5401383b884fe0630 (patch) | |
tree | e15c90f2315af04ef122bd82bd344ab2e492645d | |
parent | 339c8e993d31bc1585ade9d6b1e04d4bdceae630 (diff) | |
download | ChibiOS-1f5d676018f3657d687d98b5401383b884fe0630.tar.gz ChibiOS-1f5d676018f3657d687d98b5401383b884fe0630.tar.bz2 ChibiOS-1f5d676018f3657d687d98b5401383b884fe0630.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@901 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | test/testdyn.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/testdyn.c b/test/testdyn.c index 3653e7299..74b5fa42e 100644 --- a/test/testdyn.c +++ b/test/testdyn.c @@ -46,6 +46,8 @@ static void dyn1_execute(void) { prio-1, thread, "A");
threads[1] = chThdCreateFromHeap(THD_WA_SIZE(THREADS_STACK_SIZE),
prio-2, thread, "B");
+ threads[2] = chThdCreateFromHeap(THD_WA_SIZE(0x10000000),
+ prio-3, thread, "C");
test_assert((threads[0] != NULL) &&
(threads[1] != NULL) &&
@@ -90,7 +92,7 @@ static void dyn2_execute(void) { tprio_t prio = chThdGetPriority();
/* Adding the WAs to the pool. */
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 4; i++)
chPoolFree(&mp1, wa[i]);
/* Starting threads from the memory pool. */
@@ -104,15 +106,15 @@ static void dyn2_execute(void) { (threads[1] != NULL) &&
(threads[2] != NULL) &&
(threads[3] != NULL) &&
- (threads[4] != NULL),
+ (threads[4] == NULL),
"#1"); /* Thread creation failed.*/
/* Claiming the memory from terminated threads. */
test_wait_threads();
- test_assert_sequence("ABCDE");
+ test_assert_sequence("ABCD");
/* Now the pool must be full again. */
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 4; i++)
test_assert(chPoolAlloc(&mp1) != NULL, "#2"); /* Pool list empty.*/
test_assert(chPoolAlloc(&mp1) == NULL, "#3"); /* Pool list not empty.*/
}
|