This sometimes fails on the testbot, usually on the non-us VMs.
https://testbot.winehq.org/JobDetails.pl?Key=59888#k113
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/user32/tests/msg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 3a92ec24276..c73f9ac36b9 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11894,7 +11894,8 @@ static void test_PeekMessage(void) PostMessageA(info.hwnd, WM_CHAR, 'z', 0); qstatus = GetQueueStatus(qs_all_input); ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY) || - qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE), + qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE) || + broken(qstatus == MAKELONG(QS_POSTMESSAGE|QS_SENDMESSAGE, QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE)) /* sometimes on non-us w1064v1809 */, "wrong qstatus %08x\n", qstatus);
InvalidateRect(info.hwnd, NULL, FALSE); @@ -11975,6 +11976,10 @@ static void test_PeekMessage(void)
msg.message = 0; ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT); + /* GetQueueStatus documentation says that it's not a guarantee that PeekMessage will succeed, + * it indeed fails from time to time on the non-us w1064v1809 testbot VMs, let's try again */ + if (!ret && GetQueueStatus(qs_all_input) == MAKELONG(0, QS_PAINT|QS_KEY)) + ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT); ok(ret && msg.message == WM_PAINT, "got %d and %04x instead of TRUE and WM_PAINT\n", ret, msg.message); DispatchMessageA(&msg);