Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 54 ++++++++++++++++++++++++++----------------- dlls/ddraw/tests/ddraw2.c | 59 +++++++++++++++++++++++++++++------------------ dlls/ddraw/tests/ddraw7.c | 7 +++++- 3 files changed, 75 insertions(+), 45 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index acf8dd8e2f0..cc228028e17 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -12982,34 +12982,46 @@ static void test_caps(void) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + if (is_ddraw64) + { + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + } + else + { + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + }
IDirectDraw_Release(ddraw); }
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - - memset(&hal_caps, 0, sizeof(hal_caps)); - memset(&hel_caps, 0, sizeof(hel_caps)); - hal_caps.dwSize = sizeof(hal_caps); - hel_caps.dwSize = sizeof(hel_caps); - hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); - ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + ok(hr == (is_ddraw64 ? E_FAIL : DD_OK), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + { + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
- IDirectDraw_Release(ddraw); + IDirectDraw_Release(ddraw); + } }
static void test_d32_support(void) diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 33bc94326fa..595157b486f 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -13862,37 +13862,50 @@ static void test_caps(void) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + if (is_ddraw64) + { + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + } + else + { + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + }
IDirectDraw2_Release(ddraw); }
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - IDirectDraw_Release(ddraw1); + ok(hr == (is_ddraw64 ? E_FAIL : DD_OK), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + IDirectDraw_Release(ddraw1);
- memset(&hal_caps, 0, sizeof(hal_caps)); - memset(&hel_caps, 0, sizeof(hel_caps)); - hal_caps.dwSize = sizeof(hal_caps); - hel_caps.dwSize = sizeof(hel_caps); - hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); - ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
- IDirectDraw2_Release(ddraw); + IDirectDraw2_Release(ddraw); + } }
static void test_d32_support(void) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 4027c722190..116e34a1768 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -8900,7 +8900,12 @@ static void test_palette_alpha(void) surface_desc.dwHeight = 128; surface_desc.ddsCaps.dwCaps = test_data[i].caps; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#x.\n", test_data[i].name, hr); + if (is_ddraw64 && test_data[i].caps & DDSCAPS_TEXTURE) + todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + else + ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + if (FAILED(hr)) + continue;
hr = IDirectDrawSurface7_SetPalette(surface, palette); if (test_data[i].attach_allowed)
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=55485
Your paranoid android.
=== wvistau64 (64 bit report) ===
ddraw: ddraw1.c:13001: Test failed: Got unexpected hr 0.
=== w2008s64 (64 bit report) ===
ddraw: ddraw1.c:13001: Test failed: Got unexpected hr 0.
=== w7pro64 (64 bit report) ===
ddraw: ddraw1.c:13001: Test failed: Got unexpected hr 0.
=== wvistau64_he (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
=== wvistau64 (64 bit report) ===
ddraw: ddraw2.c:13881: Test failed: Got unexpected hr 0.
=== w2008s64 (64 bit report) ===
ddraw: ddraw2.c:13881: Test failed: Got unexpected hr 0.
=== w7pro64 (64 bit report) ===
ddraw: ddraw2.c:13881: Test failed: Got unexpected hr 0.
=== wvistau64_fr (32 bit report) ===
ddraw: ddraw7: Timeout
=== wvistau64_fr (task log) ===
Task errors: An error occurred while waiting for the test to complete: network read timed out (wait2/connect:AgentVersion.h:0/9) The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) The previous 2 run(s) terminated abnormally
=== w1064v1809 (32 bit report) ===
ddraw: 0b98:ddraw7: unhandled exception c0000005 at 733C40F8
=== debian10 (32 bit report) ===
ddraw: ddraw1: Timeout ddraw2: Timeout ddraw7: Timeout
=== debian10 (build log) ===
Task: WineTest did not produce the win32_fr_FR report
=== debian10 (32 bit WoW report) ===
ddraw: ddraw1: Timeout ddraw2: Timeout ddraw7: Timeout
=== debian10 (build log) ===
Task: WineTest did not produce the wow64 report