aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/testdyn.c10
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.*/
}