Skip to content
Snippets Groups Projects
Unverified Commit 234b363e authored by Kaspar Schleiser's avatar Kaspar Schleiser Committed by GitHub
Browse files

Merge pull request #9032 from cladmi/pr/fix/test/wsn430/mutex_unlock_and_sleep

tests/mutex_unlock_and_sleep: increase timeout
parents 0ca4ffa6 4f252126
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,12 @@ static volatile int indicator;
static kernel_pid_t main_pid;
static char stack[THREAD_STACKSIZE_DEFAULT];
#ifdef BOARD_NATIVE
static const unsigned KITERATIONS = 100;
#else
static const unsigned KITERATIONS = 10;
#endif
static void *second_thread(void *arg)
{
(void) arg;
......@@ -42,6 +48,7 @@ static void *second_thread(void *arg)
int main(void)
{
uint32_t count = 0;
uint32_t kcount = 0;
indicator = 0;
main_pid = thread_getpid();
......@@ -64,8 +71,10 @@ int main(void)
printf("[ERROR] threads did not sleep properly (%d).\n", indicator);
return 1;
}
if ((count % 100000) == 0) {
printf("[ALIVE] alternated %"PRIu32"k times.\n", (count / 1000));
if (count == (KITERATIONS * 1000)) {
count = 0;
kcount += KITERATIONS;
printf("[ALIVE] alternated %"PRIu32"k times.\n", kcount);
}
mutex_unlock_and_sleep(&mutex);
}
......
......@@ -11,7 +11,7 @@ import sys
def testfunc(child):
for i in range(20):
for i in range(10):
child.expect(r"\[ALIVE\] alternated \d+k times.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment