Commit 44ade7e4 authored by Jan Kiszka's avatar Jan Kiszka
Browse files

testsuite/smokey: posix-mutex: Expand mutex holding time when running in VM



When running in QEMU, the 5 ms holding time of mutex_timed_locker may be
too short when the host is busy. This occasionally leads to failing
tests in our CI:

posix-mutex.c:510, FAILED: get_effective_prio() == prio (=false)

Expand to 50 ms in such setups.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 686126a8
......@@ -170,7 +170,8 @@ static void *mutex_timed_locker(void *arg)
int ret;
clock_gettime(CLOCK_REALTIME, &now);
timespec_adds(&ts, &now, 5000000); /* 5ms from now */
/* 5ms (or 50ms in VM) from now */
timespec_adds(&ts, &now, smokey_on_vm ? 50000000 : 5000000);
if (p->barrier)
smokey_barrier_release(p->barrier);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment