[igt-dev] [PATCH i-g-t] runner: Show why we dump the task state

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 7 09:58:05 UTC 2020


Quoting Petri Latvala (2020-04-07 10:55:45)
> On Tue, Apr 07, 2020 at 09:35:33AM +0100, Chris Wilson wrote:
> > Include the reason why we are dumping the task state (test timeout) in
> > the kmsg log prior to the task state. Hopefully this helps when reading
> > the dump.
> 
> Thanks, hopefully this will reduce the amount of times I hear "look, I
> found evidence, there's a task dump in dmesg, must be caused by it"...
> 
> 
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Petri Latvala <petri.latvala at intel.com>
> > ---
> >  runner/executor.c | 25 ++++++++++++++++---------
> >  1 file changed, 16 insertions(+), 9 deletions(-)
> > 
> > diff --git a/runner/executor.c b/runner/executor.c
> > index 1b69f9c57..7061b28d3 100644
> > --- a/runner/executor.c
> > +++ b/runner/executor.c
> > @@ -678,9 +678,20 @@ static bool sysrq(char cmd)
> >       return success;
> >  }
> >  
> > -static void show_kernel_task_state(void)
> > +static const char *show_kernel_task_state(const char *msg)
> >  {
> > +     int fd;
> > +
> > +     fd = open("/dev/kmsg", O_WRONLY);
> > +     if (fd != -1) {
> > +             write(fd, "<4>[IGT] ", 7);
> 
> Either replace this 7 with the correct 8 or a strlen call.

Pesky political correctness gone too far!
-Chris


More information about the igt-dev mailing list