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
6 [ Upstream commit 5aaf6428526bcad98d6f51f2f679c919bb75d7e9 ]
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
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>
17 tools/testing/selftests/tc-testing/tdc.py | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
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()
27 if proc.returncode != 0 and len(serr) > 0:
28 - foutput = serr.decode("utf-8")
29 + foutput = serr.decode("utf-8", errors="ignore")
31 - foutput = rawout.decode("utf-8")
32 + foutput = rawout.decode("utf-8", errors="ignore")