From 1f5d676018f3657d687d98b5401383b884fe0630 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 15 Apr 2009 20:37:27 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@901 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/testdyn.c | 10 ++++++---- 1 file 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.*/ } -- cgit v1.2.3