Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54194
If the SendMessageTimeout call takes a long time, we can get other messages which also set the observed wparam value. Apparently, this is especially likely on Windows 7.
This also removes the (wParam == 0xbaadbeef) check which may have been intended to serve the same goal but doesn't work because the observed wParam value is still assigned.
From: Esme Povirk esme@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54194
If the SendMessageTimeout call takes a long time, we can get other messages which also set the observed wparam value. Apparently, this is especially likely on Windows 7.
This also removes the (wParam == 0xbaadbeef) check which may have been intended to serve the same goal but doesn't work because the observed wParam value is still assigned. --- dlls/user32/tests/msg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c931ca6a983..b5c4de23bc1 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -17847,14 +17847,13 @@ static void test_PostMessage(void) }
static WPARAM g_broadcast_wparam; +static UINT g_broadcast_msg; static LRESULT WINAPI broadcast_test_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
- if (wParam == 0xbaadbeef) + if (message == g_broadcast_msg) g_broadcast_wparam = wParam; - else - g_broadcast_wparam = 0;
return CallWindowProcA(oldproc, hwnd, message, wParam, lParam); } @@ -17864,7 +17863,8 @@ static LRESULT WINAPI broadcast_test_sub_proc(HWND hwnd, UINT message, WPARAM wP { int sub_index = GetWindowLongPtrA(hwnd, GWLP_USERDATA);
- g_broadcast_sub_wparam[sub_index] = (wParam == 0xbaadbeef) ? wParam : 0; + if (message == g_broadcast_msg) + g_broadcast_sub_wparam[sub_index] = wParam;
return CallWindowProcA(g_oldproc_sub[sub_index], hwnd, message, wParam, lParam); } @@ -17966,6 +17966,7 @@ static void test_broadcast(void) g_broadcast_wparam = 0xdead; for (j = 0; j < ARRAY_SIZE(bcast_expect); j++) g_broadcast_sub_wparam[j] = 0xdead; + g_broadcast_msg = messages[i]; ret = SendMessageTimeoutA(HWND_BROADCAST, messages[i], 0xbaadbeef, 0, SMTO_NORMAL, 2000, NULL); if (!ret && GetLastError() == ERROR_TIMEOUT) win_skip("broadcasting test %d, timeout\n", i);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
2 TestBot errors prevented a full analysis of your patch. If the test caused the operating system (e.g. Windows) to crash or reboot you will probably have to modify it to avoid that. Other issues should be reported to the TestBot administrators.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151991
Your paranoid android.
=== build (build log) ===
WineRunBuild.pl:error: Could not copy the patch to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunBuild.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died)
=== debian11 (build log) ===
error: patch failed: dlls/user32/tests/msg.c:17847 Task: Patch failed to apply
=== debian11b (build log) ===
WineRunWineTest.pl:error: Could not send 'patch.diff' to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunWineTest.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) WineRunWineTest.pl:error: Giving up after 3 run(s)