[PATCH v3 0/1] MR11566: tests: Fix tests that are faulty because of == vs ?: operator precedence.
`==` has higher precedence than `?:`, meaning that a test like `ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, ...)` is parsed as `(hr == (i < 4)) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED` and not the intended `hr == ((i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED)`. I discovered this when converting `wine/test.h` to use `bool` for conditions (MR coming soon), this generated warnings like: ``` ../dlls/amstream/tests/amstream.c: In function 'test_media_types': ../dlls/amstream/tests/amstream.c:3159:33: warning: '?:' using integer constants in boolean context [-Wint-in-bool-context] 3159 | ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, ../include/wine/test.h:388:53: note: in definition of macro 'winetest_ok' 388 | #define winetest_ok(cond, ...) (winetest_should_log(cond) ? winetest_ok_(__VA_ARGS__) : winetest_ok_(NULL)) | ^~~~ ../include/wine/test.h:129:18: note: in expansion of macro 'ok_' 129 | #define ok ok_(__FILE__, __LINE__) | ^~~ ../dlls/amstream/tests/amstream.c:3159:9: note: in expansion of macro 'ok' 3159 | ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, ``` -- v3: tests: Fix tests that are faulty because of == vs ?: operator precedence. https://gitlab.winehq.org/wine/wine/-/merge_requests/11566
From: Brendan Shanks <bshanks@codeweavers.com> --- dlls/amstream/tests/amstream.c | 2 +- dlls/comctl32/tests/pager.c | 2 +- dlls/comctl32/tests/propsheet.c | 4 ++-- dlls/compstui/tests/compstui.c | 2 +- dlls/d3d9/tests/visual.c | 2 +- dlls/dbghelp/tests/dbghelp.c | 2 +- dlls/dxgi/tests/dxgi.c | 2 +- dlls/gdi32/tests/gdiobj.c | 4 ++-- dlls/iphlpapi/tests/iphlpapi.c | 4 ++-- dlls/kernel32/tests/locale.c | 8 ++++---- dlls/kernel32/tests/virtual.c | 2 +- dlls/ntdll/tests/exception.c | 10 +++++----- dlls/quartz/tests/avidec.c | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index dbff4eb42f9..a9ae9c8e769 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -3156,7 +3156,7 @@ static void test_media_types(void) ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(rejected_subtypes[i].guid)); hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); - ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, + ok(hr == ((i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED), "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, wine_dbgstr_guid(rejected_subtypes[i].guid)); if (hr == S_OK) diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 7f670440dd8..2c41ef6b485 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -922,7 +922,7 @@ static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL SendMessageW(pager, WM_NOTIFY, hdr->idFrom, lParam); ok(notify_test_info.received, "Expect notification received\n"); - ok(hdr->code == code_change ? ansi : unicode, "Expect 0x%08x, got 0x%08x\n", hdr->code, + ok(hdr->code == (code_change ? ansi : unicode), "Expect 0x%08x, got 0x%08x\n", hdr->code, code_change ? ansi : unicode); } diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 812f6530478..028f410f5ee 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -1149,7 +1149,7 @@ static void test_CreatePropertySheetPage(void) else { ok(hpsp != NULL, "Failed to create a page, size %lu\n", page.u.pageA.dwSize); - ok(page.addref_called == (page.u.pageA.dwSize > PROPSHEETPAGEA_V1_SIZE) ? 1 : 0, "Expected ADDREF callback message\n"); + ok(page.addref_called == ((page.u.pageA.dwSize > PROPSHEETPAGEA_V1_SIZE) ? 1 : 0), "Expected ADDREF callback message\n"); } if (hpsp) @@ -1192,7 +1192,7 @@ static void test_CreatePropertySheetPage(void) else { ok(hpsp != NULL, "Failed to create a page, size %lu\n", page.u.pageW.dwSize); - ok(page.addref_called == (page.u.pageW.dwSize > PROPSHEETPAGEW_V1_SIZE) ? 1 : 0, "Expected ADDREF callback message\n"); + ok(page.addref_called == ((page.u.pageW.dwSize > PROPSHEETPAGEW_V1_SIZE) ? 1 : 0), "Expected ADDREF callback message\n"); } if (hpsp) diff --git a/dlls/compstui/tests/compstui.c b/dlls/compstui/tests/compstui.c index 74d7e34e39e..111897e0dde 100644 --- a/dlls/compstui/tests/compstui.c +++ b/dlls/compstui/tests/compstui.c @@ -117,7 +117,7 @@ static LONG WINAPI device_property_sheets(PROPSHEETUI_INFO *info, LPARAM lparam) ok(info->cbSize == sizeof(*info), "info->cbSize = %hd\n", info->cbSize); ok(info->Version == PROPSHEETUI_INFO_VERSION, "info->Version = %hd\n", info->Version); - ok(info->Flags == info->lParamInit ? PSUIINFO_UNICODE : 0, "info->Flags = %hd\n", info->Flags); + ok(info->Flags == (info->lParamInit ? PSUIINFO_UNICODE : 0), "info->Flags = %hd\n", info->Flags); ok(info->Reason == PROPSHEETUI_REASON_INIT || info->Reason == PROPSHEETUI_REASON_DESTROY, "info->Reason = %hx\n", info->Reason); ok(info->hComPropSheet != NULL, "info->hComPropSheet = NULL\n"); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index e070210c6d1..8cb932dd3bb 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -4467,7 +4467,7 @@ static void stretchrect_test(void) hr = IDirect3DDevice9_StretchRect(device, surfaces[test->src], test->src_rect, surfaces[test->dst], test->dst_rect, test->filter); todo_wine_if(test->todo) - ok(hr == test->allowed ? D3D_OK : D3DERR_INVALIDCALL, "Test %u, got unexpected hr %#lx.\n", i, hr); + ok(hr == (test->allowed ? D3D_OK : D3DERR_INVALIDCALL), "Test %u, got unexpected hr %#lx.\n", i, hr); } for (i = 0; i < ARRAY_SIZE(surfaces); ++i) diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 9387804a1b2..1f5bdfcf22d 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -683,7 +683,7 @@ static void test_modules_overlap(void) ok(ret, "SymInitialize failed: %lu\n", GetLastError()); base[0] = SymLoadModuleEx(dummy, NULL, target1_dll, NULL, tests[i].first_base, 0, NULL, 0); - ok(base[0] == tests[i].first_base ? tests[i].first_base : base0, "SymLoadModuleEx failed: %lu\n", GetLastError()); + ok(base[0] == (tests[i].first_base ? tests[i].first_base : base0), "SymLoadModuleEx failed: %lu\n", GetLastError()); ret = SymAddSymbol(dummy, base[0], "winetest_symbol_virtual", base[0] + (3 * imsize0) / 4, 13, 0); ok(ret, "SymAddSymbol failed: %lu\n", GetLastError()); diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 59ed17f00a2..2c562438eca 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -8088,7 +8088,7 @@ static void test_colour_space_support(IUnknown *device, BOOL is_d3d12) } hr = IDXGISwapChain3_SetColorSpace1(swapchain3, colour_spaces[i]); - ok(hr == (support & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT) ? S_OK : E_INVALIDARG, + ok(hr == ((support & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT) ? S_OK : E_INVALIDARG), "Got unexpected hr %#lx for text %u.\n", hr, i); } diff --git a/dlls/gdi32/tests/gdiobj.c b/dlls/gdi32/tests/gdiobj.c index ffe376abed7..25aa109a9fe 100644 --- a/dlls/gdi32/tests/gdiobj.c +++ b/dlls/gdi32/tests/gdiobj.c @@ -403,7 +403,7 @@ static void test_shared_handle_entry( HGDIOBJ obj, unsigned int type, BOOL is_st "Type = %x, expected %x\n", entry->Type, type & 0x1f); ok(entry->Object, "Object = NULL\n"); ok(entry->Owner.Count == 0, "Count = %u\n", entry->Owner.Count); - ok(entry->Generation <= (sizeof(void *) == 8) ? 127 : 255, "Generation = %u\n", entry->Generation); + ok(entry->Generation <= ((sizeof(void *) == 8) ? 127 : 255), "Generation = %u\n", entry->Generation); } static void test_shared_handle_table(void) @@ -446,7 +446,7 @@ static void test_shared_handle_table(void) ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %lx\n", entry->Owner.ProcessId, GetCurrentProcessId()); ok(entry->Owner.Count == 0, "Count = %u\n", entry->Owner.Count); - ok(entry->Generation <= (sizeof(void *) == 8) ? 127 : 255, "Generation = %u\n", entry->Generation); + ok(entry->Generation <= ((sizeof(void *) == 8) ? 127 : 255), "Generation = %u\n", entry->Generation); test_shared_handle_entry( GetStockObject( WHITE_PEN ), NTGDI_OBJ_PEN, TRUE ); test_shared_handle_entry( GetStockObject( WHITE_BRUSH ), NTGDI_OBJ_BRUSH, TRUE ); diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 982880fdb9d..775d734bb02 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -3459,7 +3459,7 @@ static void test_ParseNetworkString(void) ok(ret == ipv4_address_tests[i].ret, "%s gave error %ld\n", ipv4_address_tests[i].str, ret); - ok(info.Format == ret ? NET_ADDRESS_FORMAT_UNSPECIFIED : NET_ADDRESS_IPV4, + ok(info.Format == (ret ? NET_ADDRESS_FORMAT_UNSPECIFIED : NET_ADDRESS_IPV4), "%s gave format %d\n", ipv4_address_tests[i].str, info.Format); ok(info.Ipv4Address.sin_addr.S_un.S_addr == (ret ? 0x99999999 : ipv4_address_tests[i].addr.S_un.S_addr), "%s gave address %d.%d.%d.%d\n", ipv4_address_tests[i].str, @@ -3485,7 +3485,7 @@ static void test_ParseNetworkString(void) ok(ret == ipv4_service_tests[i].ret, "%s gave error %ld\n", ipv4_service_tests[i].str, ret); - ok(info.Format == ret ? NET_ADDRESS_FORMAT_UNSPECIFIED : NET_ADDRESS_IPV4, + ok(info.Format == (ret ? NET_ADDRESS_FORMAT_UNSPECIFIED : NET_ADDRESS_IPV4), "%s gave format %d\n", ipv4_address_tests[i].str, info.Format); ok(info.Ipv4Address.sin_addr.S_un.S_addr == (ret ? 0x99999999 : ipv4_service_tests[i].addr.S_un.S_addr), "%s gave address %d.%d.%d.%d\n", ipv4_service_tests[i].str, diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index d957c2f4019..7d956bca38f 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -5531,7 +5531,7 @@ static void test_IdnToNameprepUnicode(void) test_data[1].in_len, NULL, 0); err = GetLastError(); ok(ret == test_data[1].ret, "ret = %ld\n", ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "err = %ld\n", err); + ok(err == (ret ? 0xdeadbeef : ERROR_INVALID_NAME), "err = %ld\n", err); SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, test_data[0].in, -1, buf, ARRAY_SIZE(buf)); @@ -5580,7 +5580,7 @@ static void test_IdnToNameprepUnicode(void) if (ret == test_data[i].ret) { - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(err == (ret ? 0xdeadbeef : ERROR_INVALID_NAME), "%ld: err = %ld\n", i, err); ok(!wcsncmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } if (pRtlNormalizeString) @@ -5639,7 +5639,7 @@ static void test_IdnToAscii(void) ret = pIdnToAscii(test_data[i].flags, test_data[i].in, test_data[i].in_len, buf, ARRAY_SIZE(buf)); err = GetLastError(); ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(err == (ret ? 0xdeadbeef : ERROR_INVALID_NAME), "%ld: err = %ld\n", i, err); ok(!wcsnicmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } } @@ -5687,7 +5687,7 @@ static void test_IdnToUnicode(void) ret = pIdnToUnicode(test_data[i].flags, test_data[i].in, test_data[i].in_len, buf, ARRAY_SIZE(buf)); err = GetLastError(); ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(err == (ret ? 0xdeadbeef : ERROR_INVALID_NAME), "%ld: err = %ld\n", i, err); ok(!wcsncmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } } diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 74b03ec8f54..af740a250ac 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -4200,7 +4200,7 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) ok(info.AllocationProtect == info.Protect, "%ld: (%04lx) got %#lx, expected %#lx\n", j, view[j].access, info.AllocationProtect, info.Protect); ok(info.State == MEM_COMMIT, "%ld: (%04lx) got %#lx, expected MEM_COMMIT\n", j, view[j].access, info.State); - ok(info.Type == (sec_flags & SEC_IMAGE) ? SEC_IMAGE : MEM_MAPPED, + ok(info.Type == ((sec_flags & SEC_IMAGE) ? SEC_IMAGE : MEM_MAPPED), "%ld: (%04lx) got %#lx, expected MEM_MAPPED\n", j, view[j].access, info.Type); if (nt_base && base) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index abeae85a068..c7fa6669202 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -1580,7 +1580,7 @@ static DWORD simd_fault_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_R ok( rec->ExceptionCode == STATUS_FLOAT_MULTIPLE_TRAPS, "exception code: %#lx, should be %#lx\n", rec->ExceptionCode, STATUS_FLOAT_MULTIPLE_TRAPS); - ok( rec->NumberParameters == is_wow64 ? 2 : 1, "# of params: %li\n", rec->NumberParameters); + ok( rec->NumberParameters == (is_wow64 ? 2 : 1), "# of params: %li\n", rec->NumberParameters); ok( rec->ExceptionInformation[0] == 0, "param #1: %Ix, should be 0\n", rec->ExceptionInformation[0]); if (rec->NumberParameters == 2) ok( rec->ExceptionInformation[1] == ((XSAVE_FORMAT *)context->ExtendedRegisters)->MxCsr, @@ -4681,7 +4681,7 @@ static void test_wow64_context(void) context.ContextFlags = CONTEXT_ALL; ret = pNtGetContextThread( pi.hThread, &context ); ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); - ok( context.ContextFlags == is_arm64ec ? CONTEXT_FULL : CONTEXT_ALL, + ok( context.ContextFlags == (is_arm64ec ? CONTEXT_FULL : CONTEXT_ALL), "got context flags %#lx\n", context.ContextFlags ); ok( !context.Rsi, "rsi is not zero %Ix\n", context.Rsi ); ok( !context.Rdi, "rdi is not zero %Ix\n", context.Rdi ); @@ -11394,10 +11394,10 @@ static void test_extended_context(void) context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset); ok(context_flags == (bret ? flags_fpx : flags), "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags); - ok(xs->Mask == bret ? 4 : 0xdeadbeef, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask)); + ok(xs->Mask == (bret ? 4 : 0xdeadbeef), "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask)); mask = pRtlGetExtendedFeaturesMask(context_ex); ok(mask == (xs->Mask & ~(ULONG64)3), "Got unexpected mask %s.\n", wine_dbgstr_longlong(mask)); - ok(xs->CompactionMask == bret ? expected_compaction : 0xdeadbeef, "Got unexpected CompactionMask %s.\n", + ok(xs->CompactionMask == (bret ? expected_compaction : 0xdeadbeef), "Got unexpected CompactionMask %s.\n", wine_dbgstr_longlong(xs->CompactionMask)); mask = 0xdeadbeef; @@ -11439,7 +11439,7 @@ static void test_extended_context(void) length2 = 0xdeadbeef; p = pLocateXStateFeature(context, 2, &length2); - ok(!p && length2 == (flags & CONTEXT_NATIVE) ? sizeof(YMMCONTEXT) : 0xdeadbeef, + ok(!p && length2 == ((flags & CONTEXT_NATIVE) ? sizeof(YMMCONTEXT) : 0xdeadbeef), "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags); context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 4edb027e5ae..18cb95a50fb 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -1047,7 +1047,7 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample hr = IMediaSample_GetMediaTime(sample, &start, &stop); ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr); hr = IMediaSample_IsDiscontinuity(sample); - todo_wine_if (testmode == 5) ok(hr == (testmode == 4) ? S_OK : S_FALSE, "Got hr %#lx.\n", hr); + todo_wine_if (testmode == 5) ok(hr == ((testmode == 4) ? S_OK : S_FALSE), "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); todo_wine_if (testmode == 3) ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11566
On Thu Aug 6 18:18:39 2026 +0000, eric pouech wrote:
this looks as a nice task for coccinelle using ``` @@ expression e1, e2, e3, e4; expression list trailer; @@ -ok(e1 == e2 ? e3 : e4, trailer); +ok(e1 == (e2 ? e3 : e4), trailer); ``` I get the following patches (some overlap with this MR, but some are new and should be handled as well) [patch](/uploads/898d9990120494203275ac0fac3e8919/patch) @bshanks do you rather want to integrate this in you MR, or shall I open another MR (deduped from this one)? Cool thank you, there wasn't too many so I just added them into this MR
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_148204
@dmitry After being fixed the GDI object generation test added in !5777 is failing on 64-bit Windows, it doesn't appear that the generation should be limited to 127: ``` gdiobj.c:406:0.000 Test failed: Generation = 158 gdiobj.c:406:0.000 Test failed: Generation = 177 gdiobj.c:406:0.000 Test failed: Generation = 178 gdiobj.c:406:0.000 Test failed: Generation = 179 gdiobj.c:406:0.000 Test failed: Generation = 180 ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_148407
On Mon Aug 10 07:34:34 2026 +0000, Brendan Shanks wrote:
@dmitry After being fixed the GDI object generation test added in !5777 is failing on 64-bit Windows, it doesn't appear that the generation should be limited to 127: ``` gdiobj.c:406:0.000 Test failed: Generation = 158 gdiobj.c:406:0.000 Test failed: Generation = 177 gdiobj.c:406:0.000 Test failed: Generation = 178 gdiobj.c:406:0.000 Test failed: Generation = 179 gdiobj.c:406:0.000 Test failed: Generation = 180 ``` I can't reproduce this locally, and Testbot with explicitly enabled 64-bit Windows tests doesn't show the failures with the attached debug[patch.patch](/uploads/ab6231c85d62cdc127c6d06b171fcc3a/patch.patch) patch: https://testbot.winehq.org/JobDetails.pl?Key=163974
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_148437
On Mon Aug 10 07:34:34 2026 +0000, Dmitry Timoshkov wrote:
I can't reproduce this locally, and Testbot with explicitly enabled 64-bit Windows tests doesn't show the failures with the attached debug[patch.patch](/uploads/ab6231c85d62cdc127c6d06b171fcc3a/patch.patch) patch: https://testbot.winehq.org/JobDetails.pl?Key=163974 [patch2.patch](/uploads/4c43a285a1c1c7eff00570f3ffde84be/patch2.patch) Apparently I've missed the fact that your patch with the fix wasn't accepted yet, sorry about that. Updated version of the patch shows that up to date versions of Windows don't fail the tests: https://testbot.winehq.org/JobDetails.pl?Key=163975 Should we mark the tests as broken on old Windows versions then?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_148440
On Mon Aug 10 07:55:58 2026 +0000, Dmitry Timoshkov wrote:
[patch2.patch](/uploads/4c43a285a1c1c7eff00570f3ffde84be/patch2.patch) Apparently I've missed the fact that your patch with the fix wasn't accepted yet, sorry about that. Updated version of the patch shows that up to date versions of Windows don't fail the tests: https://testbot.winehq.org/JobDetails.pl?Key=163975 Should we mark the tests as broken on old Windows versions then? After manually re-running the gdiobj tests (built for x86_64) several times on a Windows 11 25H2 machine, I saw this test failing with Generation values up to 252.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_149143
On Mon Aug 17 23:57:27 2026 +0000, Brendan Shanks wrote:
After manually re-running the gdiobj tests (built for x86_64) several times on a Windows 11 25H2 machine, I saw this test failing with Generation values up to 252. It seems that the failures are intermittent. I also see the failures when running the test in a loop. I went ahead and added similar test to dlls/user32/tests.msg.c,ok_sequence_() for actual->message == WM_NCPAINT && actual->wParam != 1, and also see the failures. https://gitlab.winehq.org/wine/wine/-/merge_requests/5777 has fixed a real application and has a comment with an explanation of the bug. Could it be that for a .Net app GDI handles are generated differently or for a .Net app WM_NCPAINT has a truncated wParam?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11566#note_149149
participants (3)
-
Brendan Shanks -
Brendan Shanks (@bshanks) -
Dmitry Timoshkov (@dmitry)