On Tue, Feb 02, 2016 at 04:01:55PM +0100, Paolo Bonzini wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > > On 02/02/2016 15:52, Stefan Hajnoczi wrote: > >>> @@ -110,6 +111,8 @@ static void *test_acquire_thread(void > >>> *opaque) qemu_mutex_lock(&data->start_lock); > >>> qemu_mutex_unlock(&data->start_lock); > >>> > >>> + g_usleep(500000); > > Sleep? > > What about it? :) Sleep in a loop is inefficient but at least correct. A sleep outside a loop is a race condition. If the machine is heavily loaded, whatever you are waiting for may not happen in 500 ms and the test case is unreliable. What is the purpose of this sleep? Stefan