All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/46] Python queue 2020-02-06
@ 2020-02-06 21:18 Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 01/46] python/qemu: qmp: Replace socket.error with OSError Philippe Mathieu-Daudé
                   ` (47 more replies)
  0 siblings, 48 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

Hi Peter,

I prepared this series on behalf of Eduardo and
Cleber (one of them will ack this cover).

Regards,

Phil.

The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:

  Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)

are available in the Git repository at:

  https://gitlab.com/philmd/qemu.git tags/python-next-20200206

for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:

  .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)

----------------------------------------------------------------

- Python 3 cleanups:
  . Remove text about Python 2 in qemu-deprecated (Thomas)
  . Remove shebang header (Paolo, Philippe)
  . scripts/checkpatch.pl now allows Python 3 interpreter (Philippe)
  . Explicit usage of Python 3 interpreter in scripts (Philippe)
  . Fix Python scripts permissions (Paolo, Philippe)
  . Drop 'from __future__ import print_function' (Paolo)
  . Specify minimum python requirements in ReadTheDocs configuration (Alex)
- Test UNIX/EXEC transports with migration (Oksana)
- Added extract_from_rpm helper, improved extract_from_deb (Liam)
- Allow to use other serial consoles than default one (Philippe)
- Various improvements in QEMUMonitorProtocol (Wainer)
- Fix kvm_available() on ppc64le (Wainer)

----------------------------------------------------------------

Alex Bennée (1):
  .readthedocs.yml: specify some minimum python requirements

Denis Plotnikov (1):
  tests: rename virtio_seg_max_adjust to virtio_check_params

Liam Merwick (4):
  travis.yml: install rpm2cpio for acceptance tests
  tests/boot_linux_console: add extract_from_rpm method
  tests/boot_linux_console: use os.path for filesystem paths
  tests/boot_linux_console: fix extract_from_deb() comment

Lukáš Doktor (1):
  python: Treat None-return of greeting cmd

Oksana Vohchana (4):
  tests/acceptance/migration: Factor out assert_migration()
  tests/acceptance/migration: Factor out do_migrate()
  tests/acceptance/migration: Test UNIX transport when migrating
  tests/acceptance/migration: Test EXEC transport when migrating

Paolo Bonzini (3):
  scripts/signrom: remove Python 2 support, add shebang
  make all Python scripts executable
  drop "from __future__ import print_function"

Philippe Mathieu-Daudé (24):
  python/qemu/machine: Allow to use other serial consoles than default
  Acceptance tests: Extract _console_interaction()
  Acceptance tests: Add interrupt_interactive_console_until_pattern()
  tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot'
  tests/acceptance/virtio_check_params: Improve exception logging
  tests/acceptance/virtio_check_params: List machine being tested
  tests/acceptance/virtio_check_params: Default to -nodefaults
  tests/acceptance/virtio_check_params: Disable the test
  tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine
  tests/acceptance/version: Default to -nodefaults
  tests/acceptance/migration: Add the 'migration' tag
  tests/acceptance/migration: Default to -nodefaults
  scripts/checkpatch.pl: Only allow Python 3 interpreter
  tests/qemu-iotests/check: Allow use of python3 interpreter
  tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)
  tests: Explicit usage of Python 3
  scripts: Explicit usage of Python 3 (scripts with __main__)
  scripts/minikconf: Explicit usage of Python 3
  scripts/tracetool: Remove shebang header
  tests/acceptance: Remove shebang header
  tests/vm: Remove shebang header
  tests/qemu-iotests: Explicit usage of Python3 (scripts without
    __main__)
  scripts: Explicit usage of Python 3 (scripts without __main__)
  tests/qemu-iotests/check: Only check for Python 3 interpreter

Thomas Huth (2):
  qemu-deprecated: Remove text about Python 2
  tests/acceptance: Add boot tests for some of the QEMU advent calendar
    images

Wainer dos Santos Moschetta (6):
  python/qemu: qmp: Replace socket.error with OSError
  python/qemu: Delint the qmp module
  python/qemu: qmp: Make accept()'s timeout configurable
  python/qemu: qmp: Make QEMUMonitorProtocol a context manager
  python/qemu: qmp: Remove unnused attributes
  python/qemu: accel: Fix kvm_available() on ppc64le

 qemu-deprecated.texi                          |   8 --
 .readthedocs.yml                              |  20 +++
 .travis.yml                                   |   3 +-
 python/qemu/accel.py                          |   3 +-
 python/qemu/machine.py                        |  10 +-
 python/qemu/qmp.py                            |  99 ++++++++++----
 scripts/analyse-9p-simpletrace.py             |   3 +-
 scripts/analyse-locks-simpletrace.py          |   3 +-
 scripts/checkpatch.pl                         |   6 +
 scripts/decodetree.py                         |   2 +-
 scripts/device-crash-test                     |   3 +-
 scripts/dump-guest-memory.py                  |   1 -
 scripts/kvm/kvm_flightrecorder                |   3 +-
 scripts/kvm/vmxcap                            |   1 -
 scripts/minikconf.py                          |   2 +-
 scripts/modules/module_block.py               |   1 -
 scripts/qapi-gen.py                           |   3 +-
 scripts/qapi/doc.py                           |   1 -
 scripts/qmp/qemu-ga-client                    |   3 +-
 scripts/qmp/qmp                               |   3 +-
 scripts/qmp/qmp-shell                         |   3 +-
 scripts/qmp/qom-fuse                          |   2 +-
 scripts/qmp/qom-get                           |   1 -
 scripts/qmp/qom-list                          |   1 -
 scripts/qmp/qom-set                           |   1 -
 scripts/qmp/qom-tree                          |   1 -
 scripts/render_block_graph.py                 |   2 +-
 scripts/replay-dump.py                        |   3 +-
 scripts/signrom.py                            |  11 +-
 scripts/simpletrace.py                        |   3 +-
 scripts/tracetool.py                          |   2 +-
 scripts/tracetool/__init__.py                 |   1 -
 scripts/tracetool/backend/__init__.py         |   1 -
 scripts/tracetool/backend/dtrace.py           |   1 -
 scripts/tracetool/backend/ftrace.py           |   1 -
 scripts/tracetool/backend/log.py              |   1 -
 scripts/tracetool/backend/simple.py           |   1 -
 scripts/tracetool/backend/syslog.py           |   1 -
 scripts/tracetool/backend/ust.py              |   1 -
 scripts/tracetool/format/__init__.py          |   1 -
 scripts/tracetool/format/c.py                 |   1 -
 scripts/tracetool/format/d.py                 |   1 -
 scripts/tracetool/format/h.py                 |   1 -
 scripts/tracetool/format/log_stap.py          |   1 -
 scripts/tracetool/format/simpletrace_stap.py  |   1 -
 scripts/tracetool/format/stap.py              |   1 -
 scripts/tracetool/format/tcg_h.py             |   1 -
 scripts/tracetool/format/tcg_helper_c.py      |   1 -
 scripts/tracetool/format/tcg_helper_h.py      |   1 -
 .../tracetool/format/tcg_helper_wrapper_h.py  |   1 -
 scripts/tracetool/format/ust_events_c.py      |   1 -
 scripts/tracetool/format/ust_events_h.py      |   1 -
 scripts/tracetool/transform.py                |   1 -
 scripts/tracetool/vcpu.py                     |   1 -
 scripts/vmstate-static-checker.py             |   3 +-
 tests/acceptance/avocado_qemu/__init__.py     |  59 +++++++--
 tests/acceptance/boot_linux_console.py        | 124 +++++++++++++++++-
 tests/acceptance/migration.py                 |  57 +++++---
 tests/acceptance/version.py                   |   1 +
 ...g_max_adjust.py => virtio_check_params.py} |  16 ++-
 tests/acceptance/x86_cpu_model_versions.py    |   1 -
 tests/docker/travis.py                        |   3 +-
 tests/guest-debug/test-gdbstub.py             |   1 -
 tests/migration/guestperf/engine.py           |   1 -
 tests/migration/guestperf/plot.py             |   1 -
 tests/migration/guestperf/shell.py            |   1 -
 tests/qapi-schema/test-qapi.py                |   3 +-
 tests/qemu-iotests/030                        |   2 +-
 tests/qemu-iotests/040                        |   2 +-
 tests/qemu-iotests/041                        |   2 +-
 tests/qemu-iotests/044                        |   2 +-
 tests/qemu-iotests/045                        |   2 +-
 tests/qemu-iotests/055                        |   2 +-
 tests/qemu-iotests/056                        |   2 +-
 tests/qemu-iotests/057                        |   2 +-
 tests/qemu-iotests/065                        |   2 +-
 tests/qemu-iotests/093                        |   2 +-
 tests/qemu-iotests/096                        |   2 +-
 tests/qemu-iotests/118                        |   2 +-
 tests/qemu-iotests/124                        |   2 +-
 tests/qemu-iotests/129                        |   2 +-
 tests/qemu-iotests/132                        |   2 +-
 tests/qemu-iotests/136                        |   2 +-
 tests/qemu-iotests/139                        |   2 +-
 tests/qemu-iotests/147                        |   2 +-
 tests/qemu-iotests/148                        |   2 +-
 tests/qemu-iotests/149                        |   3 +-
 tests/qemu-iotests/151                        |   2 +-
 tests/qemu-iotests/152                        |   2 +-
 tests/qemu-iotests/155                        |   2 +-
 tests/qemu-iotests/163                        |   2 +-
 tests/qemu-iotests/165                        |   3 +-
 tests/qemu-iotests/169                        |   2 +-
 tests/qemu-iotests/194                        |   2 +-
 tests/qemu-iotests/196                        |   2 +-
 tests/qemu-iotests/199                        |   2 +-
 tests/qemu-iotests/202                        |   2 +-
 tests/qemu-iotests/203                        |   2 +-
 tests/qemu-iotests/205                        |   2 +-
 tests/qemu-iotests/206                        |   2 +-
 tests/qemu-iotests/207                        |   2 +-
 tests/qemu-iotests/208                        |   2 +-
 tests/qemu-iotests/209                        |   2 +-
 tests/qemu-iotests/210                        |   2 +-
 tests/qemu-iotests/211                        |   2 +-
 tests/qemu-iotests/212                        |   2 +-
 tests/qemu-iotests/213                        |   2 +-
 tests/qemu-iotests/216                        |   2 +-
 tests/qemu-iotests/218                        |   2 +-
 tests/qemu-iotests/219                        |   2 +-
 tests/qemu-iotests/222                        |   2 +-
 tests/qemu-iotests/224                        |   2 +-
 tests/qemu-iotests/228                        |   2 +-
 tests/qemu-iotests/234                        |   2 +-
 tests/qemu-iotests/235                        |   2 +-
 tests/qemu-iotests/236                        |   2 +-
 tests/qemu-iotests/237                        |   2 +-
 tests/qemu-iotests/238                        |   2 +-
 tests/qemu-iotests/242                        |   2 +-
 tests/qemu-iotests/245                        |   2 +-
 tests/qemu-iotests/246                        |   2 +-
 tests/qemu-iotests/248                        |   2 +-
 tests/qemu-iotests/254                        |   2 +-
 tests/qemu-iotests/255                        |   2 +-
 tests/qemu-iotests/256                        |   2 +-
 tests/qemu-iotests/257                        |   2 +-
 tests/qemu-iotests/258                        |   2 +-
 tests/qemu-iotests/260                        |   2 +-
 tests/qemu-iotests/262                        |   2 +-
 tests/qemu-iotests/264                        |   2 +-
 tests/qemu-iotests/266                        |   2 +-
 tests/qemu-iotests/277                        |   2 +-
 tests/qemu-iotests/280                        |   2 +-
 tests/qemu-iotests/281                        |   2 +-
 tests/qemu-iotests/check                      |   2 +-
 tests/qemu-iotests/iotests.py                 |   1 -
 tests/qemu-iotests/nbd-fault-injector.py      |   3 +-
 tests/qemu-iotests/qcow2.py                   |   3 +-
 tests/qemu-iotests/qed.py                     |   3 +-
 tests/vm/basevm.py                            |   2 -
 tests/vm/centos                               |   2 +-
 tests/vm/fedora                               |   2 +-
 tests/vm/freebsd                              |   2 +-
 tests/vm/netbsd                               |   2 +-
 tests/vm/openbsd                              |   2 +-
 tests/vm/ubuntu.i386                          |   2 +-
 146 files changed, 431 insertions(+), 233 deletions(-)
 create mode 100644 .readthedocs.yml
 mode change 100644 => 100755 scripts/minikconf.py
 mode change 100644 => 100755 scripts/signrom.py
 rename tests/acceptance/{virtio_seg_max_adjust.py => virtio_check_params.py} (90%)
 mode change 100755 => 100644
 mode change 100644 => 100755 tests/qemu-iotests/222
 mode change 100644 => 100755 tests/qemu-iotests/245
 mode change 100755 => 100644 tests/vm/basevm.py

-- 
2.21.1



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

* [PULL 01/46] python/qemu: qmp: Replace socket.error with OSError
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 02/46] python/qemu: Delint the qmp module Philippe Mathieu-Daudé
                   ` (46 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

The socket.error is deprecated from Python 3.3, instead it is
made a link to OSError. This change replaces the occurences
of socket.error with OSError.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20191227134101.244496-2-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index 5c8cf6a056..8c6c9847d0 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -47,7 +47,7 @@ class QEMUMonitorProtocol(object):
                         or a tuple in the form ( address, port ) for a TCP
                         connection
         @param server: server mode listens on the socket (bool)
-        @raise socket.error on socket connection errors
+        @raise OSError on socket connection errors
         @note No connection is established, this is done by the connect() or
               accept() methods
         """
@@ -107,8 +107,8 @@ class QEMUMonitorProtocol(object):
         self.__sock.setblocking(0)
         try:
             self.__json_read()
-        except socket.error as err:
-            if err[0] == errno.EAGAIN:
+        except OSError as err:
+            if err.errno == errno.EAGAIN:
                 # No data available
                 pass
         self.__sock.setblocking(1)
@@ -133,7 +133,7 @@ class QEMUMonitorProtocol(object):
         Connect to the QMP Monitor and perform capabilities negotiation.
 
         @return QMP greeting dict
-        @raise socket.error on socket connection errors
+        @raise OSError on socket connection errors
         @raise QMPConnectError if the greeting is not received
         @raise QMPCapabilitiesError if fails to negotiate capabilities
         """
@@ -147,7 +147,7 @@ class QEMUMonitorProtocol(object):
         Await connection from QMP Monitor and perform capabilities negotiation.
 
         @return QMP greeting dict
-        @raise socket.error on socket connection errors
+        @raise OSError on socket connection errors
         @raise QMPConnectError if the greeting is not received
         @raise QMPCapabilitiesError if fails to negotiate capabilities
         """
@@ -167,10 +167,10 @@ class QEMUMonitorProtocol(object):
         self.logger.debug(">>> %s", qmp_cmd)
         try:
             self.__sock.sendall(json.dumps(qmp_cmd).encode('utf-8'))
-        except socket.error as err:
-            if err[0] == errno.EPIPE:
+        except OSError as err:
+            if err.errno == errno.EPIPE:
                 return
-            raise socket.error(err)
+            raise err
         resp = self.__json_read()
         self.logger.debug("<<< %s", resp)
         return resp
-- 
2.21.1



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

* [PULL 02/46] python/qemu: Delint the qmp module
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 01/46] python/qemu: qmp: Replace socket.error with OSError Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 03/46] python/qemu: qmp: Make accept()'s timeout configurable Philippe Mathieu-Daudé
                   ` (45 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

This clean up the pylint-3 report on qmp:

************* Module qemu.qmp
python/qemu/qmp.py:1:0: C0111: Missing module docstring (missing-docstring)
python/qemu/qmp.py:17:0: C0111: Missing class docstring (missing-docstring)
python/qemu/qmp.py:21:0: C0111: Missing class docstring (missing-docstring)
python/qemu/qmp.py:25:0: C0111: Missing class docstring (missing-docstring)
python/qemu/qmp.py:29:0: C0111: Missing class docstring (missing-docstring)
python/qemu/qmp.py:33:0: C0111: Missing class docstring (missing-docstring)
python/qemu/qmp.py:33:0: R0205: Class 'QEMUMonitorProtocol' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
python/qemu/qmp.py:80:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
python/qemu/qmp.py:131:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
python/qemu/qmp.py:159:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
python/qemu/qmp.py:245:4: C0111: Missing method docstring (missing-docstring)
python/qemu/qmp.py:249:4: C0111: Missing method docstring (missing-docstring)
python/qemu/qmp.py:252:4: C0111: Missing method docstring (missing-docstring)
python/qemu/qmp.py:255:4: C0111: Missing method docstring (missing-docstring)

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191227134101.244496-3-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 51 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 41 insertions(+), 10 deletions(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index 8c6c9847d0..f4e04a6683 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -1,5 +1,4 @@
-# QEMU Monitor Protocol Python class
-#
+""" QEMU Monitor Protocol Python class """
 # Copyright (C) 2009, 2010 Red Hat Inc.
 #
 # Authors:
@@ -15,22 +14,34 @@ import logging
 
 
 class QMPError(Exception):
-    pass
+    """
+    QMP base exception
+    """
 
 
 class QMPConnectError(QMPError):
-    pass
+    """
+    QMP connection exception
+    """
 
 
 class QMPCapabilitiesError(QMPError):
-    pass
+    """
+    QMP negotiate capabilities exception
+    """
 
 
 class QMPTimeoutError(QMPError):
-    pass
+    """
+    QMP timeout exception
+    """
 
 
-class QEMUMonitorProtocol(object):
+class QEMUMonitorProtocol:
+    """
+    Provide an API to connect to QEMU via QEMU Monitor Protocol (QMP) and then
+    allow to handle commands and events.
+    """
 
     #: Logger object for debugging messages
     logger = logging.getLogger('QMP')
@@ -81,7 +92,7 @@ class QEMUMonitorProtocol(object):
         while True:
             data = self.__sockfile.readline()
             if not data:
-                return
+                return None
             resp = json.loads(data)
             if 'event' in resp:
                 self.logger.debug("<<< %s", resp)
@@ -132,7 +143,7 @@ class QEMUMonitorProtocol(object):
         """
         Connect to the QMP Monitor and perform capabilities negotiation.
 
-        @return QMP greeting dict
+        @return QMP greeting dict, or None if negotiate is false
         @raise OSError on socket connection errors
         @raise QMPConnectError if the greeting is not received
         @raise QMPCapabilitiesError if fails to negotiate capabilities
@@ -141,6 +152,7 @@ class QEMUMonitorProtocol(object):
         self.__sockfile = self.__sock.makefile()
         if negotiate:
             return self.__negotiate_capabilities()
+        return None
 
     def accept(self):
         """
@@ -169,7 +181,7 @@ class QEMUMonitorProtocol(object):
             self.__sock.sendall(json.dumps(qmp_cmd).encode('utf-8'))
         except OSError as err:
             if err.errno == errno.EPIPE:
-                return
+                return None
             raise err
         resp = self.__json_read()
         self.logger.debug("<<< %s", resp)
@@ -243,14 +255,33 @@ class QEMUMonitorProtocol(object):
         self.__events = []
 
     def close(self):
+        """
+        Close the socket and socket file.
+        """
         self.__sock.close()
         self.__sockfile.close()
 
     def settimeout(self, timeout):
+        """
+        Set the socket timeout.
+
+        @param timeout (float): timeout in seconds, or None.
+        @note This is a wrap around socket.settimeout
+        """
         self.__sock.settimeout(timeout)
 
     def get_sock_fd(self):
+        """
+        Get the socket file descriptor.
+
+        @return The file descriptor number.
+        """
         return self.__sock.fileno()
 
     def is_scm_available(self):
+        """
+        Check if the socket allows for SCM_RIGHTS.
+
+        @return True if SCM_RIGHTS is available, otherwise False.
+        """
         return self.__sock.family == socket.AF_UNIX
-- 
2.21.1



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

* [PULL 03/46] python/qemu: qmp: Make accept()'s timeout configurable
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 01/46] python/qemu: qmp: Replace socket.error with OSError Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 02/46] python/qemu: Delint the qmp module Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 04/46] python/qemu: qmp: Make QEMUMonitorProtocol a context manager Philippe Mathieu-Daudé
                   ` (44 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

Currently the timeout of QEMUMonitorProtocol.accept() is
hard-coded to 15.0 seconds. This added the parameter `timeout`
so the value can be configured by the user.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20200204141111.3207-4-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index f4e04a6683..0e07d80e2a 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -154,16 +154,23 @@ class QEMUMonitorProtocol:
             return self.__negotiate_capabilities()
         return None
 
-    def accept(self):
+    def accept(self, timeout=15.0):
         """
         Await connection from QMP Monitor and perform capabilities negotiation.
 
+        @param timeout: timeout in seconds (nonnegative float number, or
+                        None). The value passed will set the behavior of the
+                        underneath QMP socket as described in [1]. Default value
+                        is set to 15.0.
         @return QMP greeting dict
         @raise OSError on socket connection errors
         @raise QMPConnectError if the greeting is not received
         @raise QMPCapabilitiesError if fails to negotiate capabilities
+
+        [1]
+        https://docs.python.org/3/library/socket.html#socket.socket.settimeout
         """
-        self.__sock.settimeout(15)
+        self.__sock.settimeout(timeout)
         self.__sock, _ = self.__sock.accept()
         self.__sockfile = self.__sock.makefile()
         return self.__negotiate_capabilities()
-- 
2.21.1



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

* [PULL 04/46] python/qemu: qmp: Make QEMUMonitorProtocol a context manager
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 03/46] python/qemu: qmp: Make accept()'s timeout configurable Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 05/46] python/qemu: qmp: Remove unnused attributes Philippe Mathieu-Daudé
                   ` (43 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

This implement the __enter__ and __exit__ functions on
QEMUMonitorProtocol class so that it can be used on 'with'
statement and the resources will be free up on block end:

with QEMUMonitorProtocol(socket_path) as qmp:
    qmp.connect()
    qmp.command('query-status')

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20200204141111.3207-5-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index 0e07d80e2a..486a566da0 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -139,6 +139,15 @@ class QEMUMonitorProtocol:
                 raise QMPConnectError("Error while reading from socket")
             self.__sock.settimeout(None)
 
+    def __enter__(self):
+        # Implement context manager enter function.
+        return self
+
+    def __exit__(self, exc_type, exc_value, exc_traceback):
+        # Implement context manager exit function.
+        self.close()
+        return False
+
     def connect(self, negotiate=True):
         """
         Connect to the QMP Monitor and perform capabilities negotiation.
@@ -265,8 +274,10 @@ class QEMUMonitorProtocol:
         """
         Close the socket and socket file.
         """
-        self.__sock.close()
-        self.__sockfile.close()
+        if self.__sock:
+            self.__sock.close()
+        if self.__sockfile:
+            self.__sockfile.close()
 
     def settimeout(self, timeout):
         """
-- 
2.21.1



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

* [PULL 05/46] python/qemu: qmp: Remove unnused attributes
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 04/46] python/qemu: qmp: Make QEMUMonitorProtocol a context manager Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 06/46] python/qemu: accel: Fix kvm_available() on ppc64le Philippe Mathieu-Daudé
                   ` (42 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

The `error` and `timeout` attributes in QEMUMonitorProtocol are
not used, so this delete them.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191227134101.244496-6-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index 486a566da0..4b9a362240 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -45,10 +45,6 @@ class QEMUMonitorProtocol:
 
     #: Logger object for debugging messages
     logger = logging.getLogger('QMP')
-    #: Socket's error class
-    error = socket.error
-    #: Socket's timeout
-    timeout = socket.timeout
 
     def __init__(self, address, server=False):
         """
-- 
2.21.1



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

* [PULL 06/46] python/qemu: accel: Fix kvm_available() on ppc64le
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 05/46] python/qemu: qmp: Remove unnused attributes Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 07/46] qemu-deprecated: Remove text about Python 2 Philippe Mathieu-Daudé
                   ` (41 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Wainer dos Santos Moschetta <wainersm@redhat.com>

On ppc64le, the accel.kvm_available() check may wrongly
return False because the host arch (as returned by os.uname[4])
and the target arch (ppc64) mismatch. In order to solve this
it is added an ppc64le -> ppc64 mapping which is used as an
fallback verification.

Fixes: 53a049d7d78e5ccf6d4c0d7
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200205203250.30526-5-wainersm@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/accel.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/qemu/accel.py b/python/qemu/accel.py
index 0b38ddf0ab..36ae85791e 100644
--- a/python/qemu/accel.py
+++ b/python/qemu/accel.py
@@ -24,7 +24,8 @@ LOG = logging.getLogger(__name__)
 # support which often includes its 32 bit cousin.
 ADDITIONAL_ARCHES = {
     "x86_64" : "i386",
-    "aarch64" : "armhf"
+    "aarch64" : "armhf",
+    "ppc64le" : "ppc64",
 }
 
 def list_accel(qemu_bin):
-- 
2.21.1



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

* [PULL 07/46] qemu-deprecated: Remove text about Python 2
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 06/46] python/qemu: accel: Fix kvm_available() on ppc64le Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 08/46] python: Treat None-return of greeting cmd Philippe Mathieu-Daudé
                   ` (40 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Eduardo Habkost, reviewer:Incompatible changes,
	Philippe Mathieu-Daudé,
	Cleber Rosa, John Snow

From: Thomas Huth <thuth@redhat.com>

Python 2 support has been removed, so we should now also remove
the announcement text for the deprecation.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20200109095116.18201-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qemu-deprecated.texi | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index ea3e10bde3..97668edf92 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -351,14 +351,6 @@ they have no effect when used with @option{-n} to skip image creation.
 Silently ignored options can be confusing, so this combination of
 options will be made an error in future versions.
 
-@section Build system
-
-@subsection Python 2 support (since 4.1.0)
-
-In the future, QEMU will require Python 3 to be available at
-build time.  Support for Python 2 in scripts shipped with QEMU
-is deprecated.
-
 @section Backwards compatibility
 
 @subsection Runnability guarantee of CPU models (since 4.1.0)
-- 
2.21.1



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

* [PULL 08/46] python: Treat None-return of greeting cmd
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 07/46] qemu-deprecated: Remove text about Python 2 Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 09/46] python/qemu/machine: Allow to use other serial consoles than default Philippe Mathieu-Daudé
                   ` (39 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Lukáš Doktor, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Lukáš Doktor <ldoktor@redhat.com>

In case qemu process dies the "monitor.cmd" returns None which gets
passed to the "__negotiate_capabilities" and leads to unhandled
exception. Let's only check the resp in case it has a value.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200120071202.30646-1-ldoktor@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/qmp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index 4b9a362240..f40586eedd 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -80,7 +80,7 @@ class QEMUMonitorProtocol:
             raise QMPConnectError
         # Greeting seems ok, negotiate capabilities
         resp = self.cmd('qmp_capabilities')
-        if "return" in resp:
+        if resp and "return" in resp:
             return greeting
         raise QMPCapabilitiesError
 
-- 
2.21.1



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

* [PULL 09/46] python/qemu/machine: Allow to use other serial consoles than default
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 08/46] python: Treat None-return of greeting cmd Philippe Mathieu-Daudé
@ 2020-02-06 21:18 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 10/46] Acceptance tests: Extract _console_interaction() Philippe Mathieu-Daudé
                   ` (38 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Cleber Rosa,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Currently the QEMU Python module limits the QEMUMachine class to
use the first serial console.

Some machines/guest might use another console than the first one as
the 'boot console'. For example the Raspberry Pi uses the second
(AUX) console.

To be able to use the Nth console as default, we simply need to
connect all the N - 1 consoles to the null chardev.

Add an index argument, so we can use a specific serial console as
default.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Tested-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200120235159.18510-5-f4bug@amsat.org>
[PMD: zero-initialize _console_index in __init__()]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 python/qemu/machine.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 734efd8536..183d8f3d38 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -112,6 +112,7 @@ class QEMUMachine(object):
         self._sock_dir = sock_dir
         self._launched = False
         self._machine = None
+        self._console_index = 0
         self._console_set = False
         self._console_device_type = None
         self._console_address = None
@@ -241,6 +242,8 @@ class QEMUMachine(object):
                          'chardev=mon,mode=control'])
         if self._machine is not None:
             args.extend(['-machine', self._machine])
