From: Kory Maincent <kory.maincent@bootlin.com>
To: buildroot@buildroot.org
Cc: yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com
Subject: [Buildroot] [PATCH v2 4/6] support/testing/infra/emulator.py: update encoding when calling qemu
Date: Tue, 21 Sep 2021 15:28:27 +0200 [thread overview]
Message-ID: <20210921132829.56405-5-kory.maincent@bootlin.com> (raw)
In-Reply-To: <20210921132829.56405-1-kory.maincent@bootlin.com>
With UTF-8 got issue with wrong character returned by Qemu when using EFI
BIOS. This breaks the test process with the following error. Update to
ISO-8859-1 encoding to avoid it.
emulator.login()
File "/home/kmaincent/Documents/projects/ariane-groupe/buildroot/support/testing/infra/emulator.py", line 89, in login
index = self.qemu.expect(["buildroot login:", pexpect.TIMEOUT],
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 340, in expect
return self.expect_list(compiled_pattern_list,
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 111, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 485, in read_nonblocking
return super(spawn, self).read_nonblocking(size)
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 178, in read_nonblocking
s = self._decoder.decode(s, final=False)
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 0: invalid continuation byte
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
support/testing/infra/emulator.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
index 0a77eb80fc..1fab9caad8 100644
--- a/support/testing/infra/emulator.py
+++ b/support/testing/infra/emulator.py
@@ -76,7 +76,7 @@ class Emulator(object):
self.logfile.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd))
self.qemu = pexpect.spawn(qemu_cmd[0], qemu_cmd[1:],
timeout=5 * self.timeout_multiplier,
- encoding='utf-8',
+ encoding='ISO-8859-1',
env={"QEMU_AUDIO_DRV": "none"})
# We want only stdout into the log to avoid double echo
self.qemu.logfile_read = self.logfile
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-09-21 13:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 13:28 [Buildroot] [PATCH v2 0/6] Add support for ISO9660 image compatible with Legacy and EFI BIOS Kory Maincent
2021-09-21 13:28 ` [Buildroot] [PATCH v2 1/6] boot/grub2: add support to build multiple Grub2 configurations in the same build Kory Maincent
2021-09-21 16:37 ` Yann E. MORIN
2021-09-21 17:20 ` Arnout Vandecappelle
2021-09-21 17:26 ` Yann E. MORIN
2021-09-21 17:49 ` Köry Maincent
2021-09-21 19:41 ` Yann E. MORIN
2021-09-22 7:45 ` Köry Maincent
2021-09-21 13:28 ` [Buildroot] [PATCH v2 2/6] fs/iso9660: add support to Grub EFI bootloader in the image Kory Maincent
2021-09-21 15:36 ` Yann E. MORIN
2021-09-21 18:41 ` Köry Maincent
2021-09-21 19:52 ` Yann E. MORIN
2021-09-21 13:28 ` [Buildroot] [PATCH v2 3/6] fs/iso9660: add support for hybrid image using Grub bootloader on BIOS and EFI Kory Maincent
2021-09-21 13:28 ` Kory Maincent [this message]
2021-09-21 13:28 ` [Buildroot] [PATCH v2 5/6] boot/edk2: add support to i386 architecture Kory Maincent
2021-09-21 13:28 ` [Buildroot] [PATCH v2 6/6] support/testing/tests/fs/test_iso9660.py: add support to test using EFI BIOS Kory Maincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210921132829.56405-5-kory.maincent@bootlin.com \
--to=kory.maincent@bootlin.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox