By default CF_LOCALE matches the current input language, not the default user LCID.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/user32/tests/clipboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 6fc4325e985..73e30996229 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -777,10 +777,11 @@ static void test_synthesized(void) case CF_LOCALE: { UINT *ptr = GlobalLock( data ); + DWORD layout = (DWORD)GetKeyboardLayout(0) & 0xffff; ok( GlobalSize( data ) == sizeof(*ptr), "%u: size %lu\n", i, GlobalSize( data )); - ok( *ptr == GetUserDefaultLCID() || + ok( *ptr == layout || broken( *ptr == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )), - "%u: CF_LOCALE %08x/%08x\n", i, *ptr, GetUserDefaultLCID() ); + "%u: CF_LOCALE %04x/%04x\n", i, *ptr, layout ); GlobalUnlock( data ); break; }
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=90922
Your paranoid android.
=== w1064 (32 bit report) ===
user32: clipboard.c:402: Test failed: GlobalGetAtomNameA should fail clipboard.c:403: Test failed: err -559038737
On Thu, 20 May 2021, Marvin wrote: [...]
=== w1064 (32 bit report) ===
user32: clipboard.c:402: Test failed: GlobalGetAtomNameA should fail clipboard.c:403: Test failed: err -559038737
This is a preexisting failure though it is very rare; there are only two instances on record:
https://test.winehq.org/data/39263558a2088940aaacd6eda19ca23d40b63495/win81_... https://test.winehq.org/data/39263558a2088940aaacd6eda19ca23d40b63495/win81_...
I think the issue is that the test essentially assumes that picking an integer at random will not yield a valid global atom. But the probability that it does is about <number-of-global-atoms-in-use> / 0xc000, which may well be above 1/100.
I'm sending a patch to fix it.