[PATCH 2/2] user32/tests: Fix broadcast test failures on Windows 10

Huw Davies huw at codeweavers.com
Wed Mar 21 03:47:22 CDT 2018


On Sun, Mar 18, 2018 at 11:26:21PM -0600, Alex Henrie wrote:
> Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> ---
> The failing tests lack permissions or use invalid combinations of flags,
> so it's not too surprising that the behavior changed.
> 
>  dlls/user32/tests/broadcast.c | 50 ++++++++++++++++++++++++++++---------------
>  1 file changed, 33 insertions(+), 17 deletions(-)
> 
> diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c
> index afdb536816..851c47eb96 100644
> --- a/dlls/user32/tests/broadcast.c
> +++ b/dlls/user32/tests/broadcast.c
> @@ -131,8 +131,9 @@ if (0) /* TODO: Check the hang flags */
>      recips = BSM_APPLICATIONS;
>      ResetEvent(hevent);
>      ret = broadcast( BSF_POSTMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, 0 );
> -    ok(ret==1, "Returned: %d\n", ret);
> -    ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n");
> +    ok((ret == 1 && WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT) ||
> +       (ret == 0 && WaitForSingleObject(hevent, 1000) == WAIT_TIMEOUT) /* win10 */,
> +       "Asynchronous message sent instead of synchronous message or no message. Returned: %d\n", ret);
>      PulseEvent(hevent);

As you say, some of these flag combinations are meaningless.  I suggest
we just remove them.

Huw.



More information about the wine-devel mailing list