[PATCH 1/5] user32/tests: Add more tests for windows destroyed by thread exit.

Rémi Bernon rbernon at codeweavers.com
Tue Feb 1 08:52:25 CST 2022


On 2/1/22 15:12, Jacek Caban wrote:
> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
> ---
>   dlls/user32/tests/msg.c | 33 +++++++++++++++++++++++++++++++++
>   1 file changed, 33 insertions(+)
> 

Hi Jacek!

I've been trying to fix this for quite some time as I believe we have a 
race condition in thread destroy and that causes some spurious 
user32:msg test failures already.

I wrote a few more tests (attached) before to check Windows behavior and 
they don't pass with your changes.

I also had several variations of the fix, and I'm attaching the last one 
for reference, although I understand PATCH 3 and 4 which are changing 
the parent pointer semantics on the wineserver side is a bit risky.

 From the errors returned by window functions it doesn't look completely 
off though (some functions fail in the same way for desktop window and 
for orphaned windows, both not having a parent).

Note that my fix then doesn't pass your WM_NCDESTROY parent test either.

Cheers,
-- 
Rémi Bernon <rbernon at codeweavers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-user32-tests-Add-a-test-for-child-window-destruction.patch
Type: text/x-patch
Size: 11392 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-user32-tests-Wait-for-parent-window-thread-before-ch.patch
Type: text/x-patch
Size: 5569 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-server-Use-an-explicit-field-to-flag-desktop-windows.patch
Type: text/x-patch
Size: 4285 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-server-Don-t-destroy-child-windows-from-live-other-t.patch
Type: text/x-patch
Size: 7630 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-user32-Set-error-from-set_parent-and-set_window_pos-.patch
Type: text/x-patch
Size: 3052 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-server-Factor-sent-or-posted-message-receive-helpers.patch
Type: text/x-patch
Size: 5904 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-server-Check-for-internal-messages-before-validating.patch
Type: text/x-patch
Size: 1844 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220201/782327c6/attachment-0006.bin>


More information about the wine-devel mailing list