test: add another dispatch for the suspend test

In case the RESUMED isn't written on the wire yet (or it's written with
sendmsg and thus a separate message on its own) we don't have the RESUMED
ready for us yet. Let's call another dispatch to make sure it's processed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-08-21 15:17:10 +10:00
parent d160f6c7af
commit 575943e744

View file

@ -144,6 +144,11 @@ MUNIT_TEST(eistest_device_resume_suspend_twice)
_cleanup_ei_event_ struct ei_event *added =
peck_ei_next_event(ei, EI_EVENT_DEVICE_ADDED);
/* _until_stable() may stop after DEVICE_ADDED since it's
* punting to the caller, so we need another dispatch to
* make sure the RESUMED is really waiting for us here */
ei_dispatch(ei);
_cleanup_ei_event_ struct ei_event *resumed =
peck_ei_next_event(ei, EI_EVENT_DEVICE_RESUMED);