Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- 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 c480a9d163e..7effd0f28b8 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)
Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- 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 fc94dcaaad7..c288e1ef557 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)
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=106431
Your paranoid android.
=== debian11 (32 bit report) ===
d3d8: device.c:10716: Test failed: Adapter 0: Expect window rect (0,0)-(640,480), got (4,14)-(644,494).
=== debian11 (32 bit Arabic:Morocco report) ===
d3d8: device.c:3183: Test failed: Expected message 0x3 for window 0, but didn't receive it, i=2.
=== debian11 (32 bit German report) ===
d3d8: device.c:3183: Test failed: Expected message 0x3 for window 0, but didn't receive it, i=2. device.c:10716: Test failed: Adapter 1: Expect window rect (640,0)-(1664,737), got (640,0)-(1280,480).
=== debian11 (32 bit French report) ===
d3d8: device.c:3183: Test failed: Expected message 0x1c for window 0x1, but didn't receive it, i=2. device.c:10746: Test failed: Adapter 1: Expect window rect (640,0)-(1664,737), got (0,0)-(1024,737).
=== debian11 (32 bit Hebrew:Israel report) ===
d3d8: device.c:3183: Test failed: Expected message 0x3 for window 0, but didn't receive it, i=2. device.c:10716: Test failed: Adapter 0: Expect window rect (0,0)-(640,480), got (4,14)-(644,494).
=== debian11 (32 bit Hindi:India report) ===
d3d8: device.c:3183: Test failed: Expected message 0x3 for window 0, but didn't receive it, i=2. device.c:10716: Test failed: Adapter 1: Expect window rect (640,0)-(1664,737), got (4,14)-(644,494).
=== debian11 (32 bit Japanese:Japan report) ===
d3d8: device.c:3183: Test failed: Expected message 0x3 for window 0, but didn't receive it, i=2.
=== debian11 (32 bit Chinese:China report) ===
d3d8: device.c:3183: Test failed: Expected message 0x1c for window 0x1, but didn't receive it, i=2. device.c:3345: Test failed: Expected message 0x1c for window 0x1, but didn't receive it device.c:10716: Test failed: Adapter 1: Expect window rect (640,0)-(1664,737), got (640,0)-(1280,480). device.c:10746: Test failed: Adapter 1: Expect window rect (640,0)-(1664,737), got (0,0)-(1024,737).
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
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=106430
Your paranoid android.
=== w1064_2qxl (64 bit report) ===
d3d9: device.c:5268: Test failed: Didn't receive MOUSEMOVE 0 (50, 50).
=== debian11 (32 bit German report) ===
d3d9: device.c:4205: Test failed: Got unexpected screen size 720x480. device.c:4240: Test failed: Got unexpected screen size 720x480. device.c:4265: Test failed: Got unexpected width 720. device.c:4205: Test failed: Got unexpected screen size 720x480. device.c:4240: Test failed: Got unexpected screen size 720x480. device.c:4265: Test failed: Got unexpected width 720.
=== debian11 (64 bit WoW report) ===
d3d9: device.c:4205: Test failed: Got unexpected screen size 640x480. device.c:4240: Test failed: Got unexpected screen size 640x480. device.c:4265: Test failed: Got unexpected width 640. device.c:4386: Test failed: Expected message 0x3 for window 0x1, but didn't receive it, i=0. device.c:4205: Test failed: Got unexpected screen size 640x480. device.c:4240: Test failed: Got unexpected screen size 640x480. device.c:4265: Test failed: Got unexpected width 640. device.c:4266: Test failed: Got unexpected height 480. device.c:5424: Test failed: Expected resolution 1024x768, got 640x480. device.c:5454: Test failed: Expected resolution 1024x768, got 640x480.