]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.9/tc-testing-tdc.py-ignore-errors-when-decoding-stdout.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 4.19.9 / tc-testing-tdc.py-ignore-errors-when-decoding-stdout.patch
1 From ff8a346cd1ddcb38269e7b4c25e6ec68c2143e41 Mon Sep 17 00:00:00 2001
2 From: Lucas Bates <lucasb@mojatatu.com>
3 Date: Fri, 16 Nov 2018 17:37:55 -0500
4 Subject: tc-testing: tdc.py: ignore errors when decoding stdout/stderr
5
6 [ Upstream commit 5aaf6428526bcad98d6f51f2f679c919bb75d7e9 ]
7
8 Prevent exceptions from being raised while decoding output
9 from an executed command. There is no impact on tdc's
10 execution and the verify command phase would fail the pattern
11 match.
12
13 Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 Signed-off-by: Sasha Levin <sashal@kernel.org>
16 ---
17 tools/testing/selftests/tc-testing/tdc.py | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
21 index 87a04a8a5945..9b3f414ff1e9 100755
22 --- a/tools/testing/selftests/tc-testing/tdc.py
23 +++ b/tools/testing/selftests/tc-testing/tdc.py
24 @@ -134,9 +134,9 @@ def exec_cmd(args, pm, stage, command):
25 (rawout, serr) = proc.communicate()
26
27 if proc.returncode != 0 and len(serr) > 0:
28 - foutput = serr.decode("utf-8")
29 + foutput = serr.decode("utf-8", errors="ignore")
30 else:
31 - foutput = rawout.decode("utf-8")
32 + foutput = rawout.decode("utf-8", errors="ignore")
33
34 proc.stdout.close()
35 proc.stderr.close()
36 --
37 2.19.1
38