[igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 7 10:05:49 UTC 2021


Quoting Petri Latvala (2021-01-07 09:55:17)
> On Wed, Jan 06, 2021 at 02:00:35PM +0000, Chris Wilson wrote:
> > Since we no longer immediately abort a test upon a taint, that taint may
> > persist into the next test causing unrelated incompletes. Avoid the
> > tainted inheritance by aborting between tests if the kernel is tainted.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
> > Cc: Petri Latvala <petri.latvala at intel.com>
> > ---
> >  runner/executor.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/runner/executor.c b/runner/executor.c
> > index faf272d85..8cddcf1ce 100644
> > --- a/runner/executor.c
> > +++ b/runner/executor.c
> > @@ -1801,6 +1801,7 @@ bool execute(struct execute_state *state,
> >  
> >       for (; state->next < job_list->size;
> >            state->next++) {
> > +             unsigned long taints;
> >               char *reason = NULL;
> >               int result;
> >  
> > @@ -1836,6 +1837,13 @@ bool execute(struct execute_state *state,
> >                       break;
> >               }
> >  
> > +             if (settings->abort_mask & ABORT_TAINT && tainted(&taints)) {
> > +                     outf("Stopping the rung because the kernel is tainted: %#x.\n",
> > +                          taintss);
> > +                     status = false;
> > +                     break;
> > +             }
> > +
> 
> We already call need_to_abort() a couple of lines above this:
> 
> if (reason != NULL || (reason = need_to_abort(settings)) != NULL) {

Oh, it's the dynamic subtests that are producing the confused results.

More reason to have the tainted selfchecks in libigt.
-Chris


More information about the igt-dev mailing list