From 7e6a9f322f3a09f83c274c670c624cbe7076ad7b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 18 Jun 2025 12:52:29 +1000 Subject: [PATCH] test: restore prefix search in the format Otherwise we get false positives for "pressure:" since that may also show up in the "Queuing ... " message for tablet events. Fixes: 9f6b294e367e ("test: print the log message to a buffer, then print the whole lot") Part-of: --- test/litest.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/litest.c b/test/litest.c index 624611e0..e77f595c 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1311,21 +1311,21 @@ litest_log_handler(struct libinput *libinput, if (!use_colors) color_reset = ""; - else if (strstr(msg, "tap:")) + else if (strstr(format, "tap:")) color = ANSI_BLUE; - else if (strstr(msg, "thumb state:")) + else if (strstr(format, "thumb state:")) color = ANSI_YELLOW; - else if (strstr(msg, "button state:")) + else if (strstr(format, "button state:")) color = ANSI_MAGENTA; - else if (strstr(msg, "touch-size:") || - strstr(msg, "pressure:")) + else if (strstr(format, "touch-size:") || + strstr(format, "pressure:")) color = ANSI_GREEN; - else if (strstr(msg, "palm:") || - strstr(msg, "thumb:")) + else if (strstr(format, "palm:") || + strstr(format, "thumb:")) color = ANSI_CYAN; - else if (strstr(msg, "edge-scroll:")) + else if (strstr(format, "edge-scroll:")) color = ANSI_BRIGHT_GREEN; - else if (strstr(msg, "gesture:")) + else if (strstr(format, "gesture:")) color = ANSI_BRIGHT_YELLOW; fprintf(stderr, "%slitest %s %s%s", color, priority, msg, color_reset);