diff options
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test.c b/test/test.c index 887d56ecc..5cc11f542 100644 --- a/test/test.c +++ b/test/test.c @@ -164,8 +164,10 @@ void test_wait_threads(void) { int i;
for (i = 0; i < MAX_THREADS; i++)
- if (threads[i])
+ if (threads[i] != NULL) {
chThdWait(threads[i]);
+ threads[i] = NULL;
+ }
}
void test_cpu_pulse(unsigned ms) {
@@ -222,6 +224,8 @@ static void execute_test(const struct testcase *tcp) { tcp->execute();
if (tcp->teardown != NULL)
tcp->teardown();
+
+ test_wait_threads();
}
msg_t TestThread(void *p) {
|