From dbe519f1767e44a0ea229c882cab6b0ffe6383cb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 1 Jun 2017 15:43:14 +1000 Subject: [PATCH] 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 --- test/litest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/litest.c b/test/litest.c index fc3e8b57..c4797802 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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); }