[Piglit] [PATCH 1/2] framework: handle UnicodeDecodeError
Nicolai Hähnle
nhaehnle at gmail.com
Mon Feb 6 16:37:30 UTC 2017
On 05.02.2017 20:28, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> this happened to me once
Thanks, I vaguely remember seeing something like this as well. Both patches:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
... though you might want to wait a bit to see if there are other
opinions on the second one.
> ---
> framework/test/base.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/framework/test/base.py b/framework/test/base.py
> index 4e7c8b2..756b08a 100644
> --- a/framework/test/base.py
> +++ b/framework/test/base.py
> @@ -356,20 +356,22 @@ class Test(object):
> os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
>
> # Since the process isn't running it's safe to get any remaining
> # stdout/stderr values out and store them.
> self.result.out, self.result.err = proc.communicate()
>
> raise TestRunError(
> 'Test run time exceeded timeout value ({} seconds)\n'.format(
> self.timeout),
> 'timeout')
> + except UnicodeDecodeError as e:
> + raise TestRunError("UnicodeDecodeError.\n", 'crash')
>
> # The setter handles the bytes/unicode conversion
> self.result.out = out
> self.result.err = err
> self.result.returncode = returncode
>
> def __eq__(self, other):
> return self.command == other.command
>
> def __ne__(self, other):
>
More information about the Piglit
mailing list