[PATCH] mfplat/tests: Fix an event queue refcounting test on Vista.

Francois Gouget fgouget at codeweavers.com
Wed Apr 21 13:20:48 CDT 2021


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

> That means Vista leaks it, not something we want to do. I'd rather 
> skip all tests on Vista.

That seems a bit radical. As far as this failure is concerned, this 
patch should be sufficient.

 dlls/mfplat/tests/mfplat.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index caf6f78d9e9..fbac078bed3 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -3129,7 +3129,9 @@ static void test_event_queue(void)
     EXPECT_REF(&callback.IMFAsyncCallback_iface, 2);
 
     IMFMediaEventQueue_Release(queue);
-    EXPECT_REF(&callback.IMFAsyncCallback_iface, 1);
+    ret = get_refcount(&callback.IMFAsyncCallback_iface);
+    ok(ret == 1 || broken(ret == 2) /* Vista */,
+       "Unexpected refcount %d, expected 1.\n", ret);
 
     hr = MFShutdown();
     ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
-- 
2.20.1



More information about the wine-devel mailing list