https://bugs.winehq.org/show_bug.cgi?id=51453
Bug ID: 51453 Summary: oleaut32:vartype fails on Windows 10 1909+ Product: Wine Version: 6.10 Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: oleaut32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
oleaut32:vartype has the same set of failures on all the Windows 10 1909+ TestBot VMs:
https://test.winehq.org/data/patterns.html#oleaut32:vartype
vartype.c:3047: Test failed: expected 10990, got 47515; hres=0x00000000 vartype.c:3048: Test failed: expected 10990, got 47515; hres=0x00000000 vartype.c:3055: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3056: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3057: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3058: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3059: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3060: Test failed: expected 12785, got 49310; hres=0x00000000 vartype.c:3070: Test failed: expected 11722, got 48247; hres=0x00000000 vartype.c:3071: Test failed: expected 11722, got 48247; hres=0x00000000 vartype.c:3074: Test failed: expected 10960, got 47485; hres=0x00000000 vartype.c:3075: Test failed: expected 11325, got 47850; hres=0x00000000
It turns out that this happens because the Y2K cutoff date has changed in Windows 10 1903: * Earlier Windows versions used 29, that is two digit years 0-29 mapped to 2000-2029 while years 30-99 mapped to 1930-1999. * But Windows 10 1903+ use 49 by default so that two digit years 0-49 map to 2000-2049 while years 50-99 map to 1950-1999.
oleaut32:vartype expects the old 29 cutoff when it tests how VarDateFromStr() parses dates such as "2 30" which is what causes the failures.
Wine's VarDateFromStr() implementation should also be updated to match the current Windows versions.
https://bugs.winehq.org/show_bug.cgi?id=51453
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase Assignee|wine-bugs@winehq.org |fgouget@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=51453
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|oleaut32:vartype fails on |oleaut32:vartype and |Windows 10 1909+ |oleaut32:vartest fail on | |Windows 10 1909+
--- Comment #1 from François Gouget fgouget@codeweavers.com --- This also impacts the SystemTimeToVariantTime() tests in oleaut32:vartest:
https://test.winehq.org/data/patterns.html#oleaut32:vartest
vartest.c:2121: Test failed: expected 1, 10959, got 1, 47484
https://bugs.winehq.org/show_bug.cgi?id=51453
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c83b7a0f39161aec4165d3d616c | |08afd18a62998 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #2 from François Gouget fgouget@codeweavers.com --- This is fixed:
commit c83b7a0f39161aec4165d3d616c08afd18a62998 Author: Francois Gouget fgouget@codeweavers.com AuthorDate: Fri Jul 16 16:07:08 2021 +0200
oleaut32: Update the VarDateFromStr() Y2K cutoff.
Old Windows versions used 29 as the Y2K cutoff, that is they mapped two digit years 00-29 to 2000-2029 and years 30-99 to 1930-1999. But starting with Windows 10 1903 the cutoff is now 49 by default. So update Wine to match the current Windows versions and adjust the tests to work for both.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51453 Signed-off-by: Francois Gouget fgouget@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=51453
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.14.