[PATCH v2 1/3] user32/tests: Skip inconsistent OemKeyScan tests on non-us keyboard.

Rémi Bernon rbernon at codeweavers.com
Fri May 14 09:04:45 CDT 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---

Supersedes: 205706-205709

Proper fix for test_GetRawInputBuffer failures in PATCH 2, the tentative
fix from the previous version aren't actually making any different.

The issue was that the win test leaves the cursor in a different
position, above the window that the test creates, when testbot makes
several runs for various archs or locales, the first run has the cursor
in a good place, but later runs are affected by the win test outcome.

When the cursor is moved, there may be some additional WM_INPUT messages
generated from X11 events, if the cursor is above the window (or if it
suddenly leaves the window) that aren't when it's not.

Making sure the window is not above the window (and will not cross it
when it's moved) on test startup fixes the problem.

 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 3d4f0d03d0d..d10a7f6504d 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -4167,6 +4167,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 );
-- 
2.31.0




More information about the wine-devel mailing list