test: abort if we trigger a libinput bug message

Only abort on client or libinput bugs, skip over kernel bugs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
Peter Hutterer 2015-07-29 16:06:20 +10:00
parent dfb442be4e
commit bae79eff3c
2 changed files with 6 additions and 0 deletions

View file

@ -777,6 +777,10 @@ litest_log_handler(struct libinput *libinput,
fprintf(stderr, "litest %s: ", priority);
vfprintf(stderr, format, args);
if (strstr(format, "client bug: ") ||
strstr(format, "libinput bug: "))
litest_abort_msg("libinput bug triggered, aborting.\n");
}
static int

View file

@ -331,7 +331,9 @@ START_TEST(path_add_invalid_path)
li = litest_create_context();
litest_disable_log_handler(li);
device = libinput_path_add_device(li, "/tmp/");
litest_restore_log_handler(li);
ck_assert(device == NULL);
libinput_dispatch(li);