Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
* PATCH 1/4 should help with these spurious failures:
input.c:2789: Test failed: 15: expected WM_INPUT message input.c:2792: Test failed: 15: expected RIM_INPUT message
The root cause is the desktop window getting foreground when we try to change focus from the thread window back to the main window that is created topmost. X11 focus out / focus in events receiving order sometimes make winex11.drv decide to give the desktop window focus and this ends up with the WM_INPUT messages not being delivered.
* PATCH 2/4 just skips the recurrent failure on Chinese:China locale.
* PATCH 3/4 and PATCH 4/4 which also (Superseding 205693) are trying to fix the following spurious failures:
input.c:2162: Test failed: GetRawInputBuffer returned 4 input.c:2157: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2162: Test failed: GetRawInputBuffer returned 0 input.c:2163: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2164: Test failed: Unexpected rawinput data: 0 input.c:2165: Test failed: Unexpected rawinput data: 0 input.c:2166: Test failed: Unexpected rawinput data: 0 input.c:2224: Test failed: GetRawInputData succeeded input.c:2225: Test failed: GetRawInputData returned deadbeef input.c:2338: Test failed: Spurious WM_INPUT messages
I've got no idea if they really do, as I'm not yet able to reproduce them consistently when submitting the patches manually. Submitting patches from the M-L seem to trigger the failures more reliably. So if they don't I guess they could just be ignored.
dlls/user32/tests/input.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 3d4f0d03d0d..8c67fc67cb3 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -2758,6 +2758,10 @@ static void test_rawinput(const char* argv0) { case 14: case 15: + DestroyWindow(hwnd); + hwnd = CreateWindowA("static", "static", WS_VISIBLE | WS_POPUP, + pt.x - 50, pt.y - 50, 100, 100, 0, NULL, NULL, NULL); + ok(hwnd != 0, "CreateWindow failed\n"); SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); SetForegroundWindow(hwnd); empty_message_queue();
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/user32/tests/input.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 8c67fc67cb3..9e877c9ae76 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -4171,6 +4171,13 @@ static void test_OemKeyScan(void) WCHAR oem, wchr; char oem_char;
+ BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409); + if (!us_kbd) + { + skip("skipping test with inconsistent results on non-us keyboard\n"); + return; + } + for (oem = 0; oem < 0x200; oem++) { ret = OemKeyScan( oem );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90473
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
=== w10pro64_ja (64 bit report) ===
user32: input.c:1323: Test failed: GetCursorPos: (100,100)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/user32/tests/input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 9e877c9ae76..a5b130c4a35 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -2139,7 +2139,6 @@ static LRESULT CALLBACK rawinputbuffer_wndproc(HWND hwnd, UINT msg, WPARAM wpara RAWINPUT ri; char buffer[16 * sizeof(RAWINPUT64)]; UINT size, count, rawinput_size, iteration = rawinputbuffer_wndproc_count++; - MSG message;
if (is_wow64) rawinput_size = sizeof(RAWINPUT64); else rawinput_size = sizeof(RAWINPUT); @@ -2182,7 +2181,7 @@ static LRESULT CALLBACK rawinputbuffer_wndproc(HWND hwnd, UINT msg, WPARAM wpara ok(rawinput_buffer_mouse_x(buffer, 0) == 5, "Unexpected rawinput data: %d\n", rawinput_buffer_mouse_x(buffer, 0));
/* peek the messages now, they should still arrive in the correct order */ - while (PeekMessageA(&message, 0, WM_INPUT, WM_INPUT, PM_REMOVE)) DispatchMessageA(&message); + empty_message_queue(); }
/* reading the message data now should fail on the second iteration, the data
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90474
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w7u_el (32 bit report) ===
user32: input.c:4445: Test failed: SendInput triggered unexpected message 0xc042
=== w1064v1809 (32 bit report) ===
user32: input.c:2787: Test failed: 0: expected WM_MOUSEMOVE message input.c:2787: Test failed: 1: expected WM_MOUSEMOVE message input.c:2787: Test failed: 2: expected WM_MOUSEMOVE message
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
=== w1064_tsign (64 bit report) ===
user32: input.c:3517: Test failed: expected loop with WM_NCHITTEST messages input.c:3570: Test failed: expected WM_LBUTTONDOWN message input.c:3571: Test failed: expected WM_LBUTTONUP message
=== w10pro64_ja (64 bit report) ===
user32: input.c:1303: Test failed: Wrong set pos: (99,100) input.c:1323: Test failed: GetCursorPos: (99,100)
On 5/14/21 12:14 PM, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90474
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w7u_el (32 bit report) ===
user32: input.c:4445: Test failed: SendInput triggered unexpected message 0xc042
=== w1064v1809 (32 bit report) ===
user32: input.c:2787: Test failed: 0: expected WM_MOUSEMOVE message input.c:2787: Test failed: 1: expected WM_MOUSEMOVE message input.c:2787: Test failed: 2: expected WM_MOUSEMOVE message
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
=== w1064_tsign (64 bit report) ===
user32: input.c:3517: Test failed: expected loop with WM_NCHITTEST messages input.c:3570: Test failed: expected WM_LBUTTONDOWN message input.c:3571: Test failed: expected WM_LBUTTONUP message
=== w10pro64_ja (64 bit report) ===
user32: input.c:1303: Test failed: Wrong set pos: (99,100) input.c:1323: Test failed: GetCursorPos: (99,100)
Seems to be passing now but I still wouldn't call it a victory. I think the failures are more likely to appear when all user32 tests are run at once (maybe caused by some left over state from previous tests).
On 5/14/21 12:18 PM, Rémi Bernon wrote:
On 5/14/21 12:14 PM, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90474
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w7u_el (32 bit report) ===
user32: input.c:4445: Test failed: SendInput triggered unexpected message 0xc042
=== w1064v1809 (32 bit report) ===
user32: input.c:2787: Test failed: 0: expected WM_MOUSEMOVE message input.c:2787: Test failed: 1: expected WM_MOUSEMOVE message input.c:2787: Test failed: 2: expected WM_MOUSEMOVE message
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
=== w1064_tsign (64 bit report) ===
user32: input.c:3517: Test failed: expected loop with WM_NCHITTEST messages input.c:3570: Test failed: expected WM_LBUTTONDOWN message input.c:3571: Test failed: expected WM_LBUTTONUP message
=== w10pro64_ja (64 bit report) ===
user32: input.c:1303: Test failed: Wrong set pos: (99,100) input.c:1323: Test failed: GetCursorPos: (99,100)
Seems to be passing now but I still wouldn't call it a victory. I think the failures are more likely to appear when all user32 tests are run at once (maybe caused by some left over state from previous tests).
I'm actually able to reproduce the failures locally when running the tests through winetest. These patches won't fix the problem, although picking them probably won't hurt either.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/user32/tests/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index a5b130c4a35..1499e299ce7 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -2138,13 +2138,15 @@ static LRESULT CALLBACK rawinputbuffer_wndproc(HWND hwnd, UINT msg, WPARAM wpara { RAWINPUT ri; char buffer[16 * sizeof(RAWINPUT64)]; - UINT size, count, rawinput_size, iteration = rawinputbuffer_wndproc_count++; + UINT size, count, rawinput_size, iteration;
if (is_wow64) rawinput_size = sizeof(RAWINPUT64); else rawinput_size = sizeof(RAWINPUT);
if (msg == WM_INPUT) { + iteration = rawinputbuffer_wndproc_count++; + count = GetRawInputBuffer(NULL, NULL, sizeof(RAWINPUTHEADER)); ok(count == ~0U, "GetRawInputBuffer succeeded\n");
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90475
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90472
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:757: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== wvistau64 (64 bit report) ===
user32: input.c:757: Test failed: 0 (a4/0): 01 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): 11 from 01 -> 00 unexpected input.c:757: Test failed: 0 (a4/0): a2 from 01 -> 00 unexpected
=== w1064v1809 (64 bit report) ===
user32: input.c:2788: Test failed: 0: expected WM_MOUSEMOVE message input.c:2788: Test failed: 1: expected WM_MOUSEMOVE message input.c:2788: Test failed: 2: expected WM_MOUSEMOVE message
=== w10pro64_ja (64 bit report) ===
user32: input.c:3405: Test failed: expected WM_LBUTTONDOWN message input.c:3406: Test failed: expected WM_LBUTTONUP message input.c:3433: Test failed: expected WM_NCHITTEST message input.c:3434: Test failed: expected WM_RBUTTONDOWN message input.c:3435: Test failed: expected WM_RBUTTONUP message input.c:3464: Test failed: expected WM_LBUTTONDOWN message input.c:3465: Test failed: expected WM_LBUTTONUP message input.c:3518: Test failed: expected loop with WM_NCHITTEST messages input.c:3571: Test failed: expected WM_LBUTTONDOWN message input.c:3572: Test failed: expected WM_LBUTTONUP message