qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running tests on Fedora Docker image
@ 2018-07-17 23:37 Philippe Mathieu-Daudé
  2018-07-18  7:25 ` Daniel P. Berrangé
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-17 23:37 UTC (permalink / raw)
  To: John Snow, Kevin Wolf, Fam Zheng, Max Reitz, Daniel P. Berrange,
	Eduardo Habkost
  Cc: qemu-block, qemu-devel, Alex Bennée

I noticed this while running "make docker-test-block@fedora":

$ make docker-test-block@fedora 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.

I suppose we don't want to use Py3 for iotests.

The bisect was obvious =)

  commit 356dc290f0ef930a24b6af3a0908b1cb58ad47c9
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Tue Jan 16 13:42:17 2018 +0000

    docker: change Fedora images to run with python3

    Fedora has switched to Python 3 by default, so it
    makes sense to use that for testing QEMU builds,
    so we get testing of Python 3 compatibility.

    Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

which added:

ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3

I then figured out we can use EXTRA_CONFIGURE_OPTS:

$ make docker-test-block@fedora NETWORK=1 \
  EXTRA_CONFIGURE_OPTS=--python=/usr/bin/python2
  COPY    RUNNER
    RUN test-block in qemu:fedora
Configure options:
--enable-werror --prefix=/tmp/qemu-test/install
--python=/usr/bin/python3 --python=/usr/bin/python2
--target-list=x86_64-softmmu
...
python            /usr/bin/python2 -B
...
Passed all 48 tests
PLATFORM      -- Linux/aarch64 757be6ea0325 4.15.0-20-generic

So let's use this simple workaround :)

  EXTRA_CONFIGURE_OPTS=--python=/usr/bin/python2

Regards,

Phil.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-18 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 23:37 [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running tests on Fedora Docker image Philippe Mathieu-Daudé
2018-07-18  7:25 ` Daniel P. Berrangé
2018-07-18 13:45   ` Eduardo Habkost
2018-07-18 13:51   ` Philippe Mathieu-Daudé

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).