+        for i in range(self._console_index):
+            args.extend(['-serial', 'null'])
         if self._console_set:
             self._console_address = os.path.join(self._sock_dir,
                                                  self._name + "-console.sock")
@@ -527,7 +530,7 @@ class QEMUMachine(object):
         """
         self._machine = machine_type
 
-    def set_console(self, device_type=None):
+    def set_console(self, device_type=None, console_index=0):
         """
         Sets the device type for a console device
 
@@ -548,9 +551,14 @@ class QEMUMachine(object):
                             chardev:console" command line argument will
                             be used instead, resorting to the machine's
                             default device type.
+        @param console_index: the index of the console device to use.
+                              If not zero, the command line will create
+                              'index - 1' consoles and connect them to
+                              the 'null' backing character device.
         """
         self._console_set = True
         self._console_device_type = device_type
+        self._console_index = console_index
 
     @property
     def console_socket(self):
-- 
2.21.1



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

* [PULL 10/46] Acceptance tests: Extract _console_interaction()
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (8 preceding siblings ...)
  2020-02-06 21:18 ` [PULL 09/46] python/qemu/machine: Allow to use other serial consoles than default Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 11/46] Acceptance tests: Add interrupt_interactive_console_until_pattern() Philippe Mathieu-Daudé
                   ` (37 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Niek Linnenbank, Cleber Rosa,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Since we are going to re-use the code shared between
wait_for_console_pattern() and exec_command_and_wait_for_pattern(),
extract the common part into a local function.

Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Tested-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200120235159.18510-3-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 31 +++++++++++++----------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 6618ea67c1..0a50fcf2be 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -55,19 +55,14 @@ def pick_default_qemu_bin(arch=None):
         return qemu_bin_from_src_dir_path
 
 
-def wait_for_console_pattern(test, success_message, failure_message=None):
-    """
-    Waits for messages to appear on the console, while logging the content
-
-    :param test: an Avocado test containing a VM that will have its console
-                 read and probed for a success or failure message
-    :type test: :class:`avocado_qemu.Test`
-    :param success_message: if this message appears, test succeeds
-    :param failure_message: if this message appears, test fails
-    """
+def _console_interaction(test, success_message, failure_message,
+                         send_string):
     console = test.vm.console_socket.makefile()
     console_logger = logging.getLogger('console')
     while True:
+        if send_string:
+            test.vm.console_socket.sendall(send_string.encode())
+            send_string = None # send only once
         msg = console.readline().strip()
         if not msg:
             continue
@@ -79,6 +74,17 @@ def wait_for_console_pattern(test, success_message, failure_message=None):
             fail = 'Failure message found in console: %s' % failure_message
             test.fail(fail)
 
+def wait_for_console_pattern(test, success_message, failure_message=None):
+    """
+    Waits for messages to appear on the console, while logging the content
+
+    :param test: an Avocado test containing a VM that will have its console
+                 read and probed for a success or failure message
+    :type test: :class:`avocado_qemu.Test`
+    :param success_message: if this message appears, test succeeds
+    :param failure_message: if this message appears, test fails
+    """
+    _console_interaction(test, success_message, failure_message, None)
 
 def exec_command_and_wait_for_pattern(test, command,
                                       success_message, failure_message=None):
@@ -94,10 +100,7 @@ def exec_command_and_wait_for_pattern(test, command,
     :param success_message: if this message appears, test succeeds
     :param failure_message: if this message appears, test fails
     """
-    command += '\r'
-    test.vm.console_socket.sendall(command.encode())
-    wait_for_console_pattern(test, success_message, failure_message)
-
+    _console_interaction(test, success_message, failure_message, command + '\r')
 
 class Test(avocado.Test):
     def _get_unique_tag_val(self, tag_name):
-- 
2.21.1



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

