---
Example test failure: http://test.winehq.org/data/c1db36686c7adb1f117e2aeecbd024949fc1e6ae/win21H1...
From: Stefan D��singer stefan@codeweavers.com
---
Example test failure: http://test.winehq.org/data/c1db36686c7adb1f117e2aeecbd024949fc1e6ae/win21H1... --- dlls/ddraw/tests/ddraw1.c | 15 +++++++++++++-- dlls/ddraw/tests/ddraw2.c | 15 +++++++++++++-- dlls/ddraw/tests/ddraw4.c | 15 +++++++++++++-- dlls/ddraw/tests/ddraw7.c | 15 +++++++++++++-- 4 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 94d41dbc34d..531b16520a1 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2874,8 +2874,19 @@ static HRESULT CALLBACK test_coop_level_mode_set_enum_cb(DDSURFACEDESC *surface_ if (surface_desc->dwWidth == param->ddraw_width && surface_desc->dwHeight == param->ddraw_height) return DDENUMRET_OK;
- param->user32_width = surface_desc->dwWidth; - param->user32_height = surface_desc->dwHeight; + /* The docs say the DDENUMRET_CANCEL below cancels the enumeration, so the check should be + * redundant. However, since Windows 10 this no longer works and the enumeration continues + * until all supported modes are enumerated. Win8 and earlier do cancel. + * + * Unrelatedly, some testbot machines report high res modes like 1920x1080, but suffer from + * some problems when we actually try to set them (w10pro64 and its localization siblings). + * Try to stay below the registry mode if possible. */ + if (!param->user32_width || (surface_desc->dwWidth < registry_mode.dmPelsWidth + && surface_desc->dwHeight < registry_mode.dmPelsHeight)) + { + param->user32_width = surface_desc->dwWidth; + param->user32_height = surface_desc->dwHeight; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index d5b72793526..4c20a774b05 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2971,8 +2971,19 @@ static HRESULT CALLBACK test_coop_level_mode_set_enum_cb(DDSURFACEDESC *surface_ if (surface_desc->dwWidth == param->ddraw_width && surface_desc->dwHeight == param->ddraw_height) return DDENUMRET_OK;
- param->user32_width = surface_desc->dwWidth; - param->user32_height = surface_desc->dwHeight; + /* The docs say the DDENUMRET_CANCEL below cancels the enumeration, so the check should be + * redundant. However, since Windows 10 this no longer works and the enumeration continues + * until all supported modes are enumerated. Win8 and earlier do cancel. + * + * Unrelatedly, some testbot machines report high res modes like 1920x1080, but suffer from + * some problems when we actually try to set them (w10pro64 and its localization siblings). + * Try to stay below the registry mode if possible. */ + if (!param->user32_width || (surface_desc->dwWidth < registry_mode.dmPelsWidth + && surface_desc->dwHeight < registry_mode.dmPelsHeight)) + { + param->user32_width = surface_desc->dwWidth; + param->user32_height = surface_desc->dwHeight; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 471f6fc3f09..10cf8f88fd6 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -3209,8 +3209,19 @@ static HRESULT CALLBACK test_coop_level_mode_set_enum_cb(DDSURFACEDESC2 *surface if (surface_desc->dwWidth == param->ddraw_width && surface_desc->dwHeight == param->ddraw_height) return DDENUMRET_OK;
- param->user32_width = surface_desc->dwWidth; - param->user32_height = surface_desc->dwHeight; + /* The docs say the DDENUMRET_CANCEL below cancels the enumeration, so the check should be + * redundant. However, since Windows 10 this no longer works and the enumeration continues + * until all supported modes are enumerated. Win8 and earlier do cancel. + * + * Unrelatedly, some testbot machines report high res modes like 1920x1080, but suffer from + * some problems when we actually try to set them (w10pro64 and its localization siblings). + * Try to stay below the registry mode if possible. */ + if (!param->user32_width || (surface_desc->dwWidth < registry_mode.dmPelsWidth + && surface_desc->dwHeight < registry_mode.dmPelsHeight)) + { + param->user32_width = surface_desc->dwWidth; + param->user32_height = surface_desc->dwHeight; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 15ab548ebc6..062e8430a75 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2860,8 +2860,19 @@ static HRESULT CALLBACK test_coop_level_mode_set_enum_cb(DDSURFACEDESC2 *surface if (surface_desc->dwWidth == param->ddraw_width && surface_desc->dwHeight == param->ddraw_height) return DDENUMRET_OK;
- param->user32_width = surface_desc->dwWidth; - param->user32_height = surface_desc->dwHeight; + /* The docs say the DDENUMRET_CANCEL below cancels the enumeration, so the check should be + * redundant. However, since Windows 10 this no longer works and the enumeration continues + * until all supported modes are enumerated. Win8 and earlier do cancel. + * + * Unrelatedly, some testbot machines report high res modes like 1920x1080, but suffer from + * some problems when we actually try to set them (w10pro64 and its localization siblings). + * Try to stay below the registry mode if possible. */ + if (!param->user32_width || (surface_desc->dwWidth < registry_mode.dmPelsWidth + && surface_desc->dwHeight < registry_mode.dmPelsHeight)) + { + param->user32_width = surface_desc->dwWidth; + param->user32_height = surface_desc->dwHeight; + } return DDENUMRET_CANCEL; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=122810
Your paranoid android.
=== w864 (32 bit report) ===
ddraw: ddraw7.c:18949: Test failed: Got unexpected color 0x00000040.
=== w1064v1809 (32 bit report) ===
ddraw: ddraw7.c:18949: Test failed: Got unexpected color 0x00000040.
=== debian11 (32 bit Chinese:China report) ===
Report validation errors: ddraw4: Timeout
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
From: Stefan D��singer stefan@codeweavers.com
--- dlls/ddraw/tests/ddraw1.c | 9 +++++++-- dlls/ddraw/tests/ddraw2.c | 13 +++++++++---- dlls/ddraw/tests/ddraw4.c | 13 +++++++++---- dlls/ddraw/tests/ddraw7.c | 13 +++++++++---- 4 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 531b16520a1..7d2e93ece61 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -14224,8 +14224,13 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC *surface_desc
if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height) { - param->new_width = surface_desc->dwWidth; - param->new_height = surface_desc->dwHeight; + /* See test_coop_level_mode_set_enum_cb() for why enumeration might accidentally continue. */ + if (!param->new_width || (param->new_width < registry_mode.dmPelsWidth + && param->new_height < registry_mode.dmPelsHeight)) + { + param->new_width = surface_desc->dwWidth; + param->new_height = surface_desc->dwHeight; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 4c20a774b05..bc370396640 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -15205,10 +15205,15 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC *surface_desc if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency)) { - param->new_width = surface_desc->dwWidth; - param->new_height = surface_desc->dwHeight; - param->new_frequency = surface_desc->dwRefreshRate; - param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + /* See test_coop_level_mode_set_enum_cb() for why enumeration might accidentally continue. */ + if (!param->new_width || (param->new_width < registry_mode.dmPelsWidth + && param->new_height < registry_mode.dmPelsHeight)) + { + param->new_width = surface_desc->dwWidth; + param->new_height = surface_desc->dwHeight; + param->new_frequency = surface_desc->dwRefreshRate; + param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 10cf8f88fd6..de438982703 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -18255,10 +18255,15 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency)) { - param->new_width = surface_desc->dwWidth; - param->new_height = surface_desc->dwHeight; - param->new_frequency = surface_desc->dwRefreshRate; - param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + /* See test_coop_level_mode_set_enum_cb() for why enumeration might accidentally continue. */ + if (!param->new_width || (param->new_width < registry_mode.dmPelsWidth + && param->new_height < registry_mode.dmPelsHeight)) + { + param->new_width = surface_desc->dwWidth; + param->new_height = surface_desc->dwHeight; + param->new_frequency = surface_desc->dwRefreshRate; + param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + } return DDENUMRET_CANCEL; }
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 062e8430a75..1d1ed1d15ac 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -18522,10 +18522,15 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency)) { - param->new_width = surface_desc->dwWidth; - param->new_height = surface_desc->dwHeight; - param->new_frequency = surface_desc->dwRefreshRate; - param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + /* See test_coop_level_mode_set_enum_cb() for why enumeration might accidentally continue. */ + if (!param->new_width || (param->new_width < registry_mode.dmPelsWidth + && param->new_height < registry_mode.dmPelsHeight)) + { + param->new_width = surface_desc->dwWidth; + param->new_height = surface_desc->dwHeight; + param->new_frequency = surface_desc->dwRefreshRate; + param->new_bpp = surface_desc->ddpfPixelFormat.dwRGBBitCount; + } return DDENUMRET_CANCEL; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=122811
Your paranoid android.
=== w1064v1507 (32 bit report) ===
ddraw: ddraw7.c:18954: Test failed: Got unexpected color 0x00000040.
=== w1064_tsign (32 bit report) ===
ddraw: ddraw7.c:18954: Test failed: Got unexpected color 0x00000040.
=== debian11 (32 bit Chinese:China report) ===
Report validation errors: ddraw4: Timeout
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
This merge request was approved by Zebediah Figura.