[PATCH 4/6] windows.media.speech/tests: Handle a broken test.

Rémi Bernon rbernon at codeweavers.com
Thu Apr 21 09:52:57 CDT 2022


On 4/20/22 21:34, Bernhard Kölbl wrote:
> On Win10 1507 x32.
> 
> Signed-off-by: Bernhard Kölbl <besentv at gmail.com>
> ---
>   dlls/windows.media.speech/tests/speech.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
> index dc3742ac402..dd699da9bcd 100644
> --- a/dlls/windows.media.speech/tests/speech.c
> +++ b/dlls/windows.media.speech/tests/speech.c
> @@ -985,7 +985,8 @@ static void test_SpeechRecognizer(void)
>           handler = (void*)0xdeadbeef;
>           hr = IAsyncOperation_SpeechRecognitionCompilationResult_get_Completed(operation, &handler);
>           todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
> -        todo_wine ok(handler == NULL, "Handler had value %p.\n", handler);
> +         /* Broken on Win10 1507 x32... */
> +        todo_wine ok(handler == NULL || broken(handler != &compilation_handler.IAsyncHandler_Compilation_iface), "Handler had value %p.\n", handler);
>   
>           hr = IAsyncOperation_SpeechRecognitionCompilationResult_GetResults(operation, &compilation_result);
>           todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);


As far as I can tell, the correct condition is:

> handler == NULL || handler == &compilation_handler.IAsyncHandler_Compilation_iface

It only seems to happen if the test is compiled on the testbot, like 
when submitting the patch manually, and it seems to be happening when 
the test is executed too soon, even though you waited for completion.

Adding a Sleep also makes handler == NULL consistently happen.

I believe that (possibly on this specific windows version) the handler 
is removed after its has executed, and that sometimes happens after you 
completed the wait and called get_Completed.

I think you should probably remove the test altogether as it's unreliable.

-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list