* [PULL 11/46] Acceptance tests: Add interrupt_interactive_console_until_pattern()
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (9 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 10/46] Acceptance tests: Extract _console_interaction() Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 12/46] travis.yml: install rpm2cpio for acceptance tests Philippe Mathieu-Daudé
                   ` (36 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Niek Linnenbank, Cleber Rosa,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

We need a function to interrupt interactive consoles.

Example: Interrupt U-Boot to set different environment values.

Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Tested-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200120235159.18510-4-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 32 +++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 0a50fcf2be..d4358eb431 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -56,13 +56,15 @@ def pick_default_qemu_bin(arch=None):
 
 
 def _console_interaction(test, success_message, failure_message,
-                         send_string):
+                         send_string, keep_sending=False):
+    assert not keep_sending or send_string
     console = test.vm.console_socket.makefile()
     console_logger = logging.getLogger('console')
     while True:
         if send_string:
             test.vm.console_socket.sendall(send_string.encode())
-            send_string = None # send only once
+            if not keep_sending:
+                send_string = None # send only once
         msg = console.readline().strip()
         if not msg:
             continue
@@ -74,6 +76,32 @@ def _console_interaction(test, success_message, failure_message,
             fail = 'Failure message found in console: %s' % failure_message
             test.fail(fail)
 
+def interrupt_interactive_console_until_pattern(test, success_message,
+                                                failure_message=None,
+                                                interrupt_string='\r'):
+    """
+    Keep sending a string to interrupt a console prompt, while logging the
+    console output. Typical use case is to break a boot loader prompt, such:
+
+        Press a key within 5 seconds to interrupt boot process.
+        5
+        4
+        3
+        2
+        1
+        Booting default image...
+
+    :param test: an Avocado test containing a VM that will have its console
+                 read and probed for a success or failure message
+    :type test: :class:`avocado_qemu.Test`
+    :param success_message: if this message appears, test succeeds
+    :param failure_message: if this message appears, test fails
+    :param interrupt_string: a string to send to the console before trying
+                             to read a new line
+    """
+    _console_interaction(test, success_message, failure_message,
+                         interrupt_string, True)
+
 def wait_for_console_pattern(test, success_message, failure_message=None):
     """
     Waits for messages to appear on the console, while logging the content
-- 
2.21.1



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

* [PULL 12/46] travis.yml: install rpm2cpio for acceptance tests
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (10 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 11/46] Acceptance tests: Add interrupt_interactive_console_until_pattern() Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 13/46] tests/boot_linux_console: add extract_from_rpm method Philippe Mathieu-Daudé
                   ` (35 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Eduardo Habkost, Philippe Mathieu-Daudé,
	Cleber Rosa, Alex Bennée, Stefano Garzarella

From: Liam Merwick <liam.merwick@oracle.com>

The extract_from_rpm() method added for the PVH acceptance tests needs
rpm2cpio to extract a vmlinux binary from an RPM.

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1580914565-19675-4-git-send-email-liam.merwick@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 6c0ec6cf69..54e1d12762 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -323,6 +323,7 @@ matrix:
             - python3-pil
             - python3-pip
             - python3.5-venv
+            - rpm2cpio
             - tesseract-ocr
             - tesseract-ocr-eng
 
-- 
2.21.1



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

* [PULL 13/46] tests/boot_linux_console: add extract_from_rpm method
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (11 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 12/46] travis.yml: install rpm2cpio for acceptance tests Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 14/46] tests/boot_linux_console: use os.path for filesystem paths Philippe Mathieu-Daudé
                   ` (34 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefano Garzarella, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Liam Merwick <liam.merwick@oracle.com>

Add a method to extract a specified file from an RPM to the test's
working directory and return the path to the extracted file.

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1580914565-19675-5-git-send-email-liam.merwick@oracle.com>
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index e40b84651b..16b7503b5f 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -51,6 +51,22 @@ class BootLinuxConsole(Test):
         os.chdir(cwd)
         return self.workdir + path
 
+    def extract_from_rpm(self, rpm, path):
+        """
+        Extracts a file from an RPM package into the test workdir.
+
+        :param rpm: path to the rpm archive
+        :param path: path within the rpm archive of the file to be extracted
+                     needs to be a relative path (starting with './') because
+                     cpio(1), which is used to extract the file, expects that.
+        :returns: path of the extracted file
+        """
+        cwd = os.getcwd()
+        os.chdir(self.workdir)
+        process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=True)
+        os.chdir(cwd)
+        return os.path.normpath(os.path.join(self.workdir, path))
+
     def test_x86_64_pc(self):
         """
         :avocado: tags=arch:x86_64
-- 
2.21.1



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

* [PULL 14/46] tests/boot_linux_console: use os.path for filesystem paths
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (12 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 13/46] tests/boot_linux_console: add extract_from_rpm method Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 15/46] tests/boot_linux_console: fix extract_from_deb() comment Philippe Mathieu-Daudé
                   ` (33 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Liam Merwick <liam.merwick@oracle.com>

Change extract_from_deb() to use os.path routines to manipulate the
filesystem path returned when extracting a file.

Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1580914565-19675-7-git-send-email-liam.merwick@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 16b7503b5f..dca0a940ab 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -49,7 +49,12 @@ class BootLinuxConsole(Test):
         process.run("ar x %s %s" % (deb, file_path))
         archive.extract(file_path, self.workdir)
         os.chdir(cwd)
-        return self.workdir + path
+        # Return complete path to extracted file.  Because callers to
+        # extract_from_deb() specify 'path' with a leading slash, it is
+        # necessary to use os.path.relpath() as otherwise os.path.join()
+        # interprets it as an absolute path and drops the self.workdir part.
+        return os.path.normpath(os.path.join(self.workdir,
+                                             os.path.relpath(path, '/')))
 
     def extract_from_rpm(self, rpm, path):
         """
-- 
2.21.1



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

* [PULL 15/46] tests/boot_linux_console: fix extract_from_deb() comment
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (13 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 14/46] tests/boot_linux_console: use os.path for filesystem paths Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 16/46] tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot' Philippe Mathieu-Daudé
                   ` (32 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Liam Merwick <liam.merwick@oracle.com>

The second param in extract_from_deb() is 'path' not 'file'

Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1580142994-1836-4-git-send-email-liam.merwick@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index dca0a940ab..d22cd67a6e 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -40,7 +40,7 @@ class BootLinuxConsole(Test):
         Extracts a file from a deb package into the test workdir
 
         :param deb: path to the deb archive
-        :param file: path within the deb archive of the file to be extracted
+        :param path: path within the deb archive of the file to be extracted
         :returns: path of the extracted file
         """
         cwd = os.getcwd()
-- 
2.21.1



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

* [PULL 16/46] tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot'
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (14 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 15/46] tests/boot_linux_console: fix extract_from_deb() comment Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 17/46] tests/acceptance: Add boot tests for some of the QEMU advent calendar images Philippe Mathieu-Daudé
                   ` (31 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Avocado tags are handy to automatically select tests matching
the tags. Since this test also runs U-Boot, tag it.

We can run all the tests using U-Boot as once with:

  $ avocado --show=app run -t u-boot tests/acceptance/
  JOB LOG    : avocado/job-results/job-2020-01-21T00.16-ee9344e/job.log
   (1/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (16.59 s)
   (2/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_uboot: PASS (0.47 s)
   (3/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_aarch64_raspi3_uboot: PASS (2.43 s)
  RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
  JOB TIME   : 19.78 s

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200120235159.18510-8-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index d22cd67a6e..a6191ee410 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -325,6 +325,7 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:arm
         :avocado: tags=machine:emcraft-sf2
         :avocado: tags=endian:little
+        :avocado: tags=u-boot
         """
         uboot_url = ('https://raw.githubusercontent.com/'
                      'Subbaraya-Sundeep/qemu-test-binaries/'
-- 
2.21.1



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

* [PULL 17/46] tests/acceptance: Add boot tests for some of the QEMU advent calendar images
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (15 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 16/46] tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot' Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 18/46] tests: rename virtio_seg_max_adjust to virtio_check_params Philippe Mathieu-Daudé
                   ` (30 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, Eduardo Habkost, Alex Bennée,
	Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Cleber Rosa,
	Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

The 2018 edition of the QEMU advent calendar 2018 featured Linux images
for various non-x86 machines. We can use them for a boot tests in our
acceptance test suite.

Let's also make sure that we build the corresponding machines in Travis.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200124170325.30072-1-thuth@redhat.com>
[PMD: Rebased, --python=python3 parameter dropped in commit 5311cb12e]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml                            |  2 +-
 tests/acceptance/boot_linux_console.py | 96 ++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 54e1d12762..5887055951 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -313,7 +313,7 @@ matrix:
     # Acceptance (Functional) tests
     - name: "GCC check-acceptance"
       env:
-        - CONFIG="--target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu"
+        - CONFIG="--target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu"
         - TEST_CMD="make check-acceptance"
       after_script:
         - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP")]' | xargs cat
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index a6191ee410..a6ce917e45 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -590,3 +590,99 @@ class BootLinuxConsole(Test):
         self.wait_for_console_pattern(console_pattern)
         console_pattern = 'No filesystem could mount root'
         self.wait_for_console_pattern(console_pattern)
+
+    def do_test_advcal_2018(self, day, tar_hash, kernel_name):
+        tar_url = ('https://www.qemu-advent-calendar.org'
+                   '/2018/download/day' + day + '.tar.xz')
+        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
+        archive.extract(file_path, self.workdir)
+        self.vm.set_console()
+        self.vm.add_args('-kernel',
+                         self.workdir + '/day' + day + '/' + kernel_name)
+        self.vm.launch()
+        self.wait_for_console_pattern('QEMU advent calendar')
+
+    def test_arm_vexpressa9(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:vexpress-a9
+        """
+        tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b'
+        self.vm.add_args('-dtb', self.workdir + '/day16/vexpress-v2p-ca9.dtb')
+        self.do_test_advcal_2018('16', tar_hash, 'winter.zImage')
+
+    def test_m68k_mcf5208evb(self):
+        """
+        :avocado: tags=arch:m68k
+        :avocado: tags=machine:mcf5208evb
+        """
+        tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c'
+        self.do_test_advcal_2018('07', tar_hash, 'sanity-clause.elf')
+
+    def test_microblaze_s3adsp1800(self):
+        """
+        :avocado: tags=arch:microblaze
+        :avocado: tags=machine:petalogix-s3adsp1800
+        """
+        tar_hash = '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f'
+        self.do_test_advcal_2018('17', tar_hash, 'ballerina.bin')
+
+    def test_or1k_sim(self):
+        """
+        :avocado: tags=arch:or1k
+        :avocado: tags=machine:or1k-sim
+        """
+        tar_hash = '20334cdaf386108c530ff0badaecc955693027dd'
+        self.do_test_advcal_2018('20', tar_hash, 'vmlinux')
+
+    def test_nios2_10m50(self):
+        """
+        :avocado: tags=arch:nios2
+        :avocado: tags=machine:10m50-ghrd
+        """
+        tar_hash = 'e4251141726c412ac0407c5a6bceefbbff018918'
+        self.do_test_advcal_2018('14', tar_hash, 'vmlinux.elf')
+
+    def test_ppc64_e500(self):
+        """
+        :avocado: tags=arch:ppc64
+        :avocado: tags=machine:ppce500
+        """
+        tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
+        self.vm.add_args('-cpu', 'e5500')
+        self.do_test_advcal_2018('19', tar_hash, 'uImage')
+
+    def test_ppc_g3beige(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=machine:g3beige
+        """
+        tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
+        self.vm.add_args('-M', 'graphics=off')
+        self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
+
+    def test_ppc_mac99(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=machine:mac99
+        """
+        tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
+        self.vm.add_args('-M', 'graphics=off')
+        self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
+
+    def test_sparc_ss20(self):
+        """
+        :avocado: tags=arch:sparc
+        :avocado: tags=machine:SS-20
+        """
+        tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f'
+        self.do_test_advcal_2018('11', tar_hash, 'zImage.elf')
+
+    def test_xtensa_lx60(self):
+        """
+        :avocado: tags=arch:xtensa
+        :avocado: tags=machine:lx60
+        """
+        tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
+        self.vm.add_args('-cpu', 'dc233c')
+        self.do_test_advcal_2018('02', tar_hash, 'santas-sleigh-ride.elf')
-- 
2.21.1



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

* [PULL 18/46] tests: rename virtio_seg_max_adjust to virtio_check_params
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (16 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 17/46] tests/acceptance: Add boot tests for some of the QEMU advent calendar images Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 19/46] tests/acceptance/virtio_check_params: Improve exception logging Philippe Mathieu-Daudé
                   ` (29 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Denis Plotnikov, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Denis Plotnikov <dplotnikov@virtuozzo.com>

Since, virtio_seg_max_adjust checks not only seg_max, but also
virtqueue_size parameter, let's make the test more general and
add new parameters to be checked there in the future.

Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
Message-Id: <20200129140702.5411-5-dplotnikov@virtuozzo.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .../{virtio_seg_max_adjust.py => virtio_check_params.py}          | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename tests/acceptance/{virtio_seg_max_adjust.py => virtio_check_params.py} (100%)

diff --git a/tests/acceptance/virtio_seg_max_adjust.py b/tests/acceptance/virtio_check_params.py
similarity index 100%
rename from tests/acceptance/virtio_seg_max_adjust.py
rename to tests/acceptance/virtio_check_params.py
-- 
2.21.1



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

* [PULL 19/46] tests/acceptance/virtio_check_params: Improve exception logging
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (17 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 18/46] tests: rename virtio_seg_max_adjust to virtio_check_params Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 20/46] tests/acceptance/virtio_check_params: List machine being tested Philippe Mathieu-Daudé
                   ` (28 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

Message-Id: <20200129212345.20547-18-philmd@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index 5458573138..270f69d092 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -77,8 +77,12 @@ class VirtioMaxSegSettingsCheck(Test):
             vm.set_machine(mt["name"])
             for s in VM_DEV_PARAMS[dev_type_name]:
                 vm.add_args(s)
-            vm.launch()
-            query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
+            try:
+                vm.launch()
+                query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
+            except:
+                query_ok = False
+                error = sys.exc_info()[0]
 
         if not query_ok:
             self.fail('machine type {0}: {1}'.format(mt['name'], error))
-- 
2.21.1



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

* [PULL 20/46] tests/acceptance/virtio_check_params: List machine being tested
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (18 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 19/46] tests/acceptance/virtio_check_params: Improve exception logging Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 21/46] tests/acceptance/virtio_check_params: Default to -nodefaults Philippe Mathieu-Daudé
                   ` (27 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

Add logging for easier debugging of failures:

  $ avocado --show=machine run tests/acceptance/virtio_check_params.py
   (1/1) tests/acceptance/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types:
  machine: {'name': 'pc-i440fx-2.12', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-2.0', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-q35-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-2.5', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  ...

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200129212345.20547-19-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index 270f69d092..29e91bfa37 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -21,6 +21,7 @@
 import sys
 import os
 import re
+import logging
 
 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
 from qemu.machine import QEMUMachine
@@ -73,6 +74,9 @@ class VirtioMaxSegSettingsCheck(Test):
         return query_ok, props, error
 
     def check_mt(self, mt, dev_type_name):
+        mt['device'] = dev_type_name # Only for the debug() call.
+        logger = logging.getLogger('machine')
+        logger.debug(mt)
         with QEMUMachine(self.qemu_bin) as vm:
             vm.set_machine(mt["name"])
             for s in VM_DEV_PARAMS[dev_type_name]:
-- 
2.21.1



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

* [PULL 21/46] tests/acceptance/virtio_check_params: Default to -nodefaults
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (19 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 20/46] tests/acceptance/virtio_check_params: List machine being tested Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 22/46] tests/acceptance/virtio_check_params: Disable the test Philippe Mathieu-Daudé
                   ` (26 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

We don't need the default options to run this test.

This fixes errors when running a binary built with
--without-default-devices such:

  ERROR: qemu-system-s390x: Unknown device 'virtio-net-ccw' for bus 'virtual-css-bus'

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200129212345.20547-25-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index 29e91bfa37..22792d4ec6 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -79,6 +79,7 @@ class VirtioMaxSegSettingsCheck(Test):
         logger.debug(mt)
         with QEMUMachine(self.qemu_bin) as vm:
             vm.set_machine(mt["name"])
+            vm.add_args('-nodefaults')
             for s in VM_DEV_PARAMS[dev_type_name]:
                 vm.add_args(s)
             try:
-- 
2.21.1



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

* [PULL 22/46] tests/acceptance/virtio_check_params: Disable the test
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (20 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 21/46] tests/acceptance/virtio_check_params: Default to -nodefaults Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 23/46] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine Philippe Mathieu-Daudé
                   ` (25 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Denis Plotnikov, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

This test fails on various CI:

- Using QEMU 4.0:
  tests/acceptance/x86_cpu_model_versions.py:X86CPUModelAliases.test_none_alias:  ERROR: 'alias-of' (0.45 s)

- On OSX
  Unexpected error in object_property_find() at qom/object.c:1201:
  qemu-system-x86_64: -device virtio-blk-pci,id=scsi0,drive=drive0: can't apply global virtio-blk-device.scsi=true: Property '.scsi' not found

- When removing unavailable machine:
  VirtioMaxSegSettingsCheck.test_machine_types: ERROR: list.remove(x): x not in list (0.12 s)

- Using Xen:
  xencall: error: Could not obtain handle on privileged command interface: No such file or directory
  xen be core: xen be core: can't open xen interface

- On PPC:
  TestFail: machine type pseries-2.8: No Transactional Memory support in TCG, try appending -machine cap-htm=off

- On S390X configured with --without-default-devices:
  ERROR: qemu-system-s390x: -device virtio-scsi-pci,id=scsi0: 'virtio-scsi-pci' is not a valid device model name

Disable it for now.

Cc: Denis Plotnikov <dplotnikov@virtuozzo.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200206171715.25041-1-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index 22792d4ec6..c3af8dbf9f 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -26,6 +26,7 @@ import logging
 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
 from qemu.machine import QEMUMachine
 from avocado_qemu import Test
+from avocado import skip
 
 #list of machine types and virtqueue properties to test
 VIRTIO_SCSI_PROPS = {'seg_max_adjust': 'seg_max_adjust'}
@@ -117,6 +118,7 @@ class VirtioMaxSegSettingsCheck(Test):
             return True
         return False
 
+    @skip("break multi-arch CI")
     def test_machine_types(self):
         # collect all machine types except 'none', 'isapc', 'microvm'
         with QEMUMachine(self.qemu_bin) as vm:
-- 
2.21.1



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

* [PULL 23/46] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (21 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 22/46] tests/acceptance/virtio_check_params: Disable the test Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 24/46] tests/acceptance/version: Default to -nodefaults Philippe Mathieu-Daudé
                   ` (24 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

As we only read the serial console, we don't need to force a
VGA display. This fixes when running a binary built with
--without-default-devices:

  ERROR: qemu-system-alpha: standard VGA not available

We also need the '-nodefaults' argument to avoid:

  ERROR: qemu-system-alpha: Unsupported NIC model: e1000

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200129212345.20547-27-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index a6ce917e45..34d37eba3b 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -541,7 +541,7 @@ class BootLinuxConsole(Test):
 
         self.vm.set_console()
         kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
-        self.vm.add_args('-vga', 'std',
+        self.vm.add_args('-nodefaults',
                          '-kernel', uncompressed_kernel,
                          '-append', kernel_command_line)
         self.vm.launch()
-- 
2.21.1



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

* [PULL 24/46] tests/acceptance/version: Default to -nodefaults
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (22 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 23/46] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 25/46] tests/acceptance/migration: Factor out assert_migration() Philippe Mathieu-Daudé
                   ` (23 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

We don't need the default options to run this test.

This fixes errors when running a binary built with
--without-default-devices such:

  ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200129212345.20547-29-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/version.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
index 67c2192c93..79b923d4fc 100644
--- a/tests/acceptance/version.py
+++ b/tests/acceptance/version.py
@@ -17,6 +17,7 @@ class Version(Test):
     :avocado: tags=quick
     """
     def test_qmp_human_info_version(self):
+        self.vm.add_args('-nodefaults')
         self.vm.launch()
         res = self.vm.command('human-monitor-command',
                               command_line='info version')
-- 
2.21.1



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

* [PULL 25/46] tests/acceptance/migration: Factor out assert_migration()
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (23 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 24/46] tests/acceptance/version: Default to -nodefaults Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 26/46] tests/acceptance/migration: Factor out do_migrate() Philippe Mathieu-Daudé
                   ` (22 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Oksana Vohchana, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Oksana Vohchana <ovoshcha@redhat.com>

We are going to reuse this code when testing different transport
methods, so factor it out first

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203111631.18796-2-ovoshcha@redhat.com>
[PMD: Split patch in 2, reworded subject and description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index a44c1ae58f..3db733b1ce 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -24,6 +24,16 @@ class Migration(Test):
     def migration_finished(vm):
         return vm.command('query-migrate')['status'] in ('completed', 'failed')
 
+    def assert_migration(self, src_vm, dst_vm):
+        wait.wait_for(self.migration_finished,
+                      timeout=self.timeout,
+                      step=0.1,
+                      args=(src_vm,))
+        self.assertEqual(src_vm.command('query-migrate')['status'], 'completed')
+        self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed')
+        self.assertEqual(dst_vm.command('query-status')['status'], 'running')
+        self.assertEqual(src_vm.command('query-status')['status'],'postmigrate')
+
     def _get_free_port(self):
         port = network.find_free_port()
         if port is None:
@@ -38,13 +48,4 @@ class Migration(Test):
         dest_vm.launch()
         source_vm.launch()
         source_vm.qmp('migrate', uri=dest_uri)
-        wait.wait_for(
-            self.migration_finished,
-            timeout=self.timeout,
-            step=0.1,
-            args=(source_vm,)
-        )
-        self.assertEqual(dest_vm.command('query-migrate')['status'], 'completed')
-        self.assertEqual(source_vm.command('query-migrate')['status'], 'completed')
-        self.assertEqual(dest_vm.command('query-status')['status'], 'running')
-        self.assertEqual(source_vm.command('query-status')['status'], 'postmigrate')
+        self.assert_migration(source_vm, dest_vm)
-- 
2.21.1



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

* [PULL 26/46] tests/acceptance/migration: Factor out do_migrate()
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (24 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 25/46] tests/acceptance/migration: Factor out assert_migration() Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 27/46] tests/acceptance/migration: Test UNIX transport when migrating Philippe Mathieu-Daudé
                   ` (21 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Oksana Vohchana, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Oksana Vohchana <ovoshcha@redhat.com>

We are going to reuse this code when testing different transport
methods, so factor it out first.

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203111631.18796-2-ovoshcha@redhat.com>
[PMD: Split patch in 2, reworded subject and description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 3db733b1ce..03686d7de3 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -34,6 +34,16 @@ class Migration(Test):
         self.assertEqual(dst_vm.command('query-status')['status'], 'running')
         self.assertEqual(src_vm.command('query-status')['status'],'postmigrate')
 
+    def do_migrate(self, dest_uri, src_uri=None):
+        source_vm = self.get_vm()
+        dest_vm = self.get_vm('-incoming', dest_uri)
+        dest_vm.launch()
+        if src_uri is None:
+            src_uri = dest_uri
+        source_vm.launch()
+        source_vm.qmp('migrate', uri=src_uri)
+        self.assert_migration(source_vm, dest_vm)
+
     def _get_free_port(self):
         port = network.find_free_port()
         if port is None:
@@ -42,10 +52,5 @@ class Migration(Test):
 
 
     def test_migration_with_tcp_localhost(self):
-        source_vm = self.get_vm()
         dest_uri = 'tcp:localhost:%u' % self._get_free_port()
-        dest_vm = self.get_vm('-incoming', dest_uri)
-        dest_vm.launch()
-        source_vm.launch()
-        source_vm.qmp('migrate', uri=dest_uri)
-        self.assert_migration(source_vm, dest_vm)
+        self.do_migrate(dest_uri)
-- 
2.21.1



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

* [PULL 27/46] tests/acceptance/migration: Test UNIX transport when migrating
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (25 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 26/46] tests/acceptance/migration: Factor out do_migrate() Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 28/46] tests/acceptance/migration: Test EXEC " Philippe Mathieu-Daudé
                   ` (20 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Oksana Vohchana, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Oksana Vohchana <ovoshcha@redhat.com>

Along with VM migration via TCP, we can use migration through
the UNIX transport protocol

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com>
[PMD: Split patch in 2, reworded subject and description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 03686d7de3..9eebc36b8f 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -10,6 +10,7 @@
 # later.  See the COPYING file in the top-level directory.
 
 
+import tempfile
 from avocado_qemu import Test
 
 from avocado.utils import network
@@ -54,3 +55,8 @@ class Migration(Test):
     def test_migration_with_tcp_localhost(self):
         dest_uri = 'tcp:localhost:%u' % self._get_free_port()
         self.do_migrate(dest_uri)
+
+    def test_migration_with_unix(self):
+        with tempfile.TemporaryDirectory(prefix='socket_') as socket_path:
+            dest_uri = 'unix:%s/qemu-test.sock' % socket_path
+            self.do_migrate(dest_uri)
-- 
2.21.1



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

* [PULL 28/46] tests/acceptance/migration: Test EXEC transport when migrating
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (26 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 27/46] tests/acceptance/migration: Test UNIX transport when migrating Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 29/46] tests/acceptance/migration: Add the 'migration' tag Philippe Mathieu-Daudé
                   ` (19 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Oksana Vohchana, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Oksana Vohchana <ovoshcha@redhat.com>

Along with VM migration via TCP, we can use migration through
the EXEC transport protocol

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com>
[PMD: Split patch in 2, reworded subject and description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 9eebc36b8f..41b13b9e0d 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -12,9 +12,11 @@
 
 import tempfile
 from avocado_qemu import Test
+from avocado import skipUnless
 
 from avocado.utils import network
 from avocado.utils import wait
+from avocado.utils.path import find_command
 
 
 class Migration(Test):
@@ -60,3 +62,11 @@ class Migration(Test):
         with tempfile.TemporaryDirectory(prefix='socket_') as socket_path:
             dest_uri = 'unix:%s/qemu-test.sock' % socket_path
             self.do_migrate(dest_uri)
+
+    @skipUnless(find_command('nc', default=False), "'nc' command not found")
+    def test_migration_with_exec(self):
+        """
+        The test works for both netcat-traditional and netcat-openbsd packages
+        """
+        free_port = self._get_free_port()
+        dest_uri = 'exec:nc -l localhost %u' % free_port
-- 
2.21.1



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

* [PULL 29/46] tests/acceptance/migration: Add the 'migration' tag
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (27 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 28/46] tests/acceptance/migration: Test EXEC " Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 30/46] tests/acceptance/migration: Default to -nodefaults Philippe Mathieu-Daudé
                   ` (18 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Eduardo Habkost, Wainer dos Santos Moschetta, Cleber Rosa

By using an Avocado tag, we can run all tests described by that
tag as once:

  $ avocado --show=app run -t migration tests/acceptance/
  JOB ID     : 165477737509503fcfa6d7108057a0a18f2a6559
  JOB LOG    : avocado/job-results/job-2020-02-04T17.29-1654777/job.log
   (1/3) tests/acceptance/migration.py:Migration.test_migration_with_tcp_localhost: PASS (0.38 s)
   (2/3) tests/acceptance/migration.py:Migration.test_migration_with_unix: PASS (0.33 s)
   (3/3) tests/acceptance/migration.py:Migration.test_migration_with_exec: PASS (0.07 s)
  RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200204163304.14616-1-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 41b13b9e0d..b342cabe07 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -20,6 +20,9 @@ from avocado.utils.path import find_command
 
 
 class Migration(Test):
+    """
+    :avocado: tags=migration
+    """
 
     timeout = 10
 
-- 
2.21.1



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

* [PULL 30/46] tests/acceptance/migration: Default to -nodefaults
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (28 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 29/46] tests/acceptance/migration: Add the 'migration' tag Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 31/46] scripts/checkpatch.pl: Only allow Python 3 interpreter Philippe Mathieu-Daudé
                   ` (17 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

We don't need the default options to run this test.

This fixes errors when running a binary built with
--without-default-devices such:

  ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200129212345.20547-28-philmd@redhat.com>
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index b342cabe07..a8367ca023 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -41,11 +41,13 @@ class Migration(Test):
         self.assertEqual(src_vm.command('query-status')['status'],'postmigrate')
 
     def do_migrate(self, dest_uri, src_uri=None):
-        source_vm = self.get_vm()
         dest_vm = self.get_vm('-incoming', dest_uri)
+        dest_vm.add_args('-nodefaults')
         dest_vm.launch()
         if src_uri is None:
             src_uri = dest_uri
+        source_vm = self.get_vm()
+        source_vm.add_args('-nodefaults')
         source_vm.launch()
         source_vm.qmp('migrate', uri=src_uri)
         self.assert_migration(source_vm, dest_vm)
-- 
2.21.1



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

* [PULL 31/46] scripts/checkpatch.pl: Only allow Python 3 interpreter
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (29 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 30/46] tests/acceptance/migration: Default to -nodefaults Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 32/46] tests/qemu-iotests/check: Allow use of python3 interpreter Philippe Mathieu-Daudé
                   ` (16 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Paolo Bonzini, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

Since commit ddf9069963 QEMU requires Python >= 3.5.

PEP 0394 [*] states that 'python3' should be available and
that 'python' is optional.

To avoid problem with unsupported versions, enforce the
shebang interpreter to Python 3.

[*] https://www.python.org/dev/peps/pep-0394/

Reported-by: John Snow <jsnow@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3aef6e3dfe..ce43a306f8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1460,6 +1460,12 @@ sub process {
 			}
 		}
 
+# Only allow Python 3 interpreter
+		if ($realline == 1 &&
+			$line =~ /^\+#!\ *\/usr\/bin\/(?:env )?python$/) {
+			ERROR("please use python3 interpreter\n" . $herecurr);
+		}
+
 # Accept git diff extended headers as valid patches
 		if ($line =~ /^(?:rename|copy) (?:from|to) [\w\/\.\-]+\s*$/) {
 			$is_patch = 1;
-- 
2.21.1



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

* [PULL 32/46] tests/qemu-iotests/check: Allow use of python3 interpreter
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (30 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 31/46] scripts/checkpatch.pl: Only allow Python 3 interpreter Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 33/46] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
                   ` (15 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Eduardo Habkost, open list:Block layer core,
	Max Reitz, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

As we want to enforce a unique and explicit Python 3 interpreter,
we need let this script handle 'python3' too.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-3-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/qemu-iotests/check | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 39ed5bc1be..f5afb12016 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -838,7 +838,8 @@ do
 
         start=$(_wallclock)
 
-        if [ "$(head -n 1 "$source_iotests/$seq")" == "#!/usr/bin/env python" ]; then
+        if [ "$(head -n 1 "$source_iotests/$seq" | sed 's/3$//')" \
+            == "#!/usr/bin/env python" ]; then
             if $python_usable; then
                 run_command="$PYTHON $seq"
             else
-- 
2.21.1



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

* [PULL 33/46] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (31 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 32/46] tests/qemu-iotests/check: Allow use of python3 interpreter Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 34/46] tests: Explicit usage of Python 3 Philippe Mathieu-Daudé
                   ` (14 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy,
	Daniel P . Berrangé,
	Eduardo Habkost, open list:Block layer core, Max Reitz,
	Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
       $(git grep -l 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-4-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/qemu-iotests/030                   | 2 +-
 tests/qemu-iotests/040                   | 2 +-
 tests/qemu-iotests/041                   | 2 +-
 tests/qemu-iotests/044                   | 2 +-
 tests/qemu-iotests/045                   | 2 +-
 tests/qemu-iotests/055                   | 2 +-
 tests/qemu-iotests/056                   | 2 +-
 tests/qemu-iotests/057                   | 2 +-
 tests/qemu-iotests/065                   | 2 +-
 tests/qemu-iotests/093                   | 2 +-
 tests/qemu-iotests/096                   | 2 +-
 tests/qemu-iotests/118                   | 2 +-
 tests/qemu-iotests/124                   | 2 +-
 tests/qemu-iotests/129                   | 2 +-
 tests/qemu-iotests/132                   | 2 +-
 tests/qemu-iotests/136                   | 2 +-
 tests/qemu-iotests/139                   | 2 +-
 tests/qemu-iotests/147                   | 2 +-
 tests/qemu-iotests/148                   | 2 +-
 tests/qemu-iotests/151                   | 2 +-
 tests/qemu-iotests/152                   | 2 +-
 tests/qemu-iotests/155                   | 2 +-
 tests/qemu-iotests/163                   | 2 +-
 tests/qemu-iotests/165                   | 2 +-
 tests/qemu-iotests/169                   | 2 +-
 tests/qemu-iotests/196                   | 2 +-
 tests/qemu-iotests/199                   | 2 +-
 tests/qemu-iotests/205                   | 2 +-
 tests/qemu-iotests/245                   | 2 +-
 tests/qemu-iotests/257                   | 2 +-
 tests/qemu-iotests/258                   | 2 +-
 tests/qemu-iotests/281                   | 2 +-
 tests/qemu-iotests/nbd-fault-injector.py | 2 +-
 tests/qemu-iotests/qcow2.py              | 2 +-
 tests/qemu-iotests/qed.py                | 2 +-
 35 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 0990681c1e..aa911d266a 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for image streaming.
 #
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index 74f62c3c4a..2e7ee0e84f 100755
--- a/tests/qemu-iotests/040
+++ b/tests/qemu-iotests/040
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for image block commit.
 #
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index c07437fda1..219b120b57 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for image mirroring.
 #
diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044
index 8b2afa2a11..7e99ea7c68 100755
--- a/tests/qemu-iotests/044
+++ b/tests/qemu-iotests/044
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests growing a large refcount table.
 #
diff --git a/tests/qemu-iotests/045 b/tests/qemu-iotests/045
index 01cc038884..5acc89099c 100755
--- a/tests/qemu-iotests/045
+++ b/tests/qemu-iotests/045
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for fdsets and getfd.
 #
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index c732a112d6..82b9f5f47d 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for drive-backup and blockdev-backup
 #
diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056
index f39287c162..f73fc74457 100755
--- a/tests/qemu-iotests/056
+++ b/tests/qemu-iotests/056
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for drive-backup
 #
diff --git a/tests/qemu-iotests/057 b/tests/qemu-iotests/057
index 9fbba759b6..a8b4bb60e0 100755
--- a/tests/qemu-iotests/057
+++ b/tests/qemu-iotests/057
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for internal snapshot.
 #
diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
index 5b21eb96bd..6426474271 100755
--- a/tests/qemu-iotests/065
+++ b/tests/qemu-iotests/065
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for additional information emitted by qemu-img info on qcow2
 # images
diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093
index f03fa24a07..32ded11430 100755
--- a/tests/qemu-iotests/093
+++ b/tests/qemu-iotests/093
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for IO throttling
 #
diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
index ab9cb47822..5915f92786 100755
--- a/tests/qemu-iotests/096
+++ b/tests/qemu-iotests/096
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test that snapshots move the throttling configuration to the active
 # layer
diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
index e20080e9a6..adc8a848b5 100755
--- a/tests/qemu-iotests/118
+++ b/tests/qemu-iotests/118
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test case for the QMP 'change' command and all other associated
 # commands
diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124
index d3e851e1ae..3705cbb6b3 100755
--- a/tests/qemu-iotests/124
+++ b/tests/qemu-iotests/124
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for incremental drive-backup
 #
diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129
index cd6b9e9ce7..b0da4a5541 100755
--- a/tests/qemu-iotests/129
+++ b/tests/qemu-iotests/129
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests that "bdrv_drain_all" doesn't drain block jobs
 #
diff --git a/tests/qemu-iotests/132 b/tests/qemu-iotests/132
index 0f2a106c81..39ea43067e 100755
--- a/tests/qemu-iotests/132
+++ b/tests/qemu-iotests/132
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test mirror with unmap
 #
diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136
index 012ea111ac..d59400c9fc 100755
--- a/tests/qemu-iotests/136
+++ b/tests/qemu-iotests/136
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for block device statistics
 #
diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139
index cbb5a76530..6b1a444364 100755
--- a/tests/qemu-iotests/139
+++ b/tests/qemu-iotests/139
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test cases for the QMP 'blockdev-del' command
 #
diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
index 2b6f859a09..f4b0a11dba 100755
--- a/tests/qemu-iotests/147
+++ b/tests/qemu-iotests/147
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test case for NBD's blockdev-add interface
 #
diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148
index 8c11c53cba..90931948e3 100755
--- a/tests/qemu-iotests/148
+++ b/tests/qemu-iotests/148
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test the rate limit of QMP events
 #
diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151
index 76ae265cc1..f2df72c29c 100755
--- a/tests/qemu-iotests/151
+++ b/tests/qemu-iotests/151
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for active mirroring
 #
diff --git a/tests/qemu-iotests/152 b/tests/qemu-iotests/152
index 732bf5f062..cc2ea09654 100755
--- a/tests/qemu-iotests/152
+++ b/tests/qemu-iotests/152
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for drive-mirror with source size unaligned to granularity
 #
diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155
index e19485911c..e35b1d534b 100755
--- a/tests/qemu-iotests/155
+++ b/tests/qemu-iotests/155
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test whether the backing BDSs are correct after completion of a
 # mirror block job; in "existing" modes (drive-mirror with
diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
index d94728e080..5a3cc840a5 100755
--- a/tests/qemu-iotests/163
+++ b/tests/qemu-iotests/163
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for shrinking images
 #
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index 951ea011a2..b60a803dae 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for persistent dirty bitmaps.
 #
diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
index 9656a7f620..2c5a132aa3 100755
--- a/tests/qemu-iotests/169
+++ b/tests/qemu-iotests/169
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for dirty bitmaps migration.
 #
diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196
index 92fe9244f8..e8fcf37273 100755
--- a/tests/qemu-iotests/196
+++ b/tests/qemu-iotests/196
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test clearing unknown autoclear_features flag by qcow2 after
 # migration. This test mimics migration to older qemu.
diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199
index a2c8ecab5a..40774eed74 100755
--- a/tests/qemu-iotests/199
+++ b/tests/qemu-iotests/199
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for dirty bitmaps postcopy migration.
 #
diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205
index 4bb2c21e8b..43432cb599 100755
--- a/tests/qemu-iotests/205
+++ b/tests/qemu-iotests/205
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for qmp command nbd-server-remove.
 #
diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245
index d12b253065..489bf78bd0 100644
--- a/tests/qemu-iotests/245
+++ b/tests/qemu-iotests/245
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test cases for the QMP 'x-blockdev-reopen' command
 #
diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257
index a9828251cf..004a433b8b 100755
--- a/tests/qemu-iotests/257
+++ b/tests/qemu-iotests/257
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test bitmap-sync backups (incremental, differential, and partials)
 #
diff --git a/tests/qemu-iotests/258 b/tests/qemu-iotests/258
index b84cf02254..091755a45c 100755
--- a/tests/qemu-iotests/258
+++ b/tests/qemu-iotests/258
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Very specific tests for adjacent commit/stream block jobs
 #
diff --git a/tests/qemu-iotests/281 b/tests/qemu-iotests/281
index 269d583b2c..0bf973bca6 100755
--- a/tests/qemu-iotests/281
+++ b/tests/qemu-iotests/281
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test cases for blockdev + IOThread interactions
 #
diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
index 7e2dab6ea4..b158dd65a2 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # NBD server - fault injection utility
 #
 # Configuration file syntax:
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py
index 91e4420b9f..1c4fa2b09f 100755
--- a/tests/qemu-iotests/qcow2.py
+++ b/tests/qemu-iotests/qcow2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from __future__ import print_function
 import sys
diff --git a/tests/qemu-iotests/qed.py b/tests/qemu-iotests/qed.py
index 8adaaf46c4..36bca1de23 100755
--- a/tests/qemu-iotests/qed.py
+++ b/tests/qemu-iotests/qed.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tool to manipulate QED image files
 #
-- 
2.21.1



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

* [PULL 34/46] tests: Explicit usage of Python 3
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (32 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 33/46] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19   ` Philippe Mathieu-Daudé
                   ` (13 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Vladimir Sementsov-Ogievskiy, Daniel P . Berrangé,
	Eduardo Habkost, Alex Bennée, Markus Armbruster,
	Michael Roth, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
       $(git grep -l 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-5-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/docker/travis.py         | 2 +-
 tests/qapi-schema/test-qapi.py | 2 +-
 tests/vm/centos                | 2 +-
 tests/vm/fedora                | 2 +-
 tests/vm/freebsd               | 2 +-
 tests/vm/netbsd                | 2 +-
 tests/vm/openbsd               | 2 +-
 tests/vm/ubuntu.i386           | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/docker/travis.py b/tests/docker/travis.py
index e1433012bd..62fccc5ebb 100755
--- a/tests/docker/travis.py
+++ b/tests/docker/travis.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Travis YAML config parser
 #
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index bad14edb47..503fb8ad25 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # QAPI parser test harness
 #
diff --git a/tests/vm/centos b/tests/vm/centos
index f2f0befd84..a41ff109eb 100755
--- a/tests/vm/centos
+++ b/tests/vm/centos
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # CentOS image
 #
diff --git a/tests/vm/fedora b/tests/vm/fedora
index 8e270fc0f0..4d7d6049f4 100755
--- a/tests/vm/fedora
+++ b/tests/vm/fedora
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Fedora VM image
 #
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index 33a736298a..fb54334696 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # FreeBSD VM image
 #
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index ec6f3563b2..c5069a45f4 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # NetBSD VM image
 #
diff --git a/tests/vm/openbsd b/tests/vm/openbsd
index d6173506f7..22cd9513dd 100755
--- a/tests/vm/openbsd
+++ b/tests/vm/openbsd
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # OpenBSD VM image
 #
diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
index 3834cd7a8d..48e9cb1ad3 100755
--- a/tests/vm/ubuntu.i386
+++ b/tests/vm/ubuntu.i386
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Ubuntu i386 image
 #
-- 
2.21.1



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

* [PULL 35/46] scripts: Explicit usage of Python 3 (scripts with __main__)
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
@ 2020-02-06 21:19   ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 02/46] python/qemu: Delint the qmp module Philippe Mathieu-Daudé
                     ` (46 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Cleber Rosa, Eduardo Habkost, Vladimir Sementsov-Ogievskiy,
	Daniel P . Berrangé,
	Stefan Hajnoczi, Juan Quintela, Paolo Bonzini, Richard Henderson,
	Markus Armbruster, Michael Roth, Dr. David Alan Gilbert,
	open list:Overall KVM CPUs

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
       $(git grep -l 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-6-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/analyse-locks-simpletrace.py | 2 +-
 scripts/decodetree.py                | 2 +-
 scripts/device-crash-test            | 2 +-
 scripts/kvm/kvm_flightrecorder       | 2 +-
 scripts/qapi-gen.py                  | 2 +-
 scripts/qmp/qemu-ga-client           | 2 +-
 scripts/qmp/qmp                      | 2 +-
 scripts/qmp/qmp-shell                | 2 +-
 scripts/qmp/qom-fuse                 | 2 +-
 scripts/render_block_graph.py        | 2 +-
 scripts/replay-dump.py               | 2 +-
 scripts/simpletrace.py               | 2 +-
 scripts/tracetool.py                 | 2 +-
 scripts/vmstate-static-checker.py    | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py
index 7d9b574300..9c263d6e79 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Analyse lock events and compute statistics
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index d8c59cab60..2a8f2b6e06 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright (c) 2018 Linaro Limited
 #
 # This library is free software; you can redistribute it and/or
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 15f213a6cd..25ee968b66 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #  Copyright (c) 2017 Red Hat Inc
 #
diff --git a/scripts/kvm/kvm_flightrecorder b/scripts/kvm/kvm_flightrecorder
index 54a56745e4..1391a84409 100755
--- a/scripts/kvm/kvm_flightrecorder
+++ b/scripts/kvm/kvm_flightrecorder
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # KVM Flight Recorder - ring buffer tracing script
 #
diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py
index f93f3c7c23..c7b0070db2 100755
--- a/scripts/qapi-gen.py
+++ b/scripts/qapi-gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # QAPI generator
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index 30cf8a9a0d..e4568aff68 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 # QEMU Guest Agent Client
 #
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index 6cb46fdae2..f85a14a627 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # QMP command line tool
 #
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index f1cddeafbc..9e122ad0c6 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # Low-level QEMU shell on top of QMP.
 #
diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
index 4d85970a78..6bada2c33d 100755
--- a/scripts/qmp/qom-fuse
+++ b/scripts/qmp/qom-fuse
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 ##
 # QEMU Object Model test tools
 #
diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py
index 656f0388ad..409b4321f2 100755
--- a/scripts/render_block_graph.py
+++ b/scripts/render_block_graph.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Render Qemu Block Graph
 #
diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index ee7fda2638..0cdae879b7 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Dump the contents of a recorded execution stream
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 45485b864b..2bc043112a 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Pretty-printer for simple trace backend binary trace files
 #
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 3beaa66bd8..264cc9eecc 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index f8b7b8f772..d44dedd9e9 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # Compares vmstate information stored in JSON format, obtained from
 # the -dump-vmstate QEMU command.
-- 
2.21.1


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

* [PULL 35/46] scripts: Explicit usage of Python 3 (scripts with __main__)
@ 2020-02-06 21:19   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vladimir Sementsov-Ogievskiy, Daniel P . Berrangé,
	Eduardo Habkost, open list:Overall KVM CPUs, Juan Quintela,
	Markus Armbruster, Michael Roth, Stefan Hajnoczi, Cleber Rosa,
	Paolo Bonzini, Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert, Richard Henderson

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
       $(git grep -l 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-6-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/analyse-locks-simpletrace.py | 2 +-
 scripts/decodetree.py                | 2 +-
 scripts/device-crash-test            | 2 +-
 scripts/kvm/kvm_flightrecorder       | 2 +-
 scripts/qapi-gen.py                  | 2 +-
 scripts/qmp/qemu-ga-client           | 2 +-
 scripts/qmp/qmp                      | 2 +-
 scripts/qmp/qmp-shell                | 2 +-
 scripts/qmp/qom-fuse                 | 2 +-
 scripts/render_block_graph.py        | 2 +-
 scripts/replay-dump.py               | 2 +-
 scripts/simpletrace.py               | 2 +-
 scripts/tracetool.py                 | 2 +-
 scripts/vmstate-static-checker.py    | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py
index 7d9b574300..9c263d6e79 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Analyse lock events and compute statistics
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index d8c59cab60..2a8f2b6e06 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright (c) 2018 Linaro Limited
 #
 # This library is free software; you can redistribute it and/or
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 15f213a6cd..25ee968b66 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #  Copyright (c) 2017 Red Hat Inc
 #
diff --git a/scripts/kvm/kvm_flightrecorder b/scripts/kvm/kvm_flightrecorder
index 54a56745e4..1391a84409 100755
--- a/scripts/kvm/kvm_flightrecorder
+++ b/scripts/kvm/kvm_flightrecorder
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # KVM Flight Recorder - ring buffer tracing script
 #
diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py
index f93f3c7c23..c7b0070db2 100755
--- a/scripts/qapi-gen.py
+++ b/scripts/qapi-gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # QAPI generator
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index 30cf8a9a0d..e4568aff68 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 # QEMU Guest Agent Client
 #
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index 6cb46fdae2..f85a14a627 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # QMP command line tool
 #
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index f1cddeafbc..9e122ad0c6 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # Low-level QEMU shell on top of QMP.
 #
diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
index 4d85970a78..6bada2c33d 100755
--- a/scripts/qmp/qom-fuse
+++ b/scripts/qmp/qom-fuse
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 ##
 # QEMU Object Model test tools
 #
diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py
index 656f0388ad..409b4321f2 100755
--- a/scripts/render_block_graph.py
+++ b/scripts/render_block_graph.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Render Qemu Block Graph
 #
diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index ee7fda2638..0cdae879b7 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Dump the contents of a recorded execution stream
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 45485b864b..2bc043112a 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Pretty-printer for simple trace backend binary trace files
 #
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 3beaa66bd8..264cc9eecc 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index f8b7b8f772..d44dedd9e9 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # Compares vmstate information stored in JSON format, obtained from
 # the -dump-vmstate QEMU command.
-- 
2.21.1



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

* [PULL 36/46] scripts/minikconf: Explicit usage of Python 3
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (34 preceding siblings ...)
  2020-02-06 21:19   ` Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 37/46] scripts/tracetool: Remove shebang header Philippe Mathieu-Daudé
                   ` (11 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vladimir Sementsov-Ogievskiy, Daniel P . Berrangé,
	Eduardo Habkost, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Use the program search path to find the Python 3 interpreter.

Patch created manually after running:

  $ git grep -l 'if __name__.*__main__' \
      | xargs grep -LF '#!/usr/bin/env python3'

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-7-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/minikconf.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index 40ae1989e1..377d6228b9 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
 #
 # Mini-Kconfig parser
 #
-- 
2.21.1



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

* [PULL 37/46] scripts/tracetool: Remove shebang header
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (35 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 36/46] scripts/minikconf: Explicit usage of Python 3 Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 38/46] tests/acceptance: " Philippe Mathieu-Daudé
                   ` (10 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vladimir Sementsov-Ogievskiy, Eduardo Habkost, Stefan Hajnoczi,
	Cleber Rosa, Paolo Bonzini, Philippe Mathieu-Daudé

Patch created mechanically by running:

  $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')
  $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-9-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/tracetool/__init__.py                    | 1 -
 scripts/tracetool/backend/__init__.py            | 1 -
 scripts/tracetool/backend/dtrace.py              | 1 -
 scripts/tracetool/backend/ftrace.py              | 1 -
 scripts/tracetool/backend/log.py                 | 1 -
 scripts/tracetool/backend/simple.py              | 1 -
 scripts/tracetool/backend/syslog.py              | 1 -
 scripts/tracetool/backend/ust.py                 | 1 -
 scripts/tracetool/format/__init__.py             | 1 -
 scripts/tracetool/format/c.py                    | 1 -
 scripts/tracetool/format/d.py                    | 1 -
 scripts/tracetool/format/h.py                    | 1 -
 scripts/tracetool/format/log_stap.py             | 1 -
 scripts/tracetool/format/simpletrace_stap.py     | 1 -
 scripts/tracetool/format/stap.py                 | 1 -
 scripts/tracetool/format/tcg_h.py                | 1 -
 scripts/tracetool/format/tcg_helper_c.py         | 1 -
 scripts/tracetool/format/tcg_helper_h.py         | 1 -
 scripts/tracetool/format/tcg_helper_wrapper_h.py | 1 -
 scripts/tracetool/format/ust_events_c.py         | 1 -
 scripts/tracetool/format/ust_events_h.py         | 1 -
 scripts/tracetool/transform.py                   | 1 -
 scripts/tracetool/vcpu.py                        | 1 -
 23 files changed, 23 deletions(-)

diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 44c118bc2a..13d29f1e42 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/__init__.py b/scripts/tracetool/backend/__init__.py
index 259c6a6531..54cab2c4de 100644
--- a/scripts/tracetool/backend/__init__.py
+++ b/scripts/tracetool/backend/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index c2f3a4e5a8..638990db79 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/ftrace.py b/scripts/tracetool/backend/ftrace.py
index 92f71b28f9..e9844dd335 100644
--- a/scripts/tracetool/backend/ftrace.py
+++ b/scripts/tracetool/backend/ftrace.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 33c95af8e9..23b274c0fd 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index c2fd1c24c4..b650c262b5 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py
index 668fb73fee..1373a90192 100644
--- a/scripts/tracetool/backend/syslog.py
+++ b/scripts/tracetool/backend/syslog.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.py
index 280cb7c106..a772a3b53b 100644
--- a/scripts/tracetool/backend/ust.py
+++ b/scripts/tracetool/backend/ust.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/__init__.py b/scripts/tracetool/format/__init__.py
index cf6e0e2da5..aba2f7a441 100644
--- a/scripts/tracetool/format/__init__.py
+++ b/scripts/tracetool/format/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py
index 31207961b0..78af8aff72 100644
--- a/scripts/tracetool/format/c.py
+++ b/scripts/tracetool/format/c.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
index c7cb2a93a6..d3980b914b 100644
--- a/scripts/tracetool/format/d.py
+++ b/scripts/tracetool/format/d.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py
index 5596b304e6..83e1a2f355 100644
--- a/scripts/tracetool/format/h.py
+++ b/scripts/tracetool/format/h.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/log_stap.py b/scripts/tracetool/format/log_stap.py
index 9ab0cf2cce..b486beb672 100644
--- a/scripts/tracetool/format/log_stap.py
+++ b/scripts/tracetool/format/log_stap.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/simpletrace_stap.py b/scripts/tracetool/format/simpletrace_stap.py
index 57b04061cf..4f4633b4e6 100644
--- a/scripts/tracetool/format/simpletrace_stap.py
+++ b/scripts/tracetool/format/simpletrace_stap.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/stap.py b/scripts/tracetool/format/stap.py
index e8ef3e762d..8fc808f2ef 100644
--- a/scripts/tracetool/format/stap.py
+++ b/scripts/tracetool/format/stap.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/tcg_h.py b/scripts/tracetool/format/tcg_h.py
index 1651cc3f71..0180e3d76c 100644
--- a/scripts/tracetool/format/tcg_h.py
+++ b/scripts/tracetool/format/tcg_h.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py
index 1b3522a716..6527b69afd 100644
--- a/scripts/tracetool/format/tcg_helper_c.py
+++ b/scripts/tracetool/format/tcg_helper_c.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/tcg_helper_h.py b/scripts/tracetool/format/tcg_helper_h.py
index 6b184b641b..98ebe52f18 100644
--- a/scripts/tracetool/format/tcg_helper_h.py
+++ b/scripts/tracetool/format/tcg_helper_h.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/tcg_helper_wrapper_h.py b/scripts/tracetool/format/tcg_helper_wrapper_h.py
index ff53447512..6adeab74df 100644
--- a/scripts/tracetool/format/tcg_helper_wrapper_h.py
+++ b/scripts/tracetool/format/tcg_helper_wrapper_h.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/ust_events_c.py b/scripts/tracetool/format/ust_events_c.py
index 264784cdf2..deced9533d 100644
--- a/scripts/tracetool/format/ust_events_c.py
+++ b/scripts/tracetool/format/ust_events_c.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index b14054ac01..6ce559f6cc 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/transform.py b/scripts/tracetool/transform.py
index 2ca9286046..8fd4dcf20d 100644
--- a/scripts/tracetool/transform.py
+++ b/scripts/tracetool/transform.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
diff --git a/scripts/tracetool/vcpu.py b/scripts/tracetool/vcpu.py
index 452c7f589d..0b104e4f15 100644
--- a/scripts/tracetool/vcpu.py
+++ b/scripts/tracetool/vcpu.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 """
-- 
2.21.1



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

* [PULL 38/46] tests/acceptance: Remove shebang header
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (36 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 37/46] scripts/tracetool: Remove shebang header Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 39/46] tests/vm: " Philippe Mathieu-Daudé
                   ` (9 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vladimir Sementsov-Ogievskiy, Eduardo Habkost,
	Wainer dos Santos Moschetta, Stefan Hajnoczi, Cleber Rosa,
	Paolo Bonzini, Philippe Mathieu-Daudé

Patch created mechanically by running:

  $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')
  $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-8-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py    | 1 -
 tests/acceptance/x86_cpu_model_versions.py | 1 -
 2 files changed, 2 deletions(-)
 mode change 100755 => 100644 tests/acceptance/virtio_check_params.py

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
old mode 100755
new mode 100644
index c3af8dbf9f..87e6c839d1
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Test virtio-scsi and virtio-blk queue settings for all machine types
 #
diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/x86_cpu_model_versions.py
index 90558d9a71..01ff614ec2 100644
--- a/tests/acceptance/x86_cpu_model_versions.py
+++ b/tests/acceptance/x86_cpu_model_versions.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Basic validation of x86 versioned CPU models and CPU model aliases
 #
-- 
2.21.1



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

* [PULL 39/46] tests/vm: Remove shebang header
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (37 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 38/46] tests/acceptance: " Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 40/46] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__) Philippe Mathieu-Daudé
                   ` (8 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Vladimir Sementsov-Ogievskiy, Eduardo Habkost,
	Alex Bennée, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Patch created mechanically by running:

  $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')
  $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-10-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/vm/basevm.py | 1 -
 1 file changed, 1 deletion(-)
 mode change 100755 => 100644 tests/vm/basevm.py

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
old mode 100755
new mode 100644
index ed5dd4f3d0..30714fa1a8
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # VM testing base class
 #
-- 
2.21.1



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

* [PULL 40/46] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (38 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 39/46] tests/vm: " Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 41/46] scripts: Explicit usage of Python 3 " Philippe Mathieu-Daudé
                   ` (7 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy,
	Daniel P . Berrangé,
	Eduardo Habkost, open list:Block layer core, Max Reitz,
	Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-11-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/qemu-iotests/149 | 2 +-
 tests/qemu-iotests/194 | 2 +-
 tests/qemu-iotests/202 | 2 +-
 tests/qemu-iotests/203 | 2 +-
 tests/qemu-iotests/206 | 2 +-
 tests/qemu-iotests/207 | 2 +-
 tests/qemu-iotests/208 | 2 +-
 tests/qemu-iotests/209 | 2 +-
 tests/qemu-iotests/210 | 2 +-
 tests/qemu-iotests/211 | 2 +-
 tests/qemu-iotests/212 | 2 +-
 tests/qemu-iotests/213 | 2 +-
 tests/qemu-iotests/216 | 2 +-
 tests/qemu-iotests/218 | 2 +-
 tests/qemu-iotests/219 | 2 +-
 tests/qemu-iotests/222 | 2 +-
 tests/qemu-iotests/224 | 2 +-
 tests/qemu-iotests/228 | 2 +-
 tests/qemu-iotests/234 | 2 +-
 tests/qemu-iotests/235 | 2 +-
 tests/qemu-iotests/236 | 2 +-
 tests/qemu-iotests/237 | 2 +-
 tests/qemu-iotests/238 | 2 +-
 tests/qemu-iotests/242 | 2 +-
 tests/qemu-iotests/246 | 2 +-
 tests/qemu-iotests/248 | 2 +-
 tests/qemu-iotests/254 | 2 +-
 tests/qemu-iotests/255 | 2 +-
 tests/qemu-iotests/256 | 2 +-
 tests/qemu-iotests/260 | 2 +-
 tests/qemu-iotests/262 | 2 +-
 tests/qemu-iotests/264 | 2 +-
 tests/qemu-iotests/266 | 2 +-
 tests/qemu-iotests/277 | 2 +-
 tests/qemu-iotests/280 | 2 +-
 35 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
index 8ab42e94c6..0a7b765d07 100755
--- a/tests/qemu-iotests/149
+++ b/tests/qemu-iotests/149
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2016 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
index 72e47e8833..9dc1bd3510 100755
--- a/tests/qemu-iotests/194
+++ b/tests/qemu-iotests/194
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/202 b/tests/qemu-iotests/202
index 581ca34d79..920a8683ef 100755
--- a/tests/qemu-iotests/202
+++ b/tests/qemu-iotests/202
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/203 b/tests/qemu-iotests/203
index 4874a1a0d8..49eff5d405 100755
--- a/tests/qemu-iotests/203
+++ b/tests/qemu-iotests/203
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206
index 9f16a7df8d..e2b50ae24d 100755
--- a/tests/qemu-iotests/206
+++ b/tests/qemu-iotests/206
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test qcow2 and file image creation
 #
diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207
index 812ab34e47..3d9c1208ca 100755
--- a/tests/qemu-iotests/207
+++ b/tests/qemu-iotests/207
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test ssh image creation
 #
diff --git a/tests/qemu-iotests/208 b/tests/qemu-iotests/208
index 546eb1de3e..1c3fc8c7fd 100755
--- a/tests/qemu-iotests/208
+++ b/tests/qemu-iotests/208
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/209 b/tests/qemu-iotests/209
index e0f464bcbe..65c1a1e70a 100755
--- a/tests/qemu-iotests/209
+++ b/tests/qemu-iotests/209
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for NBD BLOCK_STATUS extension
 #
diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210
index 4ca0fe26ef..e49896e23d 100755
--- a/tests/qemu-iotests/210
+++ b/tests/qemu-iotests/210
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test luks and file image creation
 #
diff --git a/tests/qemu-iotests/211 b/tests/qemu-iotests/211
index 8834ebfe85..163994d559 100755
--- a/tests/qemu-iotests/211
+++ b/tests/qemu-iotests/211
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VDI and file image creation
 #
diff --git a/tests/qemu-iotests/212 b/tests/qemu-iotests/212
index 8f3ccc7b15..800f92dd84 100755
--- a/tests/qemu-iotests/212
+++ b/tests/qemu-iotests/212
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test parallels and file image creation
 #
diff --git a/tests/qemu-iotests/213 b/tests/qemu-iotests/213
index 3fc8dc6eaa..1eee45276a 100755
--- a/tests/qemu-iotests/213
+++ b/tests/qemu-iotests/213
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vhdx and file image creation
 #
diff --git a/tests/qemu-iotests/216 b/tests/qemu-iotests/216
index 3c0ae54b44..372f042d3e 100755
--- a/tests/qemu-iotests/216
+++ b/tests/qemu-iotests/216
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copy-on-read tests using a COR filter node
 #
diff --git a/tests/qemu-iotests/218 b/tests/qemu-iotests/218
index 2554d84581..1325ba9eaa 100755
--- a/tests/qemu-iotests/218
+++ b/tests/qemu-iotests/218
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This test covers what happens when a mirror block job is cancelled
 # in various phases of its existence.
diff --git a/tests/qemu-iotests/219 b/tests/qemu-iotests/219
index 655f54d881..b8774770c4 100755
--- a/tests/qemu-iotests/219
+++ b/tests/qemu-iotests/219
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222
index 3f9f934ad8..bf1718e179 100644
--- a/tests/qemu-iotests/222
+++ b/tests/qemu-iotests/222
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This test covers the basic fleecing workflow, which provides a
 # point-in-time snapshot of a node that can be queried over NBD.
diff --git a/tests/qemu-iotests/224 b/tests/qemu-iotests/224
index b4dfaa639f..e91fb26fd8 100755
--- a/tests/qemu-iotests/224
+++ b/tests/qemu-iotests/224
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test json:{} filenames with qemu-internal BDSs
 # (the one of commit, to be precise)
diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228
index 9a50afd205..64bc82ee23 100755
--- a/tests/qemu-iotests/228
+++ b/tests/qemu-iotests/228
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for when a backing file is considered overridden (thus, a
 # json:{} filename is generated for the overlay) and when it is not
diff --git a/tests/qemu-iotests/234 b/tests/qemu-iotests/234
index 59a7f949ec..324c1549fd 100755
--- a/tests/qemu-iotests/234
+++ b/tests/qemu-iotests/234
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
index 3d7533980d..760826128e 100755
--- a/tests/qemu-iotests/235
+++ b/tests/qemu-iotests/235
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Simple mirror test
 #
diff --git a/tests/qemu-iotests/236 b/tests/qemu-iotests/236
index 79a6381f8e..8ce927a16c 100755
--- a/tests/qemu-iotests/236
+++ b/tests/qemu-iotests/236
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test bitmap merges.
 #
diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237
index a2242a4736..50ba364a3e 100755
--- a/tests/qemu-iotests/237
+++ b/tests/qemu-iotests/237
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vmdk and file image creation
 #
diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238
index e5ac2b2ff8..d4e060228c 100755
--- a/tests/qemu-iotests/238
+++ b/tests/qemu-iotests/238
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Regression test for throttle group member unregister segfault with iothread
 #
diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242
index c176e92da6..97617876bc 100755
--- a/tests/qemu-iotests/242
+++ b/tests/qemu-iotests/242
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for qcow2 bitmap printed information
 #
diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246
index b0997a392f..59a216a839 100755
--- a/tests/qemu-iotests/246
+++ b/tests/qemu-iotests/246
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test persistent bitmap resizing.
 #
diff --git a/tests/qemu-iotests/248 b/tests/qemu-iotests/248
index f26b4bb2aa..68c374692e 100755
--- a/tests/qemu-iotests/248
+++ b/tests/qemu-iotests/248
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test resume mirror after auto pause on ENOSPC
 #
diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254
index 09584f3f7d..ee66c986db 100755
--- a/tests/qemu-iotests/254
+++ b/tests/qemu-iotests/254
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test external snapshot with bitmap copying and moving.
 #
diff --git a/tests/qemu-iotests/255 b/tests/qemu-iotests/255
index 0ba03d9e61..4a4818bafb 100755
--- a/tests/qemu-iotests/255
+++ b/tests/qemu-iotests/255
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test commit job graph modifications while requests are active
 #
diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256
index c594a43205..e34074c83e 100755
--- a/tests/qemu-iotests/256
+++ b/tests/qemu-iotests/256
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test incremental/backup across iothread contexts
 #
diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260
index 4f6082c9d2..30c0de380d 100755
--- a/tests/qemu-iotests/260
+++ b/tests/qemu-iotests/260
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for temporary external snapshot when we have bitmaps.
 #
diff --git a/tests/qemu-iotests/262 b/tests/qemu-iotests/262
index bbcb5260a6..8835dce7be 100755
--- a/tests/qemu-iotests/262
+++ b/tests/qemu-iotests/262
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #
diff --git a/tests/qemu-iotests/264 b/tests/qemu-iotests/264
index 131366422b..879123a343 100755
--- a/tests/qemu-iotests/264
+++ b/tests/qemu-iotests/264
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test nbd reconnect
 #
diff --git a/tests/qemu-iotests/266 b/tests/qemu-iotests/266
index c353cf88ee..91bdf8729e 100755
--- a/tests/qemu-iotests/266
+++ b/tests/qemu-iotests/266
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VPC and file image creation
 #
diff --git a/tests/qemu-iotests/277 b/tests/qemu-iotests/277
index 1f72dca2d4..04aa15a3d5 100755
--- a/tests/qemu-iotests/277
+++ b/tests/qemu-iotests/277
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test NBD client reconnection
 #
diff --git a/tests/qemu-iotests/280 b/tests/qemu-iotests/280
index 85e9114c5e..69288fdd0e 100755
--- a/tests/qemu-iotests/280
+++ b/tests/qemu-iotests/280
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #
-- 
2.21.1



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

* [PULL 41/46] scripts: Explicit usage of Python 3 (scripts without __main__)
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (39 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 40/46] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__) Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 42/46] tests/qemu-iotests/check: Only check for Python 3 interpreter Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vladimir Sementsov-Ogievskiy, Daniel P . Berrangé,
	Eduardo Habkost, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-12-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/analyse-9p-simpletrace.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simpletrace.py
index 710e01adba..f20050fddd 100755
--- a/scripts/analyse-9p-simpletrace.py
+++ b/scripts/analyse-9p-simpletrace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Pretty print 9p simpletrace log
 # Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid>
 #
-- 
2.21.1



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

* [PULL 42/46] tests/qemu-iotests/check: Only check for Python 3 interpreter
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (40 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 41/46] scripts: Explicit usage of Python 3 " Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 43/46] scripts/signrom: remove Python 2 support, add shebang Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Eduardo Habkost, open list:Block layer core,
	Max Reitz, Stefan Hajnoczi, Cleber Rosa, Paolo Bonzini,
	Philippe Mathieu-Daudé

All the iotests Python scripts have been converted to search for
the Python 3 interpreter. Update the ./check script accordingly.

Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-13-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/qemu-iotests/check | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index f5afb12016..da77917cb6 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -838,8 +838,7 @@ do
 
         start=$(_wallclock)
 
-        if [ "$(head -n 1 "$source_iotests/$seq" | sed 's/3$//')" \
-            == "#!/usr/bin/env python" ]; then
+        if [ "$(head -n 1 "$source_iotests/$seq")" == "#!/usr/bin/env python3" ]; then
             if $python_usable; then
                 run_command="$PYTHON $seq"
             else
-- 
2.21.1



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

* [PULL 43/46] scripts/signrom: remove Python 2 support, add shebang
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (41 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 42/46] tests/qemu-iotests/check: Only check for Python 3 interpreter Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19 ` [PULL 44/46] make all Python scripts executable Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

From: Paolo Bonzini <pbonzini@redhat.com>

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200204160028.16211-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/signrom.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/scripts/signrom.py b/scripts/signrom.py
index 313ee28a17..9be5dab1cf 100644
--- a/scripts/signrom.py
+++ b/scripts/signrom.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
 from __future__ import print_function
 #
 # Option ROM signing utility
@@ -44,14 +46,8 @@ fout.write(data)
 
 checksum = 0
 for b in data:
-    # catch Python 2 vs. 3 differences
-    if isinstance(b, int):
-        checksum += b
-    else:
-        checksum += ord(b)
-checksum = (256 - checksum) % 256
+    checksum = (checksum - b) & 255
 
-# Python 3 no longer allows chr(checksum)
 fout.write(struct.pack('B', checksum))
 
 fin.close()
-- 
2.21.1



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

* [PULL 44/46] make all Python scripts executable
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (42 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 43/46] scripts/signrom: remove Python 2 support, add shebang Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 21:19   ` Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Eduardo Habkost, Cleber Rosa

From: Paolo Bonzini <pbonzini@redhat.com>

Scripts that have a Python shebang are meant to be executed directly from the
shell; give them 755 permissions.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200204160237.16889-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/minikconf.py   | 0
 scripts/signrom.py     | 0
 tests/qemu-iotests/222 | 0
 tests/qemu-iotests/245 | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/minikconf.py
 mode change 100644 => 100755 scripts/signrom.py
 mode change 100644 => 100755 tests/qemu-iotests/222
 mode change 100644 => 100755 tests/qemu-iotests/245

diff --git a/scripts/minikconf.py b/scripts/minikconf.py
old mode 100644
new mode 100755
diff --git a/scripts/signrom.py b/scripts/signrom.py
old mode 100644
new mode 100755
diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222
old mode 100644
new mode 100755
diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245
old mode 100644
new mode 100755
-- 
2.21.1



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

* [PULL 45/46] drop "from __future__ import print_function"
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
@ 2020-02-06 21:19   ` Philippe Mathieu-Daudé
  2020-02-06 21:18 ` [PULL 02/46] python/qemu: Delint the qmp module Philippe Mathieu-Daudé
                     ` (46 subsequent siblings)
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Cleber Rosa, Eduardo Habkost, Paolo Bonzini, Alex Bennée,
	Markus Armbruster, Marc-André Lureau, Marcelo Tosatti,
	Michael Roth, Juan Quintela, Dr. David Alan Gilbert, Fam Zheng,
	Kevin Wolf, Max Reitz, open list:Overall KVM CPUs,
	open list:Block layer core

From: Paolo Bonzini <pbonzini@redhat.com>

This is only needed for Python 2, which we do not support anymore.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200204160604.19883-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/analyse-9p-simpletrace.py        | 1 -
 scripts/analyse-locks-simpletrace.py     | 1 -
 scripts/device-crash-test                | 1 -
 scripts/dump-guest-memory.py             | 1 -
 scripts/kvm/kvm_flightrecorder           | 1 -
 scripts/kvm/vmxcap                       | 1 -
 scripts/minikconf.py                     | 1 -
 scripts/modules/module_block.py          | 1 -
 scripts/qapi-gen.py                      | 1 -
 scripts/qapi/doc.py                      | 1 -
 scripts/qmp/qemu-ga-client               | 1 -
 scripts/qmp/qmp                          | 1 -
 scripts/qmp/qmp-shell                    | 1 -
 scripts/qmp/qom-get                      | 1 -
 scripts/qmp/qom-list                     | 1 -
 scripts/qmp/qom-set                      | 1 -
 scripts/qmp/qom-tree                     | 1 -
 scripts/replay-dump.py                   | 1 -
 scripts/signrom.py                       | 1 -
 scripts/simpletrace.py                   | 1 -
 scripts/vmstate-static-checker.py        | 1 -
 tests/docker/travis.py                   | 1 -
 tests/guest-debug/test-gdbstub.py        | 1 -
 tests/migration/guestperf/engine.py      | 1 -
 tests/migration/guestperf/plot.py        | 1 -
 tests/migration/guestperf/shell.py       | 1 -
 tests/qapi-schema/test-qapi.py           | 1 -
 tests/qemu-iotests/149                   | 1 -
 tests/qemu-iotests/165                   | 1 -
 tests/qemu-iotests/iotests.py            | 1 -
 tests/qemu-iotests/nbd-fault-injector.py | 1 -
 tests/qemu-iotests/qcow2.py              | 1 -
 tests/qemu-iotests/qed.py                | 1 -
 tests/vm/basevm.py                       | 1 -
 34 files changed, 34 deletions(-)

diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simpletrace.py
index f20050fddd..7dfcb6ba2f 100755
--- a/scripts/analyse-9p-simpletrace.py
+++ b/scripts/analyse-9p-simpletrace.py
@@ -3,7 +3,6 @@
 # Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid>
 #
 # Author: Harsh Prateek Bora
-from __future__ import print_function
 import os
 import simpletrace
 
diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py
index 9c263d6e79..63c11f4fce 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -6,7 +6,6 @@
 # Author: Alex Bennée <alex.bennee@linaro.org>
 #
 
-from __future__ import print_function
 import simpletrace
 import argparse
 import numpy as np
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 25ee968b66..305d0427af 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -23,7 +23,6 @@
 Run QEMU with all combinations of -machine and -device types,
 check for crashes and unexpected errors.
 """
-from __future__ import print_function
 
 import os
 import sys
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index 9371e45813..4177261d33 100644
--- a/scripts/dump-guest-memory.py
+++ b/scripts/dump-guest-memory.py
@@ -12,7 +12,6 @@ Authors:
 This work is licensed under the terms of the GNU GPL, version 2 or later. See
 the COPYING file in the top-level directory.
 """
-from __future__ import print_function
 
 import ctypes
 import struct
diff --git a/scripts/kvm/kvm_flightrecorder b/scripts/kvm/kvm_flightrecorder
index 1391a84409..78ca3af9c4 100755
--- a/scripts/kvm/kvm_flightrecorder
+++ b/scripts/kvm/kvm_flightrecorder
@@ -32,7 +32,6 @@
 # consuming CPU cycles.  No disk I/O is performed since the ring buffer holds a
 # fixed-size in-memory trace.
 
-from __future__ import print_function
 import sys
 import os
 
diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
index 5dfeb2e03a..971ed0e721 100755
--- a/scripts/kvm/vmxcap
+++ b/scripts/kvm/vmxcap
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2.  See
 # the COPYING file in the top-level directory.
 
-from __future__ import print_function
 MSR_IA32_VMX_BASIC = 0x480
 MSR_IA32_VMX_PINBASED_CTLS = 0x481
 MSR_IA32_VMX_PROCBASED_CTLS = 0x482
diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index 377d6228b9..2f9647d0fa 100755
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -11,7 +11,6 @@
 # or, at your option, any later version.  See the COPYING file in
 # the top-level directory.
 
-from __future__ import print_function
 import os
 import sys
 import re
diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py
index 08646af92c..f23191fac1 100644
--- a/scripts/modules/module_block.py
+++ b/scripts/modules/module_block.py
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import os
 
diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py
index c7b0070db2..4b03f7d53b 100755
--- a/scripts/qapi-gen.py
+++ b/scripts/qapi-gen.py
@@ -4,7 +4,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 
 import argparse
 import re
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py
index 6f1c17f71f..1787a53d91 100644
--- a/scripts/qapi/doc.py
+++ b/scripts/qapi/doc.py
@@ -4,7 +4,6 @@
 # See the COPYING file in the top-level directory.
 """This script produces the documentation of a qapi schema in texinfo format"""
 
-from __future__ import print_function
 import re
 from qapi.gen import QAPIGenDoc, QAPISchemaVisitor
 
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index e4568aff68..ce122984a9 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -36,7 +36,6 @@
 # See also: https://wiki.qemu.org/Features/QAPI/GuestAgent
 #
 
-from __future__ import print_function
 import os
 import sys
 import base64
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index f85a14a627..0625fc2aba 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPLv2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys, os
 from qmp import QEMUMonitorProtocol
 
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 9e122ad0c6..a01d31de1e 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -65,7 +65,6 @@
 # which will echo back the properly formatted JSON-compliant QMP that is being
 # sent to QEMU, which is useful for debugging and documentation generation.
 
-from __future__ import print_function
 import json
 import ast
 import readline
diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get
index ec5275d53a..007b4cd442 100755
--- a/scripts/qmp/qom-get
+++ b/scripts/qmp/qom-get
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-list b/scripts/qmp/qom-list
index 0f97440973..03bda3446b 100755
--- a/scripts/qmp/qom-list
+++ b/scripts/qmp/qom-list
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set
index 26ed9e3263..c37fe78b00 100755
--- a/scripts/qmp/qom-set
+++ b/scripts/qmp/qom-set
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree
index 31603c681f..1c8acf61e7 100755
--- a/scripts/qmp/qom-tree
+++ b/scripts/qmp/qom-tree
@@ -13,7 +13,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index 0cdae879b7..4cbc1e47c6 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this library; if not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
 import argparse
 import struct
 from collections import namedtuple
diff --git a/scripts/signrom.py b/scripts/signrom.py
index 9be5dab1cf..43693dba56 100755
--- a/scripts/signrom.py
+++ b/scripts/signrom.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python3
 
-from __future__ import print_function
 #
 # Option ROM signing utility
 #
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 2bc043112a..20f0026066 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -9,7 +9,6 @@
 #
 # For help see docs/devel/tracing.txt
 
-from __future__ import print_function
 import struct
 import inspect
 from tracetool import read_events, Event
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index d44dedd9e9..539ead62b4 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -19,7 +19,6 @@
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
 import argparse
 import json
 import sys
diff --git a/tests/docker/travis.py b/tests/docker/travis.py
index 62fccc5ebb..37307ac366 100755
--- a/tests/docker/travis.py
+++ b/tests/docker/travis.py
@@ -11,7 +11,6 @@
 # or (at your option) any later version. See the COPYING file in
 # the top-level directory.
 
-from __future__ import print_function
 import sys
 import yaml
 import itertools
diff --git a/tests/guest-debug/test-gdbstub.py b/tests/guest-debug/test-gdbstub.py
index c7e3986a24..98a5df4d42 100644
--- a/tests/guest-debug/test-gdbstub.py
+++ b/tests/guest-debug/test-gdbstub.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # This script needs to be run on startup
 # qemu -kernel ${KERNEL} -s -S
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
index 1dd04ce33b..fd63c66601 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test main engine
 #
diff --git a/tests/migration/guestperf/plot.py b/tests/migration/guestperf/plot.py
index aa98912a82..34cebd54ba 100644
--- a/tests/migration/guestperf/plot.py
+++ b/tests/migration/guestperf/plot.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test graph plotting
 #
diff --git a/tests/migration/guestperf/shell.py b/tests/migration/guestperf/shell.py
index 61d2abbaad..5bcc066bb9 100644
--- a/tests/migration/guestperf/shell.py
+++ b/tests/migration/guestperf/shell.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test command line shell integration
 #
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index 503fb8ad25..41232c11a3 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -11,7 +11,6 @@
 # See the COPYING file in the top-level directory.
 #
 
-from __future__ import print_function
 
 import argparse
 import difflib
diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
index 0a7b765d07..b4a21bf7b7 100755
--- a/tests/qemu-iotests/149
+++ b/tests/qemu-iotests/149
@@ -20,7 +20,6 @@
 # Exercise the QEMU 'luks' block driver to validate interoperability
 # with the Linux dm-crypt + cryptsetup implementation
 
-from __future__ import print_function
 import subprocess
 import os
 import os.path
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index b60a803dae..fb56a769b4 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -18,7 +18,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from __future__ import print_function
 import os
 import re
 import iotests
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 89aa2df2f3..657d2b8724 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 # Common utilities and Python wrappers for qemu-iotests
 #
 # Copyright (C) 2012 IBM Corp.
diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
index b158dd65a2..588d62aebf 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -43,7 +43,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import socket
 import struct
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py
index 1c4fa2b09f..94a07b2f6f 100755
--- a/tests/qemu-iotests/qcow2.py
+++ b/tests/qemu-iotests/qcow2.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python3
 
-from __future__ import print_function
 import sys
 import struct
 import string
diff --git a/tests/qemu-iotests/qed.py b/tests/qemu-iotests/qed.py
index 36bca1de23..d6bec96069 100755
--- a/tests/qemu-iotests/qed.py
+++ b/tests/qemu-iotests/qed.py
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import struct
 import random
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 30714fa1a8..4dee6647e6 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 #
 
-from __future__ import print_function
 import os
 import re
 import sys
-- 
2.21.1


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

* [PULL 45/46] drop "from __future__ import print_function"
@ 2020-02-06 21:19   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Kevin Wolf, open list:Block layer core,
	Eduardo Habkost, open list:Overall KVM CPUs, Juan Quintela,
	Philippe Mathieu-Daudé,
	Marcelo Tosatti, Markus Armbruster, Michael Roth,
	Marc-André Lureau, Cleber Rosa, Paolo Bonzini, Max Reitz,
	Alex Bennée, Dr. David Alan Gilbert

From: Paolo Bonzini <pbonzini@redhat.com>

This is only needed for Python 2, which we do not support anymore.

Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200204160604.19883-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/analyse-9p-simpletrace.py        | 1 -
 scripts/analyse-locks-simpletrace.py     | 1 -
 scripts/device-crash-test                | 1 -
 scripts/dump-guest-memory.py             | 1 -
 scripts/kvm/kvm_flightrecorder           | 1 -
 scripts/kvm/vmxcap                       | 1 -
 scripts/minikconf.py                     | 1 -
 scripts/modules/module_block.py          | 1 -
 scripts/qapi-gen.py                      | 1 -
 scripts/qapi/doc.py                      | 1 -
 scripts/qmp/qemu-ga-client               | 1 -
 scripts/qmp/qmp                          | 1 -
 scripts/qmp/qmp-shell                    | 1 -
 scripts/qmp/qom-get                      | 1 -
 scripts/qmp/qom-list                     | 1 -
 scripts/qmp/qom-set                      | 1 -
 scripts/qmp/qom-tree                     | 1 -
 scripts/replay-dump.py                   | 1 -
 scripts/signrom.py                       | 1 -
 scripts/simpletrace.py                   | 1 -
 scripts/vmstate-static-checker.py        | 1 -
 tests/docker/travis.py                   | 1 -
 tests/guest-debug/test-gdbstub.py        | 1 -
 tests/migration/guestperf/engine.py      | 1 -
 tests/migration/guestperf/plot.py        | 1 -
 tests/migration/guestperf/shell.py       | 1 -
 tests/qapi-schema/test-qapi.py           | 1 -
 tests/qemu-iotests/149                   | 1 -
 tests/qemu-iotests/165                   | 1 -
 tests/qemu-iotests/iotests.py            | 1 -
 tests/qemu-iotests/nbd-fault-injector.py | 1 -
 tests/qemu-iotests/qcow2.py              | 1 -
 tests/qemu-iotests/qed.py                | 1 -
 tests/vm/basevm.py                       | 1 -
 34 files changed, 34 deletions(-)

diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simpletrace.py
index f20050fddd..7dfcb6ba2f 100755
--- a/scripts/analyse-9p-simpletrace.py
+++ b/scripts/analyse-9p-simpletrace.py
@@ -3,7 +3,6 @@
 # Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid>
 #
 # Author: Harsh Prateek Bora
-from __future__ import print_function
 import os
 import simpletrace
 
diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py
index 9c263d6e79..63c11f4fce 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -6,7 +6,6 @@
 # Author: Alex Bennée <alex.bennee@linaro.org>
 #
 
-from __future__ import print_function
 import simpletrace
 import argparse
 import numpy as np
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 25ee968b66..305d0427af 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -23,7 +23,6 @@
 Run QEMU with all combinations of -machine and -device types,
 check for crashes and unexpected errors.
 """
-from __future__ import print_function
 
 import os
 import sys
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index 9371e45813..4177261d33 100644
--- a/scripts/dump-guest-memory.py
+++ b/scripts/dump-guest-memory.py
@@ -12,7 +12,6 @@ Authors:
 This work is licensed under the terms of the GNU GPL, version 2 or later. See
 the COPYING file in the top-level directory.
 """
-from __future__ import print_function
 
 import ctypes
 import struct
diff --git a/scripts/kvm/kvm_flightrecorder b/scripts/kvm/kvm_flightrecorder
index 1391a84409..78ca3af9c4 100755
--- a/scripts/kvm/kvm_flightrecorder
+++ b/scripts/kvm/kvm_flightrecorder
@@ -32,7 +32,6 @@
 # consuming CPU cycles.  No disk I/O is performed since the ring buffer holds a
 # fixed-size in-memory trace.
 
-from __future__ import print_function
 import sys
 import os
 
diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
index 5dfeb2e03a..971ed0e721 100755
--- a/scripts/kvm/vmxcap
+++ b/scripts/kvm/vmxcap
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2.  See
 # the COPYING file in the top-level directory.
 
-from __future__ import print_function
 MSR_IA32_VMX_BASIC = 0x480
 MSR_IA32_VMX_PINBASED_CTLS = 0x481
 MSR_IA32_VMX_PROCBASED_CTLS = 0x482
diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index 377d6228b9..2f9647d0fa 100755
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -11,7 +11,6 @@
 # or, at your option, any later version.  See the COPYING file in
 # the top-level directory.
 
-from __future__ import print_function
 import os
 import sys
 import re
diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py
index 08646af92c..f23191fac1 100644
--- a/scripts/modules/module_block.py
+++ b/scripts/modules/module_block.py
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import os
 
diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py
index c7b0070db2..4b03f7d53b 100755
--- a/scripts/qapi-gen.py
+++ b/scripts/qapi-gen.py
@@ -4,7 +4,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 
 import argparse
 import re
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py
index 6f1c17f71f..1787a53d91 100644
--- a/scripts/qapi/doc.py
+++ b/scripts/qapi/doc.py
@@ -4,7 +4,6 @@
 # See the COPYING file in the top-level directory.
 """This script produces the documentation of a qapi schema in texinfo format"""
 
-from __future__ import print_function
 import re
 from qapi.gen import QAPIGenDoc, QAPISchemaVisitor
 
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index e4568aff68..ce122984a9 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -36,7 +36,6 @@
 # See also: https://wiki.qemu.org/Features/QAPI/GuestAgent
 #
 
-from __future__ import print_function
 import os
 import sys
 import base64
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index f85a14a627..0625fc2aba 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPLv2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys, os
 from qmp import QEMUMonitorProtocol
 
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 9e122ad0c6..a01d31de1e 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -65,7 +65,6 @@
 # which will echo back the properly formatted JSON-compliant QMP that is being
 # sent to QEMU, which is useful for debugging and documentation generation.
 
-from __future__ import print_function
 import json
 import ast
 import readline
diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get
index ec5275d53a..007b4cd442 100755
--- a/scripts/qmp/qom-get
+++ b/scripts/qmp/qom-get
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-list b/scripts/qmp/qom-list
index 0f97440973..03bda3446b 100755
--- a/scripts/qmp/qom-list
+++ b/scripts/qmp/qom-list
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set
index 26ed9e3263..c37fe78b00 100755
--- a/scripts/qmp/qom-set
+++ b/scripts/qmp/qom-set
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree
index 31603c681f..1c8acf61e7 100755
--- a/scripts/qmp/qom-tree
+++ b/scripts/qmp/qom-tree
@@ -13,7 +13,6 @@
 # the COPYING file in the top-level directory.
 ##
 
-from __future__ import print_function
 import sys
 import os
 from qmp import QEMUMonitorProtocol
diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index 0cdae879b7..4cbc1e47c6 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this library; if not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
 import argparse
 import struct
 from collections import namedtuple
diff --git a/scripts/signrom.py b/scripts/signrom.py
index 9be5dab1cf..43693dba56 100755
--- a/scripts/signrom.py
+++ b/scripts/signrom.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python3
 
-from __future__ import print_function
 #
 # Option ROM signing utility
 #
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 2bc043112a..20f0026066 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -9,7 +9,6 @@
 #
 # For help see docs/devel/tracing.txt
 
-from __future__ import print_function
 import struct
 import inspect
 from tracetool import read_events, Event
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index d44dedd9e9..539ead62b4 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -19,7 +19,6 @@
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
 import argparse
 import json
 import sys
diff --git a/tests/docker/travis.py b/tests/docker/travis.py
index 62fccc5ebb..37307ac366 100755
--- a/tests/docker/travis.py
+++ b/tests/docker/travis.py
@@ -11,7 +11,6 @@
 # or (at your option) any later version. See the COPYING file in
 # the top-level directory.
 
-from __future__ import print_function
 import sys
 import yaml
 import itertools
diff --git a/tests/guest-debug/test-gdbstub.py b/tests/guest-debug/test-gdbstub.py
index c7e3986a24..98a5df4d42 100644
--- a/tests/guest-debug/test-gdbstub.py
+++ b/tests/guest-debug/test-gdbstub.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # This script needs to be run on startup
 # qemu -kernel ${KERNEL} -s -S
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
index 1dd04ce33b..fd63c66601 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test main engine
 #
diff --git a/tests/migration/guestperf/plot.py b/tests/migration/guestperf/plot.py
index aa98912a82..34cebd54ba 100644
--- a/tests/migration/guestperf/plot.py
+++ b/tests/migration/guestperf/plot.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test graph plotting
 #
diff --git a/tests/migration/guestperf/shell.py b/tests/migration/guestperf/shell.py
index 61d2abbaad..5bcc066bb9 100644
--- a/tests/migration/guestperf/shell.py
+++ b/tests/migration/guestperf/shell.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 #
 # Migration test command line shell integration
 #
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index 503fb8ad25..41232c11a3 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -11,7 +11,6 @@
 # See the COPYING file in the top-level directory.
 #
 
-from __future__ import print_function
 
 import argparse
 import difflib
diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
index 0a7b765d07..b4a21bf7b7 100755
--- a/tests/qemu-iotests/149
+++ b/tests/qemu-iotests/149
@@ -20,7 +20,6 @@
 # Exercise the QEMU 'luks' block driver to validate interoperability
 # with the Linux dm-crypt + cryptsetup implementation
 
-from __future__ import print_function
 import subprocess
 import os
 import os.path
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index b60a803dae..fb56a769b4 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -18,7 +18,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from __future__ import print_function
 import os
 import re
 import iotests
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 89aa2df2f3..657d2b8724 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 # Common utilities and Python wrappers for qemu-iotests
 #
 # Copyright (C) 2012 IBM Corp.
diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
index b158dd65a2..588d62aebf 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -43,7 +43,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import socket
 import struct
diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py
index 1c4fa2b09f..94a07b2f6f 100755
--- a/tests/qemu-iotests/qcow2.py
+++ b/tests/qemu-iotests/qcow2.py
@@ -1,6 +1,5 @@
 #!/usr/bin/env python3
 
-from __future__ import print_function
 import sys
 import struct
 import string
diff --git a/tests/qemu-iotests/qed.py b/tests/qemu-iotests/qed.py
index 36bca1de23..d6bec96069 100755
--- a/tests/qemu-iotests/qed.py
+++ b/tests/qemu-iotests/qed.py
@@ -10,7 +10,6 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
-from __future__ import print_function
 import sys
 import struct
 import random
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 30714fa1a8..4dee6647e6 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -11,7 +11,6 @@
 # the COPYING file in the top-level directory.
 #
 
-from __future__ import print_function
 import os
 import re
 import sys
-- 
2.21.1



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

* [PULL 46/46] .readthedocs.yml: specify some minimum python requirements
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (44 preceding siblings ...)
  2020-02-06 21:19   ` Philippe Mathieu-Daudé
@ 2020-02-06 21:19 ` Philippe Mathieu-Daudé
  2020-02-06 22:07 ` [PULL 00/46] Python queue 2020-02-06 Eduardo Habkost
  2020-02-07 11:51 ` Peter Maydell
  47 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Eduardo Habkost, Cleber Rosa

From: Alex Bennée <alex.bennee@linaro.org>

QEMU is all about the Python 3 now so lets also hint that to
ReadTheDocs in its config file.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200206163120.31899-1-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .readthedocs.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 .readthedocs.yml

diff --git a/.readthedocs.yml b/.readthedocs.yml
new file mode 100644
index 0000000000..8355dbc634
--- /dev/null
+++ b/.readthedocs.yml
@@ -0,0 +1,20 @@
+# .readthedocs.yml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Build documentation in the docs/ directory with Sphinx
+sphinx:
+  configuration: docs/conf.py
+
+# We want all the document formats
+formats: all
+
+# For consistency, we require that QEMU's Sphinx extensions
+# run with at least the same minimum version of Python that
+# we require for other Python in our codebase (our conf.py
+# enforces this, and some code needs it.)
+python:
+  version: 3.5
-- 
2.21.1



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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (45 preceding siblings ...)
  2020-02-06 21:19 ` [PULL 46/46] .readthedocs.yml: specify some minimum python requirements Philippe Mathieu-Daudé
@ 2020-02-06 22:07 ` Eduardo Habkost
  2020-02-07 11:51 ` Peter Maydell
  47 siblings, 0 replies; 55+ messages in thread
From: Eduardo Habkost @ 2020-02-06 22:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel, Cleber Rosa

[-- Attachment #1: Type: text/plain, Size: 13865 bytes --]

On Thu, Feb 06, 2020 at 10:18:50PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Peter,
> 
> I prepared this series on behalf of Eduardo and
> Cleber (one of them will ack this cover).

Acked-by: Eduardo Habkost <ehabkost@redhat.com>

> 
> Regards,
> 
> Phil.
> 
> The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:
> 
>   Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)
> 
> are available in the Git repository at:
> 
>   https://gitlab.com/philmd/qemu.git tags/python-next-20200206
> 
> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
> 
>   .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)
> 
> ----------------------------------------------------------------
> 
> - Python 3 cleanups:
>   . Remove text about Python 2 in qemu-deprecated (Thomas)
>   . Remove shebang header (Paolo, Philippe)
>   . scripts/checkpatch.pl now allows Python 3 interpreter (Philippe)
>   . Explicit usage of Python 3 interpreter in scripts (Philippe)
>   . Fix Python scripts permissions (Paolo, Philippe)
>   . Drop 'from __future__ import print_function' (Paolo)
>   . Specify minimum python requirements in ReadTheDocs configuration (Alex)
> - Test UNIX/EXEC transports with migration (Oksana)
> - Added extract_from_rpm helper, improved extract_from_deb (Liam)
> - Allow to use other serial consoles than default one (Philippe)
> - Various improvements in QEMUMonitorProtocol (Wainer)
> - Fix kvm_available() on ppc64le (Wainer)
> 
> ----------------------------------------------------------------
> 
> Alex Bennée (1):
>   .readthedocs.yml: specify some minimum python requirements
> 
> Denis Plotnikov (1):
>   tests: rename virtio_seg_max_adjust to virtio_check_params
> 
> Liam Merwick (4):
>   travis.yml: install rpm2cpio for acceptance tests
>   tests/boot_linux_console: add extract_from_rpm method
>   tests/boot_linux_console: use os.path for filesystem paths
>   tests/boot_linux_console: fix extract_from_deb() comment
> 
> Lukáš Doktor (1):
>   python: Treat None-return of greeting cmd
> 
> Oksana Vohchana (4):
>   tests/acceptance/migration: Factor out assert_migration()
>   tests/acceptance/migration: Factor out do_migrate()
>   tests/acceptance/migration: Test UNIX transport when migrating
>   tests/acceptance/migration: Test EXEC transport when migrating
> 
> Paolo Bonzini (3):
>   scripts/signrom: remove Python 2 support, add shebang
>   make all Python scripts executable
>   drop "from __future__ import print_function"
> 
> Philippe Mathieu-Daudé (24):
>   python/qemu/machine: Allow to use other serial consoles than default
>   Acceptance tests: Extract _console_interaction()
>   Acceptance tests: Add interrupt_interactive_console_until_pattern()
>   tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot'
>   tests/acceptance/virtio_check_params: Improve exception logging
>   tests/acceptance/virtio_check_params: List machine being tested
>   tests/acceptance/virtio_check_params: Default to -nodefaults
>   tests/acceptance/virtio_check_params: Disable the test
>   tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine
>   tests/acceptance/version: Default to -nodefaults
>   tests/acceptance/migration: Add the 'migration' tag
>   tests/acceptance/migration: Default to -nodefaults
>   scripts/checkpatch.pl: Only allow Python 3 interpreter
>   tests/qemu-iotests/check: Allow use of python3 interpreter
>   tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)
>   tests: Explicit usage of Python 3
>   scripts: Explicit usage of Python 3 (scripts with __main__)
>   scripts/minikconf: Explicit usage of Python 3
>   scripts/tracetool: Remove shebang header
>   tests/acceptance: Remove shebang header
>   tests/vm: Remove shebang header
>   tests/qemu-iotests: Explicit usage of Python3 (scripts without
>     __main__)
>   scripts: Explicit usage of Python 3 (scripts without __main__)
>   tests/qemu-iotests/check: Only check for Python 3 interpreter
> 
> Thomas Huth (2):
>   qemu-deprecated: Remove text about Python 2
>   tests/acceptance: Add boot tests for some of the QEMU advent calendar
>     images
> 
> Wainer dos Santos Moschetta (6):
>   python/qemu: qmp: Replace socket.error with OSError
>   python/qemu: Delint the qmp module
>   python/qemu: qmp: Make accept()'s timeout configurable
>   python/qemu: qmp: Make QEMUMonitorProtocol a context manager
>   python/qemu: qmp: Remove unnused attributes
>   python/qemu: accel: Fix kvm_available() on ppc64le
> 
>  qemu-deprecated.texi                          |   8 --
>  .readthedocs.yml                              |  20 +++
>  .travis.yml                                   |   3 +-
>  python/qemu/accel.py                          |   3 +-
>  python/qemu/machine.py                        |  10 +-
>  python/qemu/qmp.py                            |  99 ++++++++++----
>  scripts/analyse-9p-simpletrace.py             |   3 +-
>  scripts/analyse-locks-simpletrace.py          |   3 +-
>  scripts/checkpatch.pl                         |   6 +
>  scripts/decodetree.py                         |   2 +-
>  scripts/device-crash-test                     |   3 +-
>  scripts/dump-guest-memory.py                  |   1 -
>  scripts/kvm/kvm_flightrecorder                |   3 +-
>  scripts/kvm/vmxcap                            |   1 -
>  scripts/minikconf.py                          |   2 +-
>  scripts/modules/module_block.py               |   1 -
>  scripts/qapi-gen.py                           |   3 +-
>  scripts/qapi/doc.py                           |   1 -
>  scripts/qmp/qemu-ga-client                    |   3 +-
>  scripts/qmp/qmp                               |   3 +-
>  scripts/qmp/qmp-shell                         |   3 +-
>  scripts/qmp/qom-fuse                          |   2 +-
>  scripts/qmp/qom-get                           |   1 -
>  scripts/qmp/qom-list                          |   1 -
>  scripts/qmp/qom-set                           |   1 -
>  scripts/qmp/qom-tree                          |   1 -
>  scripts/render_block_graph.py                 |   2 +-
>  scripts/replay-dump.py                        |   3 +-
>  scripts/signrom.py                            |  11 +-
>  scripts/simpletrace.py                        |   3 +-
>  scripts/tracetool.py                          |   2 +-
>  scripts/tracetool/__init__.py                 |   1 -
>  scripts/tracetool/backend/__init__.py         |   1 -
>  scripts/tracetool/backend/dtrace.py           |   1 -
>  scripts/tracetool/backend/ftrace.py           |   1 -
>  scripts/tracetool/backend/log.py              |   1 -
>  scripts/tracetool/backend/simple.py           |   1 -
>  scripts/tracetool/backend/syslog.py           |   1 -
>  scripts/tracetool/backend/ust.py              |   1 -
>  scripts/tracetool/format/__init__.py          |   1 -
>  scripts/tracetool/format/c.py                 |   1 -
>  scripts/tracetool/format/d.py                 |   1 -
>  scripts/tracetool/format/h.py                 |   1 -
>  scripts/tracetool/format/log_stap.py          |   1 -
>  scripts/tracetool/format/simpletrace_stap.py  |   1 -
>  scripts/tracetool/format/stap.py              |   1 -
>  scripts/tracetool/format/tcg_h.py             |   1 -
>  scripts/tracetool/format/tcg_helper_c.py      |   1 -
>  scripts/tracetool/format/tcg_helper_h.py      |   1 -
>  .../tracetool/format/tcg_helper_wrapper_h.py  |   1 -
>  scripts/tracetool/format/ust_events_c.py      |   1 -
>  scripts/tracetool/format/ust_events_h.py      |   1 -
>  scripts/tracetool/transform.py                |   1 -
>  scripts/tracetool/vcpu.py                     |   1 -
>  scripts/vmstate-static-checker.py             |   3 +-
>  tests/acceptance/avocado_qemu/__init__.py     |  59 +++++++--
>  tests/acceptance/boot_linux_console.py        | 124 +++++++++++++++++-
>  tests/acceptance/migration.py                 |  57 +++++---
>  tests/acceptance/version.py                   |   1 +
>  ...g_max_adjust.py => virtio_check_params.py} |  16 ++-
>  tests/acceptance/x86_cpu_model_versions.py    |   1 -
>  tests/docker/travis.py                        |   3 +-
>  tests/guest-debug/test-gdbstub.py             |   1 -
>  tests/migration/guestperf/engine.py           |   1 -
>  tests/migration/guestperf/plot.py             |   1 -
>  tests/migration/guestperf/shell.py            |   1 -
>  tests/qapi-schema/test-qapi.py                |   3 +-
>  tests/qemu-iotests/030                        |   2 +-
>  tests/qemu-iotests/040                        |   2 +-
>  tests/qemu-iotests/041                        |   2 +-
>  tests/qemu-iotests/044                        |   2 +-
>  tests/qemu-iotests/045                        |   2 +-
>  tests/qemu-iotests/055                        |   2 +-
>  tests/qemu-iotests/056                        |   2 +-
>  tests/qemu-iotests/057                        |   2 +-
>  tests/qemu-iotests/065                        |   2 +-
>  tests/qemu-iotests/093                        |   2 +-
>  tests/qemu-iotests/096                        |   2 +-
>  tests/qemu-iotests/118                        |   2 +-
>  tests/qemu-iotests/124                        |   2 +-
>  tests/qemu-iotests/129                        |   2 +-
>  tests/qemu-iotests/132                        |   2 +-
>  tests/qemu-iotests/136                        |   2 +-
>  tests/qemu-iotests/139                        |   2 +-
>  tests/qemu-iotests/147                        |   2 +-
>  tests/qemu-iotests/148                        |   2 +-
>  tests/qemu-iotests/149                        |   3 +-
>  tests/qemu-iotests/151                        |   2 +-
>  tests/qemu-iotests/152                        |   2 +-
>  tests/qemu-iotests/155                        |   2 +-
>  tests/qemu-iotests/163                        |   2 +-
>  tests/qemu-iotests/165                        |   3 +-
>  tests/qemu-iotests/169                        |   2 +-
>  tests/qemu-iotests/194                        |   2 +-
>  tests/qemu-iotests/196                        |   2 +-
>  tests/qemu-iotests/199                        |   2 +-
>  tests/qemu-iotests/202                        |   2 +-
>  tests/qemu-iotests/203                        |   2 +-
>  tests/qemu-iotests/205                        |   2 +-
>  tests/qemu-iotests/206                        |   2 +-
>  tests/qemu-iotests/207                        |   2 +-
>  tests/qemu-iotests/208                        |   2 +-
>  tests/qemu-iotests/209                        |   2 +-
>  tests/qemu-iotests/210                        |   2 +-
>  tests/qemu-iotests/211                        |   2 +-
>  tests/qemu-iotests/212                        |   2 +-
>  tests/qemu-iotests/213                        |   2 +-
>  tests/qemu-iotests/216                        |   2 +-
>  tests/qemu-iotests/218                        |   2 +-
>  tests/qemu-iotests/219                        |   2 +-
>  tests/qemu-iotests/222                        |   2 +-
>  tests/qemu-iotests/224                        |   2 +-
>  tests/qemu-iotests/228                        |   2 +-
>  tests/qemu-iotests/234                        |   2 +-
>  tests/qemu-iotests/235                        |   2 +-
>  tests/qemu-iotests/236                        |   2 +-
>  tests/qemu-iotests/237                        |   2 +-
>  tests/qemu-iotests/238                        |   2 +-
>  tests/qemu-iotests/242                        |   2 +-
>  tests/qemu-iotests/245                        |   2 +-
>  tests/qemu-iotests/246                        |   2 +-
>  tests/qemu-iotests/248                        |   2 +-
>  tests/qemu-iotests/254                        |   2 +-
>  tests/qemu-iotests/255                        |   2 +-
>  tests/qemu-iotests/256                        |   2 +-
>  tests/qemu-iotests/257                        |   2 +-
>  tests/qemu-iotests/258                        |   2 +-
>  tests/qemu-iotests/260                        |   2 +-
>  tests/qemu-iotests/262                        |   2 +-
>  tests/qemu-iotests/264                        |   2 +-
>  tests/qemu-iotests/266                        |   2 +-
>  tests/qemu-iotests/277                        |   2 +-
>  tests/qemu-iotests/280                        |   2 +-
>  tests/qemu-iotests/281                        |   2 +-
>  tests/qemu-iotests/check                      |   2 +-
>  tests/qemu-iotests/iotests.py                 |   1 -
>  tests/qemu-iotests/nbd-fault-injector.py      |   3 +-
>  tests/qemu-iotests/qcow2.py                   |   3 +-
>  tests/qemu-iotests/qed.py                     |   3 +-
>  tests/vm/basevm.py                            |   2 -
>  tests/vm/centos                               |   2 +-
>  tests/vm/fedora                               |   2 +-
>  tests/vm/freebsd                              |   2 +-
>  tests/vm/netbsd                               |   2 +-
>  tests/vm/openbsd                              |   2 +-
>  tests/vm/ubuntu.i386                          |   2 +-
>  146 files changed, 431 insertions(+), 233 deletions(-)
>  create mode 100644 .readthedocs.yml
>  mode change 100644 => 100755 scripts/minikconf.py
>  mode change 100644 => 100755 scripts/signrom.py
>  rename tests/acceptance/{virtio_seg_max_adjust.py => virtio_check_params.py} (90%)
>  mode change 100755 => 100644
>  mode change 100644 => 100755 tests/qemu-iotests/222
>  mode change 100644 => 100755 tests/qemu-iotests/245
>  mode change 100755 => 100644 tests/vm/basevm.py
> 
> -- 
> 2.21.1
> 

-- 
Eduardo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
                   ` (46 preceding siblings ...)
  2020-02-06 22:07 ` [PULL 00/46] Python queue 2020-02-06 Eduardo Habkost
@ 2020-02-07 11:51 ` Peter Maydell
  2020-02-07 12:39   ` Philippe Mathieu-Daudé
  2020-02-07 13:30   ` Philippe Mathieu-Daudé
  47 siblings, 2 replies; 55+ messages in thread
From: Peter Maydell @ 2020-02-07 11:51 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Cleber Rosa, QEMU Developers, Eduardo Habkost

On Thu, 6 Feb 2020 at 21:21, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Hi Peter,
>
> I prepared this series on behalf of Eduardo and
> Cleber (one of them will ack this cover).
>
> Regards,
>
> Phil.
>
> The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:
>
>   Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/philmd/qemu.git tags/python-next-20200206
>
> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
>
>   .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)

Hi; this fails 'make check' (all hosts):

  TEST    iotest-qcow2: 252
  TEST    iotest-qcow2: 256
  TEST    iotest-qcow2: 265
  TEST    iotest-qcow2: 267
  TEST    iotest-qcow2: 268
  TEST    iotest-qcow2: 283 [fail]
QEMU          --
"/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"
-nodefaults -display none -accel qtest
QEMU_IMG      --
"/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-io"
 --cache writeback --aio threads -f qcow2
QEMU_NBD      --
"/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2 (compat=1.1)
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 e104462 4.15.0-74-generic
TEST_DIR      --
/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp.oppAzNNHIY
SOCKET_SCM_HELPER --
/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/socket_scm_helper

--- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/283.out
 2020-02-06 18:59:06.291529139 +0000
+++ /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad
     2020-02-07 11:25:38.477373907 +0000
@@ -1,8 +1 @@
-{"execute": "blockdev-add", "arguments": {"driver": "null-co",
"node-name": "target"}}
-{"return": {}}
-{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
"image": {"driver": "null-co", "node-name": "base", "size": 1048576},
"node-name": "source"}}
-{"return": {}}
-{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
"image": "base", "node-name": "other", "take-child-perms": ["write"]}}
-{"return": {}}
-{"execute": "blockdev-backup", "arguments": {"device": "source",
"sync": "full", "target": "target"}}
-{"error": {"class": "GenericError", "desc": "Cannot set permissions
for backup-top filter: Conflicts with use by other as 'image', which
uses 'write' on base"}}
+./check: line 866: ./283: Permission denied
Not run: 220
Failures: 283
Failed 1 of 115 iotests
/home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
recipe for target 'check-tests/check-block.sh' failed

thanks
-- PMM


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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-07 11:51 ` Peter Maydell
@ 2020-02-07 12:39   ` Philippe Mathieu-Daudé
  2020-02-07 14:01     ` Philippe Mathieu-Daudé
  2020-02-07 13:30   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-07 12:39 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Cleber Rosa, QEMU Developers, Eduardo Habkost

On 2/7/20 12:51 PM, Peter Maydell wrote:
> On Thu, 6 Feb 2020 at 21:21, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> Hi Peter,
>>
>> I prepared this series on behalf of Eduardo and
>> Cleber (one of them will ack this cover).
>>
>> Regards,
>>
>> Phil.
>>
>> The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:
>>
>>    Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/philmd/qemu.git tags/python-next-20200206
>>
>> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
>>
>>    .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)
> 
> Hi; this fails 'make check' (all hosts):
> 
>    TEST    iotest-qcow2: 252
>    TEST    iotest-qcow2: 256
>    TEST    iotest-qcow2: 265
>    TEST    iotest-qcow2: 267
>    TEST    iotest-qcow2: 268
>    TEST    iotest-qcow2: 283 [fail]
> QEMU          --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"
> -nodefaults -display none -accel qtest
> QEMU_IMG      --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-io"
>   --cache writeback --aio threads -f qcow2
> QEMU_NBD      --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- Linux/x86_64 e104462 4.15.0-74-generic
> TEST_DIR      --
> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.oppAzNNHIY
> SOCKET_SCM_HELPER --
> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/socket_scm_helper
> 
> --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/283.out
>   2020-02-06 18:59:06.291529139 +0000
> +++ /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad
>       2020-02-07 11:25:38.477373907 +0000
> @@ -1,8 +1 @@
> -{"execute": "blockdev-add", "arguments": {"driver": "null-co",
> "node-name": "target"}}
> -{"return": {}}
> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> "image": {"driver": "null-co", "node-name": "base", "size": 1048576},
> "node-name": "source"}}
> -{"return": {}}
> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> "image": "base", "node-name": "other", "take-child-perms": ["write"]}}
> -{"return": {}}
> -{"execute": "blockdev-backup", "arguments": {"device": "source",
> "sync": "full", "target": "target"}}
> -{"error": {"class": "GenericError", "desc": "Cannot set permissions
> for backup-top filter: Conflicts with use by other as 'image', which
> uses 'write' on base"}}
> +./check: line 866: ./283: Permission denied
> Not run: 220
> Failures: 283

Interesting.
I apologize this test is not in my suite.

> Failed 1 of 115 iotests
> /home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
> recipe for target 'check-tests/check-block.sh' failed



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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-07 11:51 ` Peter Maydell
  2020-02-07 12:39   ` Philippe Mathieu-Daudé
@ 2020-02-07 13:30   ` Philippe Mathieu-Daudé
  2020-02-07 13:34     ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-07 13:30 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Cleber Rosa, QEMU Developers, Qemu-block, Eduardo Habkost

Cc'ing qemu-block@

On 2/7/20 12:51 PM, Peter Maydell wrote:
> On Thu, 6 Feb 2020 at 21:21, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> Hi Peter,
>>
>> I prepared this series on behalf of Eduardo and
>> Cleber (one of them will ack this cover).
>>
>> Regards,
>>
>> Phil.
>>
>> The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:
>>
>>    Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/philmd/qemu.git tags/python-next-20200206
>>
>> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
>>
>>    .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)
> 
> Hi; this fails 'make check' (all hosts):
> 
>    TEST    iotest-qcow2: 252
>    TEST    iotest-qcow2: 256
>    TEST    iotest-qcow2: 265
>    TEST    iotest-qcow2: 267
>    TEST    iotest-qcow2: 268
>    TEST    iotest-qcow2: 283 [fail]
> QEMU          --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"
> -nodefaults -display none -accel qtest
> QEMU_IMG      --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-io"
>   --cache writeback --aio threads -f qcow2
> QEMU_NBD      --
> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2 (compat=1.1)
> IMGPROTO      -- file
> PLATFORM      -- Linux/x86_64 e104462 4.15.0-74-generic
> TEST_DIR      --
> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmp.oppAzNNHIY
> SOCKET_SCM_HELPER --
> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/socket_scm_helper
> 
> --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/283.out
>   2020-02-06 18:59:06.291529139 +0000
> +++ /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad
>       2020-02-07 11:25:38.477373907 +0000
> @@ -1,8 +1 @@
> -{"execute": "blockdev-add", "arguments": {"driver": "null-co",
> "node-name": "target"}}
> -{"return": {}}
> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> "image": {"driver": "null-co", "node-name": "base", "size": 1048576},
> "node-name": "source"}}
> -{"return": {}}
> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> "image": "base", "node-name": "other", "take-child-perms": ["write"]}}
> -{"return": {}}
> -{"execute": "blockdev-backup", "arguments": {"device": "source",
> "sync": "full", "target": "target"}}
> -{"error": {"class": "GenericError", "desc": "Cannot set permissions
> for backup-top filter: Conflicts with use by other as 'image', which
> uses 'write' on base"}}
> +./check: line 866: ./283: Permission denied
> Not run: 220
> Failures: 283
> Failed 1 of 115 iotests
> /home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
> recipe for target 'check-tests/check-block.sh' failed

I only run out-of-tree builds.

I noticed the block tests were not run until I add this change:

-- >8 --
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -836,7 +836,7 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
  QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = 
tests/qemu-iotests/socket_scm_helper$(EXESUF)

  .PHONY: check-tests/check-block.sh
-check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
+check-tests/check-block.sh: $(SRC_PATH)/tests/check-block.sh 
qemu-img$(EXESUF) \
                 qemu-io$(EXESUF) qemu-nbd$(EXESUF) 
$(QEMU_IOTESTS_HELPERS-y) \
                 $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
         @$<
---

Peter, are you running only in-tree builds?



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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-07 13:30   ` Philippe Mathieu-Daudé
@ 2020-02-07 13:34     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-07 13:34 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Cleber Rosa, QEMU Developers, Qemu-block, Eduardo Habkost

On Fri, Feb 7, 2020 at 2:30 PM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Cc'ing qemu-block@
>
> On 2/7/20 12:51 PM, Peter Maydell wrote:
> > On Thu, 6 Feb 2020 at 21:21, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>
> >> Hi Peter,
> >>
> >> I prepared this series on behalf of Eduardo and
> >> Cleber (one of them will ack this cover).
> >>
> >> Regards,
> >>
> >> Phil.
> >>
> >> The following changes since commit 418fa86dd465b4fd8394373cf83db8fa65d7611c:
> >>
> >>    Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 18:55:06 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>    https://gitlab.com/philmd/qemu.git tags/python-next-20200206
> >>
> >> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
> >>
> >>    .readthedocs.yml: specify some minimum python requirements (2020-02-06 21:48:24 +0100)
> >
> > Hi; this fails 'make check' (all hosts):
> >
> >    TEST    iotest-qcow2: 252
> >    TEST    iotest-qcow2: 256
> >    TEST    iotest-qcow2: 265
> >    TEST    iotest-qcow2: 267
> >    TEST    iotest-qcow2: 268
> >    TEST    iotest-qcow2: 283 [fail]
> > QEMU          --
> > "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"
> > -nodefaults -display none -accel qtest
> > QEMU_IMG      --
> > "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-img"
> > QEMU_IO       --
> > "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-io"
> >   --cache writeback --aio threads -f qcow2
> > QEMU_NBD      --
> > "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-nbd"
> > IMGFMT        -- qcow2 (compat=1.1)
> > IMGPROTO      -- file
> > PLATFORM      -- Linux/x86_64 e104462 4.15.0-74-generic
> > TEST_DIR      --
> > /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/scratch
> > SOCK_DIR      -- /tmp/tmp.oppAzNNHIY
> > SOCKET_SCM_HELPER --
> > /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/socket_scm_helper
> >
> > --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/283.out
> >   2020-02-06 18:59:06.291529139 +0000
> > +++ /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad
> >       2020-02-07 11:25:38.477373907 +0000
> > @@ -1,8 +1 @@
> > -{"execute": "blockdev-add", "arguments": {"driver": "null-co",
> > "node-name": "target"}}
> > -{"return": {}}
> > -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> > "image": {"driver": "null-co", "node-name": "base", "size": 1048576},
> > "node-name": "source"}}
> > -{"return": {}}
> > -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
> > "image": "base", "node-name": "other", "take-child-perms": ["write"]}}
> > -{"return": {}}
> > -{"execute": "blockdev-backup", "arguments": {"device": "source",
> > "sync": "full", "target": "target"}}
> > -{"error": {"class": "GenericError", "desc": "Cannot set permissions
> > for backup-top filter: Conflicts with use by other as 'image', which
> > uses 'write' on base"}}
> > +./check: line 866: ./283: Permission denied
> > Not run: 220
> > Failures: 283
> > Failed 1 of 115 iotests
> > /home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
> > recipe for target 'check-tests/check-block.sh' failed
>
> I only run out-of-tree builds.
>
> I noticed the block tests were not run until I add this change:
>
> -- >8 --
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -836,7 +836,7 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
>   QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) =
> tests/qemu-iotests/socket_scm_helper$(EXESUF)
>
>   .PHONY: check-tests/check-block.sh
> -check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
> +check-tests/check-block.sh: $(SRC_PATH)/tests/check-block.sh
> qemu-img$(EXESUF) \
>                  qemu-io$(EXESUF) qemu-nbd$(EXESUF)
> $(QEMU_IOTESTS_HELPERS-y) \
>                  $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
>          @$<
> ---
>
> Peter, are you running only in-tree builds?

Oops nevermind, I was in a '--disable-tools' build directory when I
restarted testing.



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

* Re: [PULL 00/46] Python queue 2020-02-06
  2020-02-07 12:39   ` Philippe Mathieu-Daudé
@ 2020-02-07 14:01     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 55+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-07 14:01 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Cleber Rosa, QEMU Developers, Qemu-block, Eduardo Habkost

On 2/7/20 1:39 PM, Philippe Mathieu-Daudé wrote:
> On 2/7/20 12:51 PM, Peter Maydell wrote:
>> On Thu, 6 Feb 2020 at 21:21, Philippe Mathieu-Daudé 
>> <philmd@redhat.com> wrote:
>>>
>>> Hi Peter,
>>>
>>> I prepared this series on behalf of Eduardo and
>>> Cleber (one of them will ack this cover).
>>>
>>> Regards,
>>>
>>> Phil.
>>>
>>> The following changes since commit 
>>> 418fa86dd465b4fd8394373cf83db8fa65d7611c:
>>>
>>>    Merge remote-tracking branch 
>>> 'remotes/stsquad/tags/pull-testing-040220-1' into staging (2020-02-04 
>>> 18:55:06 +0000)
>>>
>>> are available in the Git repository at:
>>>
>>>    https://gitlab.com/philmd/qemu.git tags/python-next-20200206
>>>
>>> for you to fetch changes up to 3e3481a5df933a26b47f08e5913821672d28d308:
>>>
>>>    .readthedocs.yml: specify some minimum python requirements 
>>> (2020-02-06 21:48:24 +0100)
>>
>> Hi; this fails 'make check' (all hosts):
>>
>>    TEST    iotest-qcow2: 252
>>    TEST    iotest-qcow2: 256
>>    TEST    iotest-qcow2: 265
>>    TEST    iotest-qcow2: 267
>>    TEST    iotest-qcow2: 268
>>    TEST    iotest-qcow2: 283 [fail]
>> QEMU          --
>> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64" 
>>
>> -nodefaults -display none -accel qtest
>> QEMU_IMG      --
>> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-img" 
>>
>> QEMU_IO       --
>> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-io" 
>>
>>   --cache writeback --aio threads -f qcow2
>> QEMU_NBD      --
>> "/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/../../qemu-nbd" 
>>
>> IMGFMT        -- qcow2 (compat=1.1)
>> IMGPROTO      -- file
>> PLATFORM      -- Linux/x86_64 e104462 4.15.0-74-generic
>> TEST_DIR      --
>> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/scratch 
>>
>> SOCK_DIR      -- /tmp/tmp.oppAzNNHIY
>> SOCKET_SCM_HELPER --
>> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/socket_scm_helper 
>>
>>
>> --- /home/petmay01/linaro/qemu-for-merges/tests/qemu-iotests/283.out
>>   2020-02-06 18:59:06.291529139 +0000
>> +++ 
>> /home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad 
>>
>>       2020-02-07 11:25:38.477373907 +0000
>> @@ -1,8 +1 @@
>> -{"execute": "blockdev-add", "arguments": {"driver": "null-co",
>> "node-name": "target"}}
>> -{"return": {}}
>> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
>> "image": {"driver": "null-co", "node-name": "base", "size": 1048576},
>> "node-name": "source"}}
>> -{"return": {}}
>> -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug",
>> "image": "base", "node-name": "other", "take-child-perms": ["write"]}}
>> -{"return": {}}
>> -{"execute": "blockdev-backup", "arguments": {"device": "source",
>> "sync": "full", "target": "target"}}
>> -{"error": {"class": "GenericError", "desc": "Cannot set permissions
>> for backup-top filter: Conflicts with use by other as 'image', which
>> uses 'write' on base"}}
>> +./check: line 866: ./283: Permission denied
>> Not run: 220
>> Failures: 283
> 
> Interesting.
> I apologize this test is not in my suite.

Actually test 283 was merged yesterday few hours before I send this pull 
request (which is why it passed the new checkpatch test), and it doesn't 
use the Python 3 interpreter after shebang.

Once updated to Python 3, with this hunk, the test pass:

-- >8 --
--- a/tests/qemu-iotests/283
+++ b/tests/qemu-iotests/283
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
  #
  # Test for backup-top filter permission activation failure
  #
---

   ...
   TEST    iotest-qcow2: 244
   TEST    iotest-qcow2: 249
   TEST    iotest-qcow2: 251
   TEST    iotest-qcow2: 252
   TEST    iotest-qcow2: 256
   TEST    iotest-qcow2: 265
   TEST    iotest-qcow2: 267
   TEST    iotest-qcow2: 268
   TEST    iotest-qcow2: 283
Not run: 220
Passed all 115 iotests

I'll rebase and respin.

> 
>> Failed 1 of 115 iotests
>> /home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
>> recipe for target 'check-tests/check-block.sh' failed



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

end of thread, other threads:[~2020-02-07 14:03 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 21:18 [PULL 00/46] Python queue 2020-02-06 Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 01/46] python/qemu: qmp: Replace socket.error with OSError Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 02/46] python/qemu: Delint the qmp module Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 03/46] python/qemu: qmp: Make accept()'s timeout configurable Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 04/46] python/qemu: qmp: Make QEMUMonitorProtocol a context manager Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 05/46] python/qemu: qmp: Remove unnused attributes Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 06/46] python/qemu: accel: Fix kvm_available() on ppc64le Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 07/46] qemu-deprecated: Remove text about Python 2 Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 08/46] python: Treat None-return of greeting cmd Philippe Mathieu-Daudé
2020-02-06 21:18 ` [PULL 09/46] python/qemu/machine: Allow to use other serial consoles than default Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 10/46] Acceptance tests: Extract _console_interaction() Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 11/46] Acceptance tests: Add interrupt_interactive_console_until_pattern() Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 12/46] travis.yml: install rpm2cpio for acceptance tests Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 13/46] tests/boot_linux_console: add extract_from_rpm method Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 14/46] tests/boot_linux_console: use os.path for filesystem paths Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 15/46] tests/boot_linux_console: fix extract_from_deb() comment Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 16/46] tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot' Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 17/46] tests/acceptance: Add boot tests for some of the QEMU advent calendar images Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 18/46] tests: rename virtio_seg_max_adjust to virtio_check_params Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 19/46] tests/acceptance/virtio_check_params: Improve exception logging Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 20/46] tests/acceptance/virtio_check_params: List machine being tested Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 21/46] tests/acceptance/virtio_check_params: Default to -nodefaults Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 22/46] tests/acceptance/virtio_check_params: Disable the test Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 23/46] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 24/46] tests/acceptance/version: Default to -nodefaults Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 25/46] tests/acceptance/migration: Factor out assert_migration() Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 26/46] tests/acceptance/migration: Factor out do_migrate() Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 27/46] tests/acceptance/migration: Test UNIX transport when migrating Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 28/46] tests/acceptance/migration: Test EXEC " Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 29/46] tests/acceptance/migration: Add the 'migration' tag Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 30/46] tests/acceptance/migration: Default to -nodefaults Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 31/46] scripts/checkpatch.pl: Only allow Python 3 interpreter Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 32/46] tests/qemu-iotests/check: Allow use of python3 interpreter Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 33/46] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 34/46] tests: Explicit usage of Python 3 Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 35/46] scripts: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
2020-02-06 21:19   ` Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 36/46] scripts/minikconf: Explicit usage of Python 3 Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 37/46] scripts/tracetool: Remove shebang header Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 38/46] tests/acceptance: " Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 39/46] tests/vm: " Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 40/46] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__) Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 41/46] scripts: Explicit usage of Python 3 " Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 42/46] tests/qemu-iotests/check: Only check for Python 3 interpreter Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 43/46] scripts/signrom: remove Python 2 support, add shebang Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 44/46] make all Python scripts executable Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 45/46] drop "from __future__ import print_function" Philippe Mathieu-Daudé
2020-02-06 21:19   ` Philippe Mathieu-Daudé
2020-02-06 21:19 ` [PULL 46/46] .readthedocs.yml: specify some minimum python requirements Philippe Mathieu-Daudé
2020-02-06 22:07 ` [PULL 00/46] Python queue 2020-02-06 Eduardo Habkost
2020-02-07 11:51 ` Peter Maydell
2020-02-07 12:39   ` Philippe Mathieu-Daudé
2020-02-07 14:01     ` Philippe Mathieu-Daudé
2020-02-07 13:30   ` Philippe Mathieu-Daudé
2020-02-07 13:34     ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.