test: limit the wait_for_event timeout to 2s

No internal timeout we have takes longer than 2s, so we can abort if we don't
succeed. This gives us a better backtrace to figure out where we're hanging
than the SIGABRT that check will eventually send us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-06-01 15:43:14 +10:00
parent dcbf2c2a44
commit dbe519f176

View file

@ -2353,8 +2353,8 @@ litest_wait_for_event_of_type(struct libinput *li, ...)
struct libinput_event *event;
while ((type = libinput_next_event_type(li)) == LIBINPUT_EVENT_NONE) {
int rc = poll(&fds, 1, -1);
litest_assert_int_gt(rc, -1);
int rc = poll(&fds, 1, 2000);
litest_assert_int_gt(rc, 0);
libinput_dispatch(li);
}