[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] tests: use g_usleep instead of rem = sleep(
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFC PATCH] tests: use g_usleep instead of rem = sleep(time) |
Date: |
Wed, 16 Jan 2019 08:22:48 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/14/19 9:46 PM, Alex Bennée wrote:
> Relying on sleep to always return having slept isn't safe as a signal
> may have occurred. If signals are constantly incoming the program will
> never reach it's termination condition. This is believed to be the
> mechanism causing time outs for qht-test in Travis.
>
> The glib g_usleep() deals with all of this for us so lets use it instead.
>
> Signed-off-by: Alex Bennée <address@hidden>
> ---
> tests/atomic64-bench.c | 6 ++----
> tests/atomic_add-bench.c | 6 ++----
> tests/qht-bench.c | 6 ++----
> 3 files changed, 6 insertions(+), 12 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~