Nikolay Sivov : mfplat/tests: Add a workaround for test failures on Windows 7 VMs.
Alexandre Julliard
julliard at winehq.org
Wed Feb 3 15:39:29 CST 2021
Module: wine
Branch: master
Commit: f920f633d7ef6061ebe85f25e23a8d5a145b33e4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f920f633d7ef6061ebe85f25e23a8d5a145b33e4
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Feb 3 14:27:57 2021 +0300
mfplat/tests: Add a workaround for test failures on Windows 7 VMs.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mfplat/tests/mfplat.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index 71294686ae0..a548e307783 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -5083,15 +5083,19 @@ static void test_queue_com_state(const char *name)
queue_type = name[1] - '0';
hr = pMFAllocateWorkQueueEx(queue_type, &queue);
- ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(queue_type == MF_MULTITHREADED_WORKQUEUE && hr == E_INVALIDARG) /* Win7 */,
+ "Failed to allocate a queue of type %u, hr %#x.\n", queue_type, hr);
- callback.param = queue;
- hr = MFPutWorkItem(queue, &callback.IMFAsyncCallback_iface, NULL);
- ok(SUCCEEDED(hr), "Failed to queue work item, hr %#x.\n", hr);
- WaitForSingleObject(callback.event, INFINITE);
+ if (SUCCEEDED(hr))
+ {
+ callback.param = queue;
+ hr = MFPutWorkItem(queue, &callback.IMFAsyncCallback_iface, NULL);
+ ok(SUCCEEDED(hr), "Failed to queue work item, hr %#x.\n", hr);
+ WaitForSingleObject(callback.event, INFINITE);
- hr = MFUnlockWorkQueue(queue);
- ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr);
+ hr = MFUnlockWorkQueue(queue);
+ ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr);
+ }
}
CloseHandle(callback.event);
More information about the wine-cvs
mailing list