test: add an extra assert into litest_wait_for_event_of_type
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 30 May 2017 05:26:16 +0000 (15:26 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 31 May 2017 23:52:31 +0000 (09:52 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c

index 9fc1235..fc3e8b5 100644 (file)
@@ -2353,7 +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) {
-                       poll(&fds, 1, -1);
+                       int rc = poll(&fds, 1, -1);
+                       litest_assert_int_gt(rc, -1);
                        libinput_dispatch(li);
                }