From 0622bde3bf22926544c1aaef4c01dfa23d79f26e Mon Sep 17 00:00:00 2001 From: Enjia Mai Date: Sat, 8 May 2021 23:35:39 +0800 Subject: [PATCH] tests: condvar: fix one testcase failure on qemu_cortex_a53_smp After enabled FPU context switch, one condvar testcase failed due to the order of spawning thread cannot be guaranteed. Add a delay to make sure the thread which initializing the condvar run first. Signed-off-by: Enjia Mai --- tests/kernel/condvar/condvar_api/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kernel/condvar/condvar_api/src/main.c b/tests/kernel/condvar/condvar_api/src/main.c index 861d1c8c13d..57938d06785 100644 --- a/tests/kernel/condvar/condvar_api/src/main.c +++ b/tests/kernel/condvar/condvar_api/src/main.c @@ -153,7 +153,7 @@ void test_condvar_wait_forever_wake(void) k_thread_create(&condvar_wake_tid, condvar_wake_stack, STACK_SIZE, condvar_wake_task, &woken, NULL, NULL, - PRIO_WAKE, K_USER | K_INHERIT_PERMS, K_NO_WAIT); + PRIO_WAKE, K_USER | K_INHERIT_PERMS, K_MSEC(1)); /* giving time for the condvar_wake_task * and condvar_wait_wake_task to execute