mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-03 06:50:10 +01:00
test: track bug messages separately in log captures
Notably, this also tracks kernel bugs now as opposed to just other bugs. It is up to tests checking for the expected message. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1284>
This commit is contained in:
parent
465fce9128
commit
d9a4667a14
2 changed files with 7 additions and 0 deletions
|
|
@ -4785,6 +4785,7 @@ litest_logcapture_destroy(struct litest_logcapture *c)
|
|||
strv_free(c->errors);
|
||||
strv_free(c->infos);
|
||||
strv_free(c->debugs);
|
||||
strv_free(c->bugs);
|
||||
free(c);
|
||||
}
|
||||
|
||||
|
|
@ -4822,6 +4823,11 @@ litest_log_handler_msgcapture(struct libinput *libinput,
|
|||
use_colors ? ANSI_NORMAL : "",
|
||||
message);
|
||||
|
||||
if (strstr(message, "kernel bug: ") || strstr(message, "client bug: ") ||
|
||||
strstr(message, "libinput bug: ") || strstr(message, "plugin bug: ")) {
|
||||
capture->bugs = strv_append_strdup(capture->bugs, message);
|
||||
}
|
||||
|
||||
switch (pri) {
|
||||
case LIBINPUT_LOG_PRIORITY_ERROR:
|
||||
capture->errors = strv_append_take(capture->errors, &message);
|
||||
|
|
|
|||
|
|
@ -1361,6 +1361,7 @@ struct litest_logcapture {
|
|||
char **errors;
|
||||
char **infos;
|
||||
char **debugs;
|
||||
char **bugs;
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue