[PATCH libinput 2/2] test: don't abort for timer offset errors during valgrind runs

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 1 07:36:37 UTC 2018


Too easy to trigger with the short button debouncing offsets

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/litest.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/litest.c b/test/litest.c
index befb486a..dcbed5c9 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -691,8 +691,14 @@ litest_log_handler(struct libinput *libinput,
 		fprintf(stderr, ANSI_NORMAL);
 
 	if (strstr(format, "client bug: ") ||
-	    strstr(format, "libinput bug: "))
+	    strstr(format, "libinput bug: ")) {
+		/* valgrind is too slow and some of our offsets are too
+		 * short, don't abort if during a valgrind run we get a
+		 * negative offset */
+		if (!getenv("USING_VALGRIND") ||
+		    !strstr(format, "offset negative"))
 		litest_abort_msg("libinput bug triggered, aborting.\n");
+	}
 }
 
 static char *
-- 
2.14.3



More information about the wayland-devel mailing list