mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-10 21:00:21 +01:00
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:
parent
dfb442be4e
commit
bae79eff3c
2 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue