[igt-dev] [RFC PATCH i-g-t 6/6] lib/core: Use whitelist with kmsg filter
Chris Wilson
chris at chris-wilson.co.uk
Mon Feb 26 15:45:02 UTC 2018
Quoting Petri Latvala (2018-02-21 15:19:35)
> dmesg messages of level >=warn don't result in an IGT_LOG_WARN if they
> match a whitelist regexp now.
>
> The whitelist is not configureable without rebuilding, and it's not
> even possible to use a different whitelist for different drivers;
> launching the kmsg monitor happens way before opening the driver (if
> any).
>
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> ---
> lib/igt_core.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 5c93432d..d4495c3f 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -55,6 +55,7 @@
> #include <limits.h>
> #include <locale.h>
> #include <uwildmat/uwildmat.h>
> +#include <regex.h>
> #ifdef HAVE_GLIB
> #include <glib.h>
> #endif
> @@ -581,6 +582,16 @@ static void oom_adjust_for_doom(void)
>
> }
>
> +const char IGT_DMESG_WHITELIST[] =
> + "IRQ [0-9]+: no longer affine to CPU[0-9]+"
> + "|IRQ fixup: irq [0-9]+ move in progress, old vector [0-9]+"
> + "|Setting dangerous option [a-z_]+ - tainting kernel"
> + "|Suspending console\\(s\\) \\(use no_console_suspend to debug\\)"
> + "|cache: parent cpu[0-9]+ should not be sleeping"
> + "|hpet[0-9]+: lost [0-9]+ rtc interrupts"
> + "|usb usb[0-9]+: root hub lost power or was reset"
> + ;
Can we load this from a suppressions.txt? That will make it easier to
maintain. One line per suppression, with the "|" implied? Or just load
the entire regexp and compile it exactly as written by the user. Ok,
that makes it more powerful and useful.
-Chris
More information about the igt-dev
mailing list