[Piglit] [PATCH 3/4] Use the new dmesg class

Daniel Vetter daniel at ffwll.ch
Wed Feb 5 00:48:49 PST 2014


On Fri, Jan 31, 2014 at 05:02:09PM -0800, Dylan Baker 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>

> diff --git a/tests/igt.py b/tests/igt.py
> index 2c107f3..b5c9f3c 100644
> --- a/tests/igt.py
> +++ b/tests/igt.py
> @@ -74,19 +74,19 @@ class IGTTest(ExecTest):
>      def __init__(self, binary, arguments=[]):
>          ExecTest.__init__(self, [path.join(igtTestRoot, binary)] + arguments)
>  
> -    def interpretResult(self, out, returncode, results, dmesg):
> +    def interpretResult(self, out, returncode, results):
>          if not igtEnvironmentOk:
>              return out
>  
>          if returncode == 0:
> -            results['result'] = 'dmesg-warn' if dmesg != '' else 'pass'
> +            results['result'] = 'pass'
>          elif returncode == 77:
>              results['result'] = 'skip'
>          else:
> -            results['result'] = 'dmesg-fail' if dmesg != '' else 'fail'
> +            results['result'] = 'fail'
>          return out
> +
>      def run(self, env):
> -        env.dmesg = True

Does this mean that igt runs won't use dmesg reporting by default? For igt
it is integral to also catch any dmesg errors, a lot of the tests rely on
in-kernel self-checks to catch issues. Hence why we must enforce this.
-Daniel

>          if not igtEnvironmentOk:
>              results = TestResult()
>              results['result'] = 'fail'
> diff --git a/tests/oglconform.py b/tests/oglconform.py
> index b9b79b8..857d0cd 100644
> --- a/tests/oglconform.py
> +++ b/tests/oglconform.py
> @@ -51,13 +51,13 @@ class OGLCTest(ExecTest):
>      def __init__(self, category, subtest):
>          ExecTest.__init__(self, [bin_oglconform, '-minFmt', '-v', '4', '-test', category, subtest])
>  
> -    def interpretResult(self, out, returncode, results, dmesg):
> +    def interpretResult(self, out, returncode, results):
>          if self.skip_re.search(out) is not None:
>              results['result'] = 'skip'
>          elif re.search('Total Passed : 1', out) is not None:
> -            results['result'] = 'dmesg-warn' if dmesg != '' else 'pass'
> +            results['result'] = 'pass'
>          else:
> -            results['result'] = 'dmesg-fail' if dmesg != '' else 'fail'
> +            results['result'] = 'fail'
>          return out
>  
>  # Create a new top-level 'oglconform' category
> -- 
> 1.8.5.3
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Piglit mailing list