[PATCH libinput 2/2] test: abort if we trigger a libinput bug message
Peter Hutterer
peter.hutterer at who-t.net
Wed Jul 29 00:45:45 PDT 2015
Only abort on client or libinput bugs, skip over kernel bugs.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/litest.c | 4 ++++
test/path.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/test/litest.c b/test/litest.c
index 676485e..51085f1 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 22db7ae..0b04b19 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);
--
2.4.3
More information about the wayland-devel
mailing list