qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Buono <dbuono@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Daniele Buono" <dbuono@linux.vnet.ibm.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: [PATCH 0/1] tests/acceptance: set VM socket encoding to UTF-8
Date: Tue, 21 Jul 2020 08:55:21 -0400	[thread overview]
Message-ID: <20200721125522.20511-1-dbuono@linux.vnet.ibm.com> (raw)

Some of the acceptance tests were failing for me with an error while
decoding characters coming from the VMs running for the test.

The error looked like this:

(30/36) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_nios2_10m50: ERROR: 'ascii' codec can't decode byte 0xc2 in position 36: ordinal not in range(128) (1.29 s)

The very same test is running fine on GitLab CI

An investigation of the issue shows that the socket we are using between
QEMU and AVOCADO is using the default encoding of the host OS. In my
case, locale was set to plain ASCII with LANG=C. Setting it to a UTF-8
locale fixed the issue, but a safer approach should be to just tell
Python to always use a UTF-8 charset for the socket. This is what the
patch does.

Daniele Buono (1):
  tests/acceptance: set VM socket encoding to UTF-8

 tests/acceptance/avocado_qemu/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.2



             reply	other threads:[~2020-07-21 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 12:55 Daniele Buono [this message]
2020-07-21 12:55 ` [PATCH 1/1] tests/acceptance: set VM socket encoding to UTF-8 Daniele Buono

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=20200721125522.20511-1-dbuono@linux.vnet.ibm.com \
    --to=dbuono@linux.vnet.ibm.com \
    --cc=crosa@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).