qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] tests: replace rem = sleep(time) with g_tim


From: Alex Bennée
Subject: Re: [Qemu-devel] [RFC PATCH] tests: replace rem = sleep(time) with g_timer
Date: Fri, 11 Jan 2019 15:28:44 +0000
User-agent: mu4e 1.1.0; emacs 26.1.91

Paolo Bonzini <address@hidden> writes:

> On 11/01/19 15:38, 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.
>>
>> Instead we use a g_timer to determine if the duration of the test has
>> passed and sleep for a second at a time. This may bias benchmark
>> results for short runs.
>
> Why not g_usleep?  It already does a while loop around nanosleep (which
> returns the remaining time in the wait, like select but unlike sleep and
> poll).

Yeah I'm testing that now. However I have managed to trigger:

  ERROR:tests/test-qht-par.c:20:test_qht: assertion failed (rc == 0): (35584 == 
0)

but I'm not sure if this is some other side-effect of the
test-qht-par/qht-bench invocation dance.

--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]