Stefan Dösinger : d3d9/tests: Ignore random testbot failures in test_cursor.
Alexandre Julliard
julliard at winehq.org
Mon Jan 31 15:55:18 CST 2022
Module: wine
Branch: master
Commit: ef2943d16682cb214a403d44f848181cc2fb04ab
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ef2943d16682cb214a403d44f848181cc2fb04ab
Author: Stefan Dösinger <stefan at 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 at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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)
More information about the wine-cvs
mailing list