mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 12:50:33 +01:00
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:
parent
dcbf2c2a44
commit
dbe519f176
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue