qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running


From: Eduardo Habkost
Subject: Re: [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running tests on Fedora Docker image
Date: Wed, 18 Jul 2018 10:45:07 -0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Wed, Jul 18, 2018 at 08:25:48AM +0100, Daniel P. Berrangé wrote:
> On Tue, Jul 17, 2018 at 08:37:58PM -0300, Philippe Mathieu-Daudé wrote:
> > I noticed this while running "make address@hidden":
> > 
> > $ make address@hidden NETWORK=1
> >   BUILD   fedora
> >     RUN test-block in qemu:fedora
> > Configure options:
> > --enable-werror --prefix=/tmp/qemu-test/install
> > --python=/usr/bin/python3 --target-list=x86_64-softmmu
> > ...
> > python            /usr/bin/python3 -B
> > ...
> > 
> > 194         - output mismatch (see 194.out.bad)
> > --- /tmp/qemu-test/src/tests/qemu-iotests/194.out       2018-07-17
> > 22:51:10.000000000 +0000
> > +++ /tmp/qemu-test/build/tests/qemu-iotests/194.out.bad 2018-07-17
> > 22:58:01.646916625 +0000
> > @@ -1,18 +1,18 @@
> >  Launching VMs...
> >  Launching NBD server on destination...
> > -{u'return': {}}
> > -{u'return': {}}
> > +{'return': {}}
> > +{'return': {}}
> > 
> > and many more errors, until:
> > 
> > Failures: 045 132 148 152 162 169 194 205 208 218 222
> > Failed 11 of 49 tests
> > Test failed: iotests raw
> > 
> > All failures are due to Python2 syntax.
> > I started to fix but noticed there are too many and this isn't to
> > correct fix for this release.
> 
> Were they all due to the unicode string prefix, or where there
> difference failures too ?
> 
> The unicode string prefix could probably be fixed once by changing
> the log() method in iotests.py to have a built-in filter that
> chomps the leading 'u'

We can implement more consistent behavior by making the QMP
methods return a dictionary object with a custom __unicode__()
method.

Using JSON when printing QMP messages (instead of the default
repr() output) is probably a good idea everywhere (not just on
iotests).

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]