diff --git a/test/test-eis.c b/test/test-eis.c index 1554206..7680e79 100644 --- a/test/test-eis.c +++ b/test/test-eis.c @@ -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);