[Piglit] RFC enhance dmesg handling in piglit

Daniel Vetter daniel at ffwll.ch
Tue Nov 12 10:49:32 PST 2013


On Tue, Nov 12, 2013 at 07:21:50PM +0100, Daniel Vetter wrote:
> On Tue, Nov 12, 2013 at 07:53:58AM -0800, Dylan Baker wrote:
> > This series cleans up the dmesg handlingin piglit by implementing a
> > module with two classes, one for reading dmesg, and the other that acts
> > as a dummy class on non-posix systems, this allows dmesg to just always
> > be turned on all the time.
> > 
> > Secondly this new dmesg class has the ability to filter dmesg entries,
> > searching for specific regular expressions and classifying them as
> > either 'warns' or 'fails'.
> > 
> > Currently the filtering is fairly simply, and I expect to have at least
> > one more iteration of these patches with more enries for dmesg. It
> > curretly as an example marks any test the segfaults as a 'warn', and
> > searches for some entries emmitted by the i915 driver and marks them
> > 'fail'.
> 
> Looks like we're colliding a bit here, cool ;-)
> 
> Essentially for i-g-t testcases the rule is that everything in dmesg which
> isn't at the debug/info level should make the test fail. Otoh if the tests
> succeeds and there's only new info/debug stuff in dmesg, then the result
> state shouldn't be set to 'warn'. This is because a lot of our tests are
> expected to generate info level messages (e.g. simulated gpu hangs or
> module reload). And we often enable full drm debugging when running tests,
> which spews a lot.
> 
> So either we need to capture the raw dmesg output to be able to pattern
> match log-levels (dmesg -r). Or we do the cheap trick I've done in the
> patch submitted yesterday of simply filtering out unwanted levels at the
> source.
> 
> But overall I really want dmesg capture support by default for igt tests.

Another wishlist item while I'm at it: Continously grabbing dmesg in a 2nd
thread would be nice. Some of the kms tests we have produce mindboggling
amounts of debug noise, so if we only capture at the end we have a good
chance of missing errors.

But doing that requires that we have raw dmesg functions working in
python so that we can do blocking io on /dev/kmsg. Unfortunately my python
fu isn't up to that challenge ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Piglit mailing list