[Piglit] [Patch v3 3/4] Use the new dmesg class
Dylan Baker
baker.dylan.c at gmail.com
Tue Feb 4 06:06:25 PST 2014
On Monday, February 03, 2014 07:41:42 PM Ilia Mirkin wrote:
> On Mon, Feb 3, 2014 at 6:40 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > This actually makes use of the new dmesg class rather than the dmesg
> > functions. It touches a lot of files, but almost all of these changes
> > are code removal rather than code addition.
> >
> > Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> One little comment/question below:
> > ---
> >
> > framework/core.py | 30 ++++++++++++++++++++++++-----
> > framework/exectest.py | 50
> > ++++++------------------------------------------ framework/gleantest.py
> > | 6 +++---
> > framework/shader_test.py | 2 +-
> > piglit-run.py | 5 +++--
> > tests/es3conform.py | 6 +++---
> > tests/igt.py | 8 ++++----
> > tests/oglconform.py | 6 +++---
> > 8 files changed, 48 insertions(+), 65 deletions(-)
> >
> > diff --git a/framework/core.py b/framework/core.py
> > index da2a716..01aa1b5 100644
> > --- a/framework/core.py
> > +++ b/framework/core.py
> >
> > @@ -424,7 +424,7 @@ class Test(object):
> > def run(self):
> > raise NotImplementedError
> >
> > - def execute(self, env, path, json_writer):
> >
> > + def execute(self, env, path, json_writer, dmesg):
> > '''
> > Run the test.
> >
> > @@ -440,8 +440,10 @@ class Test(object):
> > try:
> > status("running")
> > time_start = time.time()
> >
> > + dmesg.update_dmesg()
> >
> > self._test_hook_execute_run()
> > result = self.run(env)
> >
> > + result = dmesg.update_result(result)
> >
> > time_end = time.time()
> >
> > if 'time' not in result:
> > result['time'] = time_end - time_start
>
> Did the old code include dmesg runtime in the test time? I'm a bit
> lazy and haven't checked, and these diffs don't provide enough context
> -- diff --show-function doesn't work so well for python :)
Yeah, the existing code modifies each class' run and interpretResults methods.
>
> > @@ -111,19 +83,14 @@ class ExecTest(Test):
> > '--tool=memcheck']
> >
> > i = 0
> >
> > - dmesg_diff = ''
> >
> > while True:
> > if self.skip_test:
> > out = "PIGLIT: {'result': 'skip'}\n"
> > err = ""
> > returncode = None
> >
> > else:
> > - if env.dmesg:
> > - old_dmesg = read_dmesg()
> > - (out, err, returncode) = \
> > - self.get_command_result(command, fullenv)
> > - if env.dmesg:
> > - dmesg_diff = get_dmesg_diff(old_dmesg,
> > read_dmesg()) + out, err, returncode =
> > self.get_command_result(command, +
> > fullenv)>
> > # https://bugzilla.gnome.org/show_bug.cgi?id=680214 is
> > # affecting many developers. If we catch it
-------------- 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/044544ca/attachment.pgp>
More information about the Piglit
mailing list