]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemurunner: Use surrogateescape decoding
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Jun 2016 12:27:25 +0000 (13:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jun 2016 07:10:04 +0000 (08:10 +0100)
Since the stream can contain invalid binary characters (e.g. from
ppc's bootloader) use surrogateescape decoding to ensure we do process
the character stream, else it can hang/timeout.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index e408fbbf3a73941a2935f3df0740d64d44e66365..b8ac3f0bb6b5ece871f21a76bec8e7efcaa03596 100644 (file)
@@ -234,7 +234,7 @@ class QemuRunner:
                         data = data + sock.recv(1024)
                         if data:
                             try:
-                                data = data.decode("utf-8")
+                                data = data.decode("utf-8", errors="surrogateescape")
                                 bootlog += data
                                 data = b''
                                 if re.search(".* login:", bootlog):