Browse Source

MT#56374 cap sleep time under ASAN

We don't have functioning thread cancellation under ASAN. Make sure our
timer threads don't sleep too long so that the tests don't time out.

Change-Id: Iced6396fc500942ae64dfe8d8a5fb81c6a5e9619
pull/1692/head
Richard Fuchs 2 years ago
parent
commit
0fd8117434
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      daemon/helpers.c

+ 3
- 0
daemon/helpers.c View File

@ -316,6 +316,9 @@ static void thread_looper_helper(void *fp) {
g_slice_free1(sizeof(*lhp), lhp);
long long interval_us = lh.interval_us;
#ifdef ASAN_BUILD
interval_us = MIN(interval_us, 100000);
#endif
static const long long warn_limit_pct = 20; // 20%
long long warn_limit_us = interval_us * warn_limit_pct / 100;


Loading…
Cancel
Save