From: Nikolay Sivov Subject: Re: [PATCH 5/7] mfplat/tests: Use synchronous API to get media events. Message-Id: <1a7ab3aa-a724-d980-15d2-59d2603b7553@codeweavers.com> Date: Wed, 8 Sep 2021 15:13:25 +0300 In-Reply-To: <20210906151109.225515-5-gmascellani@codeweavers.com> References: <20210906151109.225515-1-gmascellani@codeweavers.com> <20210906151109.225515-5-gmascellani@codeweavers.com> On 9/6/21 6:11 PM, Giovanni Mascellani wrote: > An asynchronous media event request cannot be cancelled. This means that > we cannot test for no event firing within a certain timeout, because > if we did we would leave a pending thread that will spoil future tests. > Using synchronous APIs and repeated requests, we can wait for an even > with a certain timeout, without doing damages if the timeout is reached. I believe we talked about this at some point. Synchronous GetEvent() is a problem because it will block forever if something goes wrong. I don't see how doing NO_WAIT a couple of times solves anything, if didn't get your event doing this batch of calls, it doesn't mean you won't get it during following tests, unless you use new source instance every time. Then again, nothing stops you from filtering unrelated events in async callback, so they don't interfere with tests to follow. Apparently there are some crashes on Windows 7 still, after 5/7, so hard to tell if this change helped anything. For pausing, I think some manual testing with higher level API, like mfplay, and audio-only pipeline for simplicity, should be enough.