From bae79eff3cebc59fc969c40ef2b9cf0bbbdd6468 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Jul 2015 16:06:20 +1000 Subject: [PATCH] test: abort if we trigger a libinput bug message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only abort on client or libinput bugs, skip over kernel bugs. Signed-off-by: Peter Hutterer Reviewed-by: Jonas Ã…dahl --- test/litest.c | 4 ++++ test/path.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/test/litest.c b/test/litest.c index 676485ed..51085f19 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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 diff --git a/test/path.c b/test/path.c index 22db7ae5..0b04b196 100644 --- a/test/path.c +++ b/test/path.c @@ -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);