[PATCH v5 1/2] user32/tests: Wait for parent thread before checking child window.

Francois Gouget fgouget at codeweavers.com
Wed Nov 13 06:38:16 CST 2019

On Wed, 13 Nov 2019, Rémi Bernon wrote:
>     v5: Fix some warnings, reword the commit message a bit.
>     The failure was hard to reproduce. The most reliable way without the
>     sleep added here is to start multiple runs on the testbot, changing
>     locale for each run. The locale change seems to have an impact on
>     the timing and triggers the race condition.

I don't know if this is going to help but I'll try to shed some light on 

The TestBot prepares the wineprefixes for all its missions in advance, 
at the end of the 'Update Wine VM' task (that takes 10 to 20 seconds per 
wineprefix). For the debian10 VM that's 6 wineprefixes:
  win32, English
  win32, French
  win32, Japanese
  win32, Chinese
  wow32, English
  wow64, English

The 'submit job' page on the public TestBot does not allow specifying 
any other locale so the timing difference does not come from using a 
pre-initialized wineprefix versus using a fresh one.

But when QEmu runs a VM, the parts of the qcow2 file needed by the guest 
end up in the host's disk cache and that will include the wineprefix 
accessed by the test. So maybe not all wineprefixes can fit in the disk 
cache, causing the guest to have to hit the disk after a locale switch.

It's strange that this results in an actual timing difference for the 
test: I'd expect most of the difference to happen when starting up Wine 
and loading the registry, so mostly before the test gets into main(). 
But all the dlls are duplicated (not hard/soft linked) in each 
wineprefix nowadays so maybe that's where the timing difference comes 
from for the test.

Francois Gouget <fgouget at codeweavers.com>

More information about the wine-devel mailing list