qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-2.12] qapi: Force UTF8 encoding when parsing qapi files
Date: Tue, 20 Mar 2018 09:37:15 +0000	[thread overview]
Message-ID: <20180320093715.GC4530@redhat.com> (raw)
In-Reply-To: <20180319205040.1113423-1-eblake@redhat.com>

On Mon, Mar 19, 2018 at 03:50:40PM -0500, Eric Blake wrote:
> Commit d4e5ec877 already fixed things to work around Python 3's
> lame bug of having LC_ALL=C not be 8-bit clean, when parsing the
> main QMP qapi files; but failed to do likewise in the tests
> directory.  As a result, running 'LC_ALL=C make check' fails on
> escape-too-big and unicode-str when using python 3 with a nasty
> stack trace instead of the intended graceful error message that
> QAPI doesn't yet support 8-bit data (the two tests contain
> Unicode é, when parsed in UTF-8; they represent something
> different when parsed in a proper single-byte C locale, but that
> doesn't matter to the error message printed out, provided that
> brain-dead Python hasn't first choked on the input instead of
> being 8-bit clean).
> 
> Ideally, we'd teach the qapi generator scripts to automatically
> slurp things in using UTF-8 regardless of locale, and to honor
> content that is not limited to 7 bit data rather than gracefully
> erroring out; but until then, since our graceful error depends
> on python parsing 8-bit data (even if nothing we generate uses
> 8-bit data), our quick fix is to use the right locale when
> running these tests.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> 
> Will go through my QAPI tree for post-freeze bug fixes
> 
>  tests/Makefile.include | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

      reply	other threads:[~2018-03-20  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 20:50 [Qemu-devel] [PATCH for-2.12] qapi: Force UTF8 encoding when parsing qapi files Eric Blake
2018-03-20  9:37 ` Daniel P. Berrangé [this message]

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=20180320093715.GC4530@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).