summary refs log tree commit diff stats
path: root/python/qemu/utils/__init__.py
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-05-15 15:45:54 +0200
committerCleber Rosa <crosa@redhat.com>2021-07-13 13:18:50 -0400
commit9f5193413026ed65f9651108b6656054b40e43a0 (patch)
tree2262533e4dd331007ad619d77aa71c16c4987b53 /python/qemu/utils/__init__.py
parentd5adf9d52b36d63347b2f658b8c67567ff6bd525 (diff)
downloadfocaccia-qemu-9f5193413026ed65f9651108b6656054b40e43a0.tar.gz
focaccia-qemu-9f5193413026ed65f9651108b6656054b40e43a0.zip
tests/acceptance: Ignore binary data sent on serial console
If a guest sends binary data on the serial console, we get:

 File "tests/acceptance/avocado_qemu/__init__.py", line 92,
   in _console_interaction msg = console.readline().strip()
 File "/usr/lib64/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 0xa9 in position 2: invalid start byte

Since we use the console with readline(), fix it the easiest
way possible: ignore binary data (all current tests compare
text string anyway).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210515134555.307404-2-f4bug@amsat.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Diffstat (limited to 'python/qemu/utils/__init__.py')
0 files changed, 0 insertions, 0 deletions