testsuite/smokey: posix-mutex:
PATCH 1/1 testsuite/smokey: posix-mutex:
From: Jan Kiszka <[email protected]>
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. Expand to 100 ms then.
Signed-off-by Jan Kiszka <[email protected]>
--- testsuite/smokey/posix-mutex/posix-mutex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
testsuite/smokey/posix-mutex/posix-mutex.c +2 -1
@@ -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 100ms in VM) from now */ +timespec_adds (&ts, &now, smokey_on_vm ?100000000 :5000000 );if (p->barrier)smokey_barrier_release (p->barrier);
Signature · 1 line
2.26.2
Quoted 17 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
When running in QEMU, the 5 ms holding time of
mutex_timed_lockermay be too short when the host is busy. This occasionally leads to failing tests in our CI. Expand to 100 ms then.Signed-off-by Jan Kiszka <[email protected]>--- testsuite/smokey/posix-mutex/posix-mutex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)testsuite/smokey/posix-mutex/posix-mutex.c +0
-0
testsuite/smokey/posix-mutex/posix-mutex.c static void *mutex_timed_locker(void *arg) · line 177
Quoted 9 lines
testsuite/smokey/posix-mutex/posix-mutex.c +2
-1@@ -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 100ms in VM) from now */ +timespec_adds (&ts, &now, smokey_on_vm ?100000000 :5000000 );if (p->barrier)smokey_barrier_release (p->barrier);
Argh, unfinished subject:
"testsuite/smokey: posix-mutex: Expand mutex holding time when running in VM"
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux