Module: wine
Branch: master
Commit: 83285d54bd50ae0d02f2ac3f39510a49afcb8438
URL: https://source.winehq.org/git/wine.git/?a=commit;h=83285d54bd50ae0d02f2ac3f…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sat Jan 29 15:00:26 2022 +0300
d3d8/tests: Ignore random testbot failures in test_cursor.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d8/tests/device.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 68b7fd00e70..cb1e83b64b3 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1074,11 +1074,19 @@ static void test_cursor(void)
IDirect3DSurface8_Release(cursor);
+ /* On the testbot the cursor handle does not behave as expected in rare situations,
+ * leading to random test failures. Either the cursor handle changes before we expect
+ * it to, or it doesn't change afterwards (or already changed before we read the
+ * initial handle?). I was not able to reproduce this on my own machines. Moving the
+ * mouse outside the window results in similar behavior. However, I tested various
+ * obvious failure causes: Was the mouse moved? Was the window hidden or moved? Is
+ * the window in the background? Neither of those applies. Making the window topmost
+ * or using a fullscreen device doesn't improve the test's reliability either. */
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
ok(GetCursorInfo(&info), "GetCursorInfo failed\n");
ok(info.flags & (CURSOR_SHOWING|CURSOR_SUPPRESSED), "The gdi cursor is hidden (%08x)\n", info.flags);
- ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */
+ ok(info.hCursor == cur || broken(1), "The cursor handle is %p\n", info.hCursor); /* unchanged */
/* Still hidden */
ret = IDirect3DDevice8_ShowCursor(device, TRUE);
@@ -1092,7 +1100,7 @@ static void test_cursor(void)
info.cbSize = sizeof(info);
ok(GetCursorInfo(&info), "GetCursorInfo failed\n");
ok(info.flags & (CURSOR_SHOWING|CURSOR_SUPPRESSED), "The gdi cursor is hidden (%08x)\n", info.flags);
- ok(info.hCursor != cur, "The cursor handle is %p\n", info.hCursor);
+ ok(info.hCursor != cur || broken(1), "The cursor handle is %p\n", info.hCursor);
/* Cursor dimensions must all be powers of two */
for (test_idx = 0; test_idx < ARRAY_SIZE(cursor_sizes); ++test_idx)
Module: wine
Branch: master
Commit: ef2943d16682cb214a403d44f848181cc2fb04ab
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ef2943d16682cb214a403d44…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sat Jan 29 15:00:25 2022 +0300
d3d9/tests: Ignore random testbot failures in test_cursor.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d9/tests/device.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 2c909176c8e..7abf9ea3df2 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -1886,11 +1886,19 @@ static void test_cursor(void)
IDirect3DSurface9_Release(cursor);
+ /* On the testbot the cursor handle does not behave as expected in rare situations,
+ * leading to random test failures. Either the cursor handle changes before we expect
+ * it to, or it doesn't change afterwards (or already changed before we read the
+ * initial handle?). I was not able to reproduce this on my own machines. Moving the
+ * mouse outside the window results in similar behavior. However, I tested various
+ * obvious failure causes: Was the mouse moved? Was the window hidden or moved? Is
+ * the window in the background? Neither of those applies. Making the window topmost
+ * or using a fullscreen device doesn't improve the test's reliability either. */
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
ok(GetCursorInfo(&info), "GetCursorInfo failed\n");
ok(info.flags & (CURSOR_SHOWING|CURSOR_SUPPRESSED), "The gdi cursor is hidden (%08x)\n", info.flags);
- ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */
+ ok(info.hCursor == cur || broken(1), "The cursor handle is %p\n", info.hCursor); /* unchanged */
/* Still hidden */
ret = IDirect3DDevice9_ShowCursor(device, TRUE);
@@ -1904,7 +1912,7 @@ static void test_cursor(void)
info.cbSize = sizeof(info);
ok(GetCursorInfo(&info), "GetCursorInfo failed\n");
ok(info.flags & (CURSOR_SHOWING|CURSOR_SUPPRESSED), "The gdi cursor is hidden (%08x)\n", info.flags);
- ok(info.hCursor != cur, "The cursor handle is %p\n", info.hCursor);
+ ok(info.hCursor != cur || broken(1), "The cursor handle is %p\n", info.hCursor);
/* Cursor dimensions must all be powers of two */
for (test_idx = 0; test_idx < ARRAY_SIZE(cursor_sizes); ++test_idx)
Module: wine
Branch: master
Commit: 414d225bc346646b81cca2d6d1870d7fb2708c5b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=414d225bc346646b81cca2d6…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Jan 31 13:19:45 2022 +0300
d3d8/tests: Skip test_cursor_pos if we can't move the cursor.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d8/tests/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 7fdb7909db2..68b7fd00e70 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1210,6 +1210,7 @@ static void test_cursor_pos(void)
HWND window;
HRESULT hr;
BOOL ret;
+ POINT pt;
/* Note that we don't check for movement we're not supposed to receive.
* That's because it's hard to distinguish from the user accidentally
@@ -1241,6 +1242,18 @@ static void test_cursor_pos(void)
ok(ret, "Failed to set cursor position.\n");
flush_events();
+ /* Check if we can move the cursor. If we're running in a virtual desktop
+ * that does not have focus or the mouse is outside the desktop window, some
+ * window managers (e.g. kwin) will refuse to let us steal the pointer. That
+ * is reasonable, but breaks the test. */
+ ret = GetCursorPos(&pt);
+ ok(ret, "Failed to get cursor position.\n");
+ if (pt.x != 99 || pt.y != 99)
+ {
+ skip("Could not warp the cursor (cur pos %ux%u), skipping test.\n", pt.x, pt.y);
+ return;
+ }
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d8_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
Module: wine
Branch: master
Commit: dfd645734bf44b3095d0aea7f1bd3373e73cc629
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dfd645734bf44b3095d0aea7…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Jan 31 13:19:44 2022 +0300
d3d9/tests: Skip test_cursor_pos if we can't move the cursor.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d9/tests/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index d4ff9d0e4ed..2c909176c8e 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5180,6 +5180,7 @@ static void test_cursor_pos(void)
HWND window;
HRESULT hr;
BOOL ret;
+ POINT pt;
/* Note that we don't check for movement we're not supposed to receive.
* That's because it's hard to distinguish from the user accidentally
@@ -5211,6 +5212,18 @@ static void test_cursor_pos(void)
ok(ret, "Failed to set cursor position.\n");
flush_events();
+ /* Check if we can move the cursor. If we're running in a virtual desktop
+ * that does not have focus or the mouse is outside the desktop window, some
+ * window managers (e.g. kwin) will refuse to let us steal the pointer. That
+ * is reasonable, but breaks the test. */
+ ret = GetCursorPos(&pt);
+ ok(ret, "Failed to get cursor position.\n");
+ if (pt.x != 99 || pt.y != 99)
+ {
+ skip("Could not warp the cursor (cur pos %ux%u), skipping test.\n", pt.x, pt.y);
+ return;
+ }
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d9_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
Module: wine
Branch: master
Commit: b88633a741aa5e2f9b03b01babb49976236f8cb9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b88633a741aa5e2f9b03b01b…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Jan 31 13:19:43 2022 +0300
d3d8/tests: Try to make test_cursor_pos more reliable.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d8/tests/device.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index fc94dcaaad7..7fdb7909db2 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1227,6 +1227,20 @@ static void test_cursor_pos(void)
{0, 0},
};
+ /* Windows 10 1709 is unreliable. One or more of the cursor movements we
+ * expect don't show up. Moving the mouse to a defined position beforehand
+ * seems to get it into better shape - only the final 150x150 move we do
+ * below is missing - it looks as if this Windows version filters redundant
+ * SetCursorPos calls on the user32 level, although I am not entirely sure.
+ *
+ * The weird thing is that the previous test leaves the cursor position
+ * reliably at 512x384 on the testbot. So the 50x50 mouse move shouldn't
+ * be stripped away anyway, but it might be a difference between moving the
+ * cursor through SetCursorPos vs moving it by changing the display mode. */
+ ret = SetCursorPos(99, 99);
+ ok(ret, "Failed to set cursor position.\n");
+ flush_events();
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d8_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
@@ -1259,7 +1273,8 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0);
flush_events();
- /* SetCursorPosition() eats duplicates. */
+ /* SetCursorPosition() eats duplicates. FIXME: Since we accept unexpected
+ * mouse moves the test doesn't actually demonstrate that. */
IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0);
flush_events();
@@ -1280,13 +1295,14 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 150, 150, 0);
flush_events();
- /* SetCursorPos() doesn't. */
+ /* SetCursorPos() doesn't. Except for Win10 1709. */
ret = SetCursorPos(150, 150);
ok(ret, "Failed to set cursor position.\n");
flush_events();
- ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n",
- (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
+ ok((!expect_pos->x && !expect_pos->y) || broken(expect_pos - points == 7),
+ "Didn't receive MOUSEMOVE %u (%d, %d).\n",
+ (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
refcount = IDirect3DDevice8_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
Module: wine
Branch: master
Commit: ead1672c0ed36b91d6f0280084454f9a1010f757
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ead1672c0ed36b91d6f02800…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Jan 31 13:19:42 2022 +0300
d3d9/tests: Try to make test_cursor_pos more reliable.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/d3d9/tests/device.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index c480a9d163e..d4ff9d0e4ed 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5197,6 +5197,20 @@ static void test_cursor_pos(void)
{0, 0},
};
+ /* Windows 10 1709 is unreliable. One or more of the cursor movements we
+ * expect don't show up. Moving the mouse to a defined position beforehand
+ * seems to get it into better shape - only the final 150x150 move we do
+ * below is missing - it looks as if this Windows version filters redundant
+ * SetCursorPos calls on the user32 level, although I am not entirely sure.
+ *
+ * The weird thing is that the previous test leaves the cursor position
+ * reliably at 512x384 on the testbot. So the 50x50 mouse move shouldn't
+ * be stripped away anyway, but it might be a difference between moving the
+ * cursor through SetCursorPos vs moving it by changing the display mode. */
+ ret = SetCursorPos(99, 99);
+ ok(ret, "Failed to set cursor position.\n");
+ flush_events();
+
wc.lpfnWndProc = test_cursor_proc;
wc.lpszClassName = "d3d9_test_cursor_wc";
ok(RegisterClassA(&wc), "Failed to register window class.\n");
@@ -5231,7 +5245,8 @@ static void test_cursor_pos(void)
IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0);
flush_events();
- /* SetCursorPosition() eats duplicates. */
+ /* SetCursorPosition() eats duplicates. FIXME: Since we accept unexpected
+ * mouse moves the test doesn't actually demonstrate that. */
IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0);
flush_events();
@@ -5252,13 +5267,14 @@ static void test_cursor_pos(void)
IDirect3DDevice9_SetCursorPosition(device, 150, 150, 0);
flush_events();
- /* SetCursorPos() doesn't. */
+ /* SetCursorPos() doesn't. Except for Win10 1709. */
ret = SetCursorPos(150, 150);
ok(ret, "Failed to set cursor position.\n");
flush_events();
- ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n",
- (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
+ ok((!expect_pos->x && !expect_pos->y) || broken(expect_pos - points == 7),
+ "Didn't receive MOUSEMOVE %u (%d, %d).\n",
+ (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);