From 0c6f463fe10aa554c67891e30ce338f73662bccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Wed, 18 May 2022 09:59:29 +0200 Subject: [PATCH] dinput/tests: Remove IAsyncOperation reference count checks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are unreliable as the worker thread is holding a reference on the async operation itself. Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- dlls/dinput/tests/force_feedback.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 696828df3fc..9cf636880c0 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -6093,8 +6093,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( result_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_result_async( result_async, 1, Error, 0x86854008, ForceFeedbackLoadEffectResult_EffectNotSupported ); - ref = IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); hr = IForceFeedbackEffect_Start( effect ); todo_wine @@ -6149,8 +6148,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( result_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_result_async( result_async, 1, Completed, S_OK, ForceFeedbackLoadEffectResult_Succeeded ); - ref = IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); set_hid_expect( file, NULL, 0 ); set_hid_expect( file, &expect_effect_start, sizeof(expect_effect_start) ); @@ -6184,8 +6182,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( bool_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_bool_async( bool_async, 1, Completed, S_OK, TRUE ); - ref = IAsyncOperation_boolean_Release( bool_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_boolean_Release( bool_async ); set_hid_expect( file, NULL, 0 ); ref = IForceFeedbackEffect_Release( effect ); @@ -6249,8 +6246,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( result_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_result_async( result_async, 1, Completed, S_OK, ForceFeedbackLoadEffectResult_Succeeded ); - ref = IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); set_hid_expect( file, NULL, 0 ); set_hid_expect( file, &expect_effect_start, sizeof(expect_effect_start) ); @@ -6284,8 +6280,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( bool_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_bool_async( bool_async, 1, Completed, S_OK, TRUE ); - ref = IAsyncOperation_boolean_Release( bool_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_boolean_Release( bool_async ); set_hid_expect( file, NULL, 0 ); ref = IForceFeedbackEffect_Release( effect ); @@ -6355,8 +6350,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( result_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_result_async( result_async, 1, Completed, S_OK, ForceFeedbackLoadEffectResult_Succeeded ); - ref = IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); set_hid_expect( file, NULL, 0 ); set_hid_expect( file, &expect_effect_start, sizeof(expect_effect_start) ); @@ -6390,8 +6384,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( bool_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_bool_async( bool_async, 1, Completed, S_OK, TRUE ); - ref = IAsyncOperation_boolean_Release( bool_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_boolean_Release( bool_async ); set_hid_expect( file, NULL, 0 ); ref = IForceFeedbackEffect_Release( effect ); @@ -6437,8 +6430,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( result_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_result_async( result_async, 1, Completed, S_OK, ForceFeedbackLoadEffectResult_Succeeded ); - ref = IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_ForceFeedbackLoadEffectResult_Release( result_async ); set_hid_expect( file, NULL, 0 ); set_hid_expect( file, &expect_effect_start, sizeof(expect_effect_start) ); @@ -6472,8 +6464,7 @@ static void test_windows_gaming_input(void) ret = CloseHandle( bool_async_handler.event ); ok( ret, "CloseHandle failed, error %lu\n", GetLastError() ); check_bool_async( bool_async, 1, Completed, S_OK, TRUE ); - ref = IAsyncOperation_boolean_Release( bool_async ); - ok( ref == 0, "Release returned %lu\n", ref ); + IAsyncOperation_boolean_Release( bool_async ); set_hid_expect( file, NULL, 0 ); ref = IForceFeedbackEffect_Release( effect );