[LTP] [PATCH] lib: tst_taint: Ignore WARN taint flag if already set

Cyril Hrubis chrubis@suse.cz
Wed Oct 16 16:13:39 CEST 2019


Hi!
> > +
> > +	if (mask & TST_TAINT_W && taint & TST_TAINT_W) {
> > +		tst_res(TCONF, "Ignoring already set kernel warning taint");
> > +		mask &= ~TST_TAINT_W;
> 
> Shouldn't this rather mask it from taint_mask?
> Otherwise, won't you still get an error in tst_taint_check()?

Of course.

> > +	}
> > +
> >  	if ((taint & mask) != 0)

And this has to be changed so that we check the taint againts the
taint_mask .

> >  		tst_brk(TBROK, "Kernel is already tainted: %u", taint);
> >  }
> > --
> > 2.21.0
> > 
> > 

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list