[Piglit] [Patch v4 1/4] framework/dmesg: Adds a new module for dmesg

Dylan Baker baker.dylan.c at gmail.com
Tue Feb 4 09:28:16 PST 2014


On Tuesday, February 04, 2014 12:04:21 PM Ilia Mirkin wrote:
> On Tue, Feb 4, 2014 at 11:07 AM, Dylan Baker <baker.dylan.c at gmail.com> 
wrote:
> > On Tuesday, February 04, 2014 10:59:20 AM Ilia Mirkin wrote:
> >> On Tue, Feb 4, 2014 at 10:50 AM, Dylan Baker <baker.dylan.c at gmail.com>
> >> 
> >> > +        if not self._last_message:
> >> > +            # We need to ensure that there is something in dmesg to
> >> > check
> >> > +            # timestamps.
> >> > +            raise DmesgError(
> >> > +                "Your dmesg ringbuffer is empty, so it's not possible
> >> > to
> >> > check " +                "for timestamp support. Try adding something
> >> > to
> >> > dmesg by " +                "writing /dev/kmsg. ex `echo 'foo' >>
> >> > /dev/kmsg")
> >> 
> >> TBH, I'm not a fan of that -- doing "dmesg -c" isn't such an uncommon
> >> thing. Printing out a warning is fine (and then erroring out when
> >> things don't pan out), but I dunno about making it a hard requirement
> >> to have something in dmesg.
> > 
> > Yeah, I'm not super happy with it either. I just don't see anywhere in the
> > actually called methods we can bail out without having unexpected results
> > first, without doing something as awful as a check for timestamps in
> > dmesg_update(), which would lead to a bad performance hit. Any
> > suggestions?
> 
> Print a warning and let things fail as they go? I prefer to allow
> people to shoot themselves in the foot. Also what will _actually_
> fail? The timestamp isn't parsed anywhere, the only thing that'll go
> wrong is that some dmesg errors might not get picked up if they're
> overly repetitive.
> 
>   -ilia

Ok, that sounds fair.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140204/2ce858b7/attachment.pgp>


More information about the Piglit mailing list