From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 0BA4A77330 for ; Wed, 1 Jun 2016 12:35:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u51CZeIP006852; Wed, 1 Jun 2016 13:35:54 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tFoc7qj_mUKs; Wed, 1 Jun 2016 13:35:54 +0100 (BST) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u51CZpHe006890 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Jun 2016 13:35:52 +0100 Received: from richard by hex with local (Exim 4.86) (envelope-from ) id 1b85NH-0000lz-Hd; Wed, 01 Jun 2016 13:35:51 +0100 From: Richard Purdie To: openembedded-core@lists.openembedded.org Date: Wed, 1 Jun 2016 13:35:40 +0100 Message-Id: <1464784540-2786-22-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464784540-2786-1-git-send-email-richard.purdie@linuxfoundation.org> References: <1464784540-2786-1-git-send-email-richard.purdie@linuxfoundation.org> Subject: [PATCH 22/22] qemurunner: Use surrogateescape decoding X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 12:35:56 -0000 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 --- meta/lib/oeqa/utils/qemurunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index e408fbb..b8ac3f0 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -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): -- 2.5.0