summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLucas Bates <lucasb@mojatatu.com>2018-11-16 17:37:55 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-17 21:54:53 -0800
commit5aaf6428526bcad98d6f51f2f679c919bb75d7e9 (patch)
tree59be38def52a591b15c0e8e8bd985a676d8d355b /tools
parent16f7eb2b77b55da816c4e207f3f9440a8cafc00a (diff)
downloadlinux-5aaf6428526bcad98d6f51f2f679c919bb75d7e9.tar.bz2
tc-testing: tdc.py: ignore errors when decoding stdout/stderr
Prevent exceptions from being raised while decoding output from an executed command. There is no impact on tdc's execution and the verify command phase would fail the pattern match. Signed-off-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/tc-testing/tdc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
index 87a04a8a5945..9b3f414ff1e9 100755
--- a/tools/testing/selftests/tc-testing/tdc.py
+++ b/tools/testing/selftests/tc-testing/tdc.py
@@ -134,9 +134,9 @@ def exec_cmd(args, pm, stage, command):
(rawout, serr) = proc.communicate()
if proc.returncode != 0 and len(serr) > 0:
- foutput = serr.decode("utf-8")
+ foutput = serr.decode("utf-8", errors="ignore")
else:
- foutput = rawout.decode("utf-8")
+ foutput = rawout.decode("utf-8", errors="ignore")
proc.stdout.close()
proc.stderr.close()