diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-01 15:43:14 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-02 10:53:51 +1000 |
commit | dbe519f1767e44a0ea229c882cab6b0ffe6383cb (patch) | |
tree | 2f4bb3eb88efe766c908b9dbff8620199895204d /test | |
parent | dcbf2c2a44fb04c6001f3bb61714659c0d1f48f4 (diff) |
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/litest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/litest.c b/test/litest.c index fc3e8b5..c479780 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); } |