Python queue 2020-02-06
Subsystems (2)
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.pySignature · 1 line
2.21.1
[PULL 01/46] python/qemu: qmp: Replace socket.error with OSError
From: Wainer dos Santos Moschetta <[email protected]>
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.
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
python/qemu/qmp.py +8 -8
@@ -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
Signature · 1 line
2.21.1
[PULL 02/46] python/qemu: Delint the qmp module
In reply to Philippe Mathieu-DaudéFrom: Wainer dos Santos Moschetta <[email protected]>
This clean up the pylint-3 report on qmp:
************* Module qemu.qmppython/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)
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 51 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-)
python/qemu/qmp.py +41 -10
@@ -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
Signature · 1 line
2.21.1
[PULL 06/46] python/qemu: accel: Fix kvm_available() on ppc64le
In reply to Philippe Mathieu-DaudéFrom: Wainer dos Santos Moschetta <[email protected]>
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.
Message-Id: <[email protected]>
--- python/qemu/accel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
python/qemu/accel.py +2 -1
@@ -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):
Signature · 1 line
2.21.1
[PULL 35/46] scripts: Explicit usage of Python 3 (scripts with __main__)
In reply to 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__')Message-Id: <[email protected]>
--- 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(-)
scripts/analyse-locks-simpletrace.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Analyse lock events and compute statistics
scripts/decodetree.py +1 -1
@@ -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
scripts/device-crash-test +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (c) 2017 Red Hat Inc #
scripts/kvm/kvm_flightrecorder +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # KVM Flight Recorder - ring buffer tracing script #
scripts/qapi-gen.py +1 -1
@@ -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.
scripts/qmp/qemu-ga-client +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # QEMU Guest Agent Client #
scripts/qmp/qmp +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # QMP command line tool #
scripts/qmp/qmp-shell +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Low-level QEMU shell on top of QMP. #
scripts/qmp/qom-fuse +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools #
scripts/render_block_graph.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Render Qemu Block Graph #
scripts/replay-dump.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Dump the contents of a recorded execution stream
scripts/simpletrace.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Pretty-printer for simple trace backend binary trace files #
scripts/tracetool.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """
scripts/vmstate-static-checker.py +1 -1
@@ -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.
Signature · 1 line
2.21.1
[PULL 07/46] qemu-deprecated: Remove text about Python 2
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Python 2 support has been removed, so we should now also remove the announcement text for the deprecation.
Reviewed by: Aleksandar Markovic <[email protected]>
Message-Id: <[email protected]>
--- qemu-deprecated.texi | 8 -------- 1 file changed, 8 deletions(-)
qemu-deprecated.texi +0 -8
@@ -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)
Signature · 1 line
2.21.1
[PULL 04/46] python/qemu: qmp: Make QEMUMonitorProtocol a context manager
In reply to Philippe Mathieu-DaudéFrom: Wainer dos Santos Moschetta <[email protected]>
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')
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
python/qemu/qmp.py +13 -2
@@ -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): """
Signature · 1 line
2.21.1
[PULL 45/46] drop "from __future__ import print_function"
In reply to Philippe Mathieu-DaudéFrom: Paolo Bonzini <[email protected]>
This is only needed for Python 2, which we do not support anymore.
Message-Id: <[email protected]>
--- 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(-)
scripts/analyse-9p-simpletrace.py +0 -1
@@ -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
scripts/analyse-locks-simpletrace.py +0 -1
@@ -6,7 +6,6 @@ # Author: Alex Bennée <[email protected]> # -from __future__ import print_function import simpletrace import argparse import numpy as np
scripts/device-crash-test +0 -1
@@ -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
scripts/dump-guest-memory.py +0 -1
@@ -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
scripts/kvm/kvm_flightrecorder +0 -1
@@ -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
scripts/kvm/vmxcap +0 -1
@@ -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
scripts/minikconf.py +0 -1
@@ -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
scripts/modules/module_block.py +0 -1
@@ -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
scripts/qapi-gen.py +0 -1
@@ -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
scripts/qapi/doc.py +0 -1
@@ -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
scripts/qmp/qemu-ga-client +0 -1
@@ -36,7 +36,6 @@ # See also: https://wiki.qemu.org/Features/QAPI/GuestAgent # -from __future__ import print_function import os import sys import base64
scripts/qmp/qmp +0 -1
@@ -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
scripts/qmp/qmp-shell +0 -1
@@ -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
scripts/qmp/qom-get +0 -1
@@ -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
scripts/qmp/qom-list +0 -1
@@ -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
scripts/qmp/qom-set +0 -1
@@ -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
scripts/qmp/qom-tree +0 -1
@@ -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
scripts/replay-dump.py +0 -1
@@ -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
scripts/signrom.py +0 -1
@@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function # # Option ROM signing utility #
scripts/simpletrace.py +0 -1
@@ -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
scripts/vmstate-static-checker.py +0 -1
@@ -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
tests/docker/travis.py +0 -1
@@ -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
tests/guest-debug/test-gdbstub.py +0 -1
@@ -1,4 +1,3 @@ -from __future__ import print_function # # This script needs to be run on startup # qemu -kernel ${KERNEL} -s -S
tests/migration/guestperf/engine.py +0 -1
@@ -1,4 +1,3 @@ -from __future__ import print_function # # Migration test main engine #
tests/migration/guestperf/plot.py +0 -1
@@ -1,4 +1,3 @@ -from __future__ import print_function # # Migration test graph plotting #
tests/migration/guestperf/shell.py +0 -1
@@ -1,4 +1,3 @@ -from __future__ import print_function # # Migration test command line shell integration #
tests/qapi-schema/test-qapi.py +0 -1
@@ -11,7 +11,6 @@ # See the COPYING file in the top-level directory. # -from __future__ import print_function import argparse import difflib
tests/qemu-iotests/149 +0 -1
@@ -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
tests/qemu-iotests/165 +0 -1
@@ -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
tests/qemu-iotests/iotests.py +0 -1
@@ -1,4 +1,3 @@ -from __future__ import print_function # Common utilities and Python wrappers for qemu-iotests # # Copyright (C) 2012 IBM Corp.
tests/qemu-iotests/nbd-fault-injector.py +0 -1
@@ -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
tests/qemu-iotests/qcow2.py +0 -1
@@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function import sys import struct import string
tests/qemu-iotests/qed.py +0 -1
@@ -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
tests/vm/basevm.py +0 -1
@@ -11,7 +11,6 @@ # the COPYING file in the top-level directory. # -from __future__ import print_function import os import re import sys
Signature · 1 line
2.21.1
[PULL 03/46] python/qemu: qmp: Make accept()'s timeout configurable
In reply to Philippe Mathieu-DaudéFrom: Wainer dos Santos Moschetta <[email protected]>
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.
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
python/qemu/qmp.py +9 -2
@@ -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()
Signature · 1 line
2.21.1
[PULL 13/46] tests/boot_linux_console: add extract_from_rpm method
In reply to Philippe Mathieu-DaudéFrom: Liam Merwick <[email protected]>
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.
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
tests/acceptance/boot_linux_console.py +16 -0
@@ -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
Signature · 1 line
2.21.1
[PULL 14/46] tests/boot_linux_console: use os.path for filesystem paths
In reply to Philippe Mathieu-DaudéFrom: Liam Merwick <[email protected]>
Change extract_from_deb() to use os.path routines to manipulate the filesystem path returned when extracting a file.
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tests/acceptance/boot_linux_console.py +6 -1
@@ -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): """
Signature · 1 line
2.21.1
[PULL 05/46] python/qemu: qmp: Remove unnused attributes
In reply to Philippe Mathieu-DaudéFrom: Wainer dos Santos Moschetta <[email protected]>
The error and timeout attributes in QEMUMonitorProtocol are not used, so this delete them.
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 4 ---- 1 file changed, 4 deletions(-)
python/qemu/qmp.py +0 -4
@@ -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): """
Signature · 1 line
2.21.1
[PULL 08/46] python: Treat None-return of greeting cmd
In reply to Philippe Mathieu-DaudéFrom: Lukáš Doktor <[email protected]>
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.
Message-Id: <[email protected]>
--- python/qemu/qmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
python/qemu/qmp.py +1 -1
@@ -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
Signature · 1 line
2.21.1
[PULL 24/46] tests/acceptance/version: Default to -nodefaults
In reply to Philippe Mathieu-Daudé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
Message-Id: <[email protected]>
--- tests/acceptance/version.py | 1 + 1 file changed, 1 insertion(+)
tests/acceptance/version.py +1 -0
@@ -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')
Signature · 1 line
2.21.1
[PULL 10/46] Acceptance tests: Extract _console_interaction()
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daudé <[email protected]>
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.
Message-Id: <[email protected]>
--- tests/acceptance/avocado_qemu/__init__.py | 31 +++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-)
tests/acceptance/avocado_qemu/__init__.py +17 -14
@@ -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):
Signature · 1 line
2.21.1
[PULL 09/46] python/qemu/machine: Allow to use other serial consoles than default
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daudé <[email protected]>
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.
Message-Id: <[email protected]>
--- python/qemu/machine.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
python/qemu/machine.py +9 -1
@@ -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):
Signature · 1 line
2.21.1
[PULL 16/46] tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot'
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daudé <[email protected]>
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
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 1 + 1 file changed, 1 insertion(+)
tests/acceptance/boot_linux_console.py +1 -0
@@ -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/'
Signature · 1 line
2.21.1
[PULL 27/46] tests/acceptance/migration: Test UNIX transport when migrating
In reply to Philippe Mathieu-DaudéFrom: Oksana Vohchana <[email protected]>
Along with VM migration via TCP, we can use migration through the UNIX transport protocol
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 6 ++++++ 1 file changed, 6 insertions(+)
tests/acceptance/migration.py +6 -0
@@ -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)
Signature · 1 line
2.21.1
[PULL 11/46] Acceptance tests: Add interrupt_interactive_console_until_pattern()
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daudé <[email protected]>
We need a function to interrupt interactive consoles.
Example: Interrupt U-Boot to set different environment values.
Message-Id: <[email protected]>
--- tests/acceptance/avocado_qemu/__init__.py | 32 +++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-)
tests/acceptance/avocado_qemu/__init__.py +30 -2
@@ -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
Signature · 1 line
2.21.1
[PULL 12/46] travis.yml: install rpm2cpio for acceptance tests
In reply to Philippe Mathieu-DaudéFrom: Liam Merwick <[email protected]>
The extract_from_rpm() method added for the PVH acceptance tests needs rpm2cpio to extract a vmlinux binary from an RPM.
Message-Id: <[email protected]>
--- .travis.yml | 1 + 1 file changed, 1 insertion(+)
.travis.yml +1 -0
@@ -323,6 +323,7 @@ matrix: - python3-pil - python3-pip - python3.5-venv + - rpm2cpio - tesseract-ocr - tesseract-ocr-eng
Signature · 1 line
2.21.1
[PULL 30/46] tests/acceptance/migration: Default to -nodefaults
In reply to Philippe Mathieu-Daudé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
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/acceptance/migration.py +3 -1
@@ -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)
Signature · 1 line
2.21.1
[PULL 23/46] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine
In reply to Philippe Mathieu-Daudé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
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/acceptance/boot_linux_console.py +1 -1
@@ -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()
Signature · 1 line
2.21.1
[PULL 21/46] tests/acceptance/virtio_check_params: Default to -nodefaults
In reply to Philippe Mathieu-Daudé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'
Message-Id: <[email protected]>
--- tests/acceptance/virtio_check_params.py | 1 + 1 file changed, 1 insertion(+)
tests/acceptance/virtio_check_params.py +1 -0
@@ -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:
Signature · 1 line
2.21.1
[PULL 15/46] tests/boot_linux_console: fix extract_from_deb() comment
In reply to Philippe Mathieu-DaudéFrom: Liam Merwick <[email protected]>
The second param in extract_from_deb() is 'path' not 'file'
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/acceptance/boot_linux_console.py +1 -1
@@ -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()
Signature · 1 line
2.21.1
[PULL 31/46] scripts/checkpatch.pl: Only allow Python 3 interpreter
In reply to Philippe Mathieu-Daudé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/
Message-Id: <[email protected]>
--- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+)
scripts/checkpatch.pl +6 -0
@@ -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;
Signature · 1 line
2.21.1
[PULL 22/46] tests/acceptance/virtio_check_params: Disable the test
In reply to Philippe Mathieu-Daudé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.
Message-Id: <[email protected]>
--- tests/acceptance/virtio_check_params.py | 2 ++ 1 file changed, 2 insertions(+)
tests/acceptance/virtio_check_params.py +2 -0
@@ -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:
Signature · 1 line
2.21.1
[PULL 20/46] tests/acceptance/virtio_check_params: List machine being tested
In reply to Philippe Mathieu-Daudé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'}
...Message-Id: <[email protected]>
--- tests/acceptance/virtio_check_params.py | 4 ++++ 1 file changed, 4 insertions(+)
tests/acceptance/virtio_check_params.py +4 -0
@@ -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]:
Signature · 1 line
2.21.1
[PULL 18/46] tests: rename virtio_seg_max_adjust to virtio_check_params
In reply to Philippe Mathieu-DaudéFrom: Denis Plotnikov <[email protected]>
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.
Message-Id: <[email protected]>
---
.../{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%)tests/acceptance/virtio_check_params.py renamed from tests/acceptance/virtio_seg_max_adjust.py +0 -0
Signature · 1 line
2.21.1
[PULL 32/46] tests/qemu-iotests/check: Allow use of python3 interpreter
In reply to Philippe Mathieu-DaudéAs we want to enforce a unique and explicit Python 3 interpreter, we need let this script handle 'python3' too.
Message-Id: <[email protected]>
--- tests/qemu-iotests/check | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/qemu-iotests/check +2 -1
@@ -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
Signature · 1 line
2.21.1
[PULL 19/46] tests/acceptance/virtio_check_params: Improve exception logging
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- tests/acceptance/virtio_check_params.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tests/acceptance/virtio_check_params.py +6 -2
@@ -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))
Signature · 1 line
2.21.1
[PULL 17/46] tests/acceptance: Add boot tests for some of the QEMU advent calendar images
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
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.
Message-Id: <[email protected]>
--- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 96 ++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-)
.travis.yml +1 -1
@@ -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
tests/acceptance/boot_linux_console.py +96 -0
99 lines not on this page · raw message
Signature · 1 line
2.21.1
[PULL 34/46] tests: Explicit usage of Python 3
In reply to 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__')Message-Id: <[email protected]>
--- 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(-)
tests/docker/travis.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Travis YAML config parser #
tests/qapi-schema/test-qapi.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # QAPI parser test harness #
tests/vm/centos +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # CentOS image #
tests/vm/fedora +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Fedora VM image #
tests/vm/freebsd +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # FreeBSD VM image #
tests/vm/netbsd +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # NetBSD VM image #
tests/vm/openbsd +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # OpenBSD VM image #
tests/vm/ubuntu.i386 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Ubuntu i386 image #
Signature · 1 line
2.21.1
[PULL 39/46] tests/vm: Remove shebang header
In reply to 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__')Message-Id: <[email protected]>
--- tests/vm/basevm.py | 1 - 1 file changed, 1 deletion(-) mode change 100755 => 100644 tests/vm/basevm.py
tests/vm/basevm.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # # VM testing base class #
Signature · 1 line
2.21.1
[PULL 25/46] tests/acceptance/migration: Factor out assert_migration()
In reply to Philippe Mathieu-DaudéFrom: Oksana Vohchana <[email protected]>
We are going to reuse this code when testing different transport methods, so factor it out first
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
tests/acceptance/migration.py +11 -10
@@ -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)
Signature · 1 line
2.21.1
[PULL 26/46] tests/acceptance/migration: Factor out do_migrate()
In reply to Philippe Mathieu-DaudéFrom: Oksana Vohchana <[email protected]>
We are going to reuse this code when testing different transport methods, so factor it out first.
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
tests/acceptance/migration.py +11 -6
@@ -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)
Signature · 1 line
2.21.1
[PULL 36/46] scripts/minikconf: Explicit usage of Python 3
In reply to 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'Message-Id: <[email protected]>
--- scripts/minikconf.py | 1 + 1 file changed, 1 insertion(+)
scripts/minikconf.py +1 -0
@@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # # Mini-Kconfig parser #
Signature · 1 line
2.21.1
[PULL 29/46] tests/acceptance/migration: Add the 'migration' tag
In reply to Philippe Mathieu-Daudé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
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 3 +++ 1 file changed, 3 insertions(+)
tests/acceptance/migration.py +3 -0
@@ -20,6 +20,9 @@ from avocado.utils.path import find_command class Migration(Test): + """ + :avocado: tags=migration + """ timeout = 10
Signature · 1 line
2.21.1
[PULL 28/46] tests/acceptance/migration: Test EXEC transport when migrating
In reply to Philippe Mathieu-DaudéFrom: Oksana Vohchana <[email protected]>
Along with VM migration via TCP, we can use migration through the EXEC transport protocol
Message-Id: <[email protected]>
--- tests/acceptance/migration.py | 10 ++++++++++ 1 file changed, 10 insertions(+)
tests/acceptance/migration.py +10 -0
@@ -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
Signature · 1 line
2.21.1
[PULL 33/46] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)
In reply to 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__')Message-Id: <[email protected]>
--- 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(-)
tests/qemu-iotests/030 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for image streaming. #
tests/qemu-iotests/040 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for image block commit. #
tests/qemu-iotests/041 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for image mirroring. #
tests/qemu-iotests/044 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests growing a large refcount table. #
tests/qemu-iotests/045 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for fdsets and getfd. #
tests/qemu-iotests/055 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for drive-backup and blockdev-backup #
tests/qemu-iotests/056 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for drive-backup #
tests/qemu-iotests/057 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for internal snapshot. #
tests/qemu-iotests/065 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test for additional information emitted by qemu-img info on qcow2 # images
tests/qemu-iotests/093 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for IO throttling #
tests/qemu-iotests/096 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test that snapshots move the throttling configuration to the active # layer
tests/qemu-iotests/118 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test case for the QMP 'change' command and all other associated # commands
tests/qemu-iotests/124 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for incremental drive-backup #
tests/qemu-iotests/129 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests that "bdrv_drain_all" doesn't drain block jobs #
tests/qemu-iotests/132 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test mirror with unmap #
tests/qemu-iotests/136 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for block device statistics #
tests/qemu-iotests/139 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test cases for the QMP 'blockdev-del' command #
tests/qemu-iotests/147 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test case for NBD's blockdev-add interface #
tests/qemu-iotests/148 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test the rate limit of QMP events #
tests/qemu-iotests/151 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for active mirroring #
tests/qemu-iotests/152 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for drive-mirror with source size unaligned to granularity #
tests/qemu-iotests/155 +1 -1
@@ -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
tests/qemu-iotests/163 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for shrinking images #
tests/qemu-iotests/165 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for persistent dirty bitmaps. #
tests/qemu-iotests/169 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for dirty bitmaps migration. #
tests/qemu-iotests/196 +1 -1
@@ -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.
tests/qemu-iotests/199 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for dirty bitmaps postcopy migration. #
tests/qemu-iotests/205 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for qmp command nbd-server-remove. #
tests/qemu-iotests/245 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test cases for the QMP 'x-blockdev-reopen' command #
tests/qemu-iotests/257 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test bitmap-sync backups (incremental, differential, and partials) #
tests/qemu-iotests/258 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Very specific tests for adjacent commit/stream block jobs #
tests/qemu-iotests/281 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test cases for blockdev + IOThread interactions #
tests/qemu-iotests/nbd-fault-injector.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # NBD server - fault injection utility # # Configuration file syntax:
tests/qemu-iotests/qcow2.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import sys
tests/qemu-iotests/qed.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tool to manipulate QED image files #
Signature · 1 line
2.21.1
[PULL 37/46] scripts/tracetool: Remove shebang header
In reply to 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__')Message-Id: <[email protected]>
--- 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(-)
scripts/tracetool/__init__.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/__init__.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/dtrace.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/ftrace.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/log.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/simple.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/syslog.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/backend/ust.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/__init__.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/c.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/d.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/h.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/log_stap.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/simpletrace_stap.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/stap.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/tcg_h.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/tcg_helper_c.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/tcg_helper_h.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/tcg_helper_wrapper_h.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/ust_events_c.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/format/ust_events_h.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/transform.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
scripts/tracetool/vcpu.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """
Signature · 1 line
2.21.1
[PULL 40/46] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)
In reply to 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__')Message-Id: <[email protected]>
--- 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(-)
tests/qemu-iotests/149 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2016 Red Hat, Inc. #
tests/qemu-iotests/194 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2017 Red Hat, Inc. #
tests/qemu-iotests/202 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2017 Red Hat, Inc. #
tests/qemu-iotests/203 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2017 Red Hat, Inc. #
tests/qemu-iotests/206 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test qcow2 and file image creation #
tests/qemu-iotests/207 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test ssh image creation #
tests/qemu-iotests/208 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2018 Red Hat, Inc. #
tests/qemu-iotests/209 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for NBD BLOCK_STATUS extension #
tests/qemu-iotests/210 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test luks and file image creation #
tests/qemu-iotests/211 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test VDI and file image creation #
tests/qemu-iotests/212 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test parallels and file image creation #
tests/qemu-iotests/213 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test vhdx and file image creation #
tests/qemu-iotests/216 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copy-on-read tests using a COR filter node #
tests/qemu-iotests/218 +1 -1
@@ -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.
tests/qemu-iotests/219 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2018 Red Hat, Inc. #
tests/qemu-iotests/222 +1 -1
@@ -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.
tests/qemu-iotests/224 +1 -1
@@ -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)
tests/qemu-iotests/228 +1 -1
@@ -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
tests/qemu-iotests/234 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2018 Red Hat, Inc. #
tests/qemu-iotests/235 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Simple mirror test #
tests/qemu-iotests/236 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test bitmap merges. #
tests/qemu-iotests/237 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test vmdk and file image creation #
tests/qemu-iotests/238 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Regression test for throttle group member unregister segfault with iothread #
tests/qemu-iotests/242 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test for qcow2 bitmap printed information #
tests/qemu-iotests/246 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test persistent bitmap resizing. #
tests/qemu-iotests/248 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test resume mirror after auto pause on ENOSPC #
tests/qemu-iotests/254 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test external snapshot with bitmap copying and moving. #
tests/qemu-iotests/255 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test commit job graph modifications while requests are active #
tests/qemu-iotests/256 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test incremental/backup across iothread contexts #
tests/qemu-iotests/260 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Tests for temporary external snapshot when we have bitmaps. #
tests/qemu-iotests/262 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2019 Red Hat, Inc. #
tests/qemu-iotests/264 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test nbd reconnect #
tests/qemu-iotests/266 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test VPC and file image creation #
tests/qemu-iotests/277 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Test NBD client reconnection #
tests/qemu-iotests/280 +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2019 Red Hat, Inc. #
Signature · 1 line
2.21.1
[PULL 38/46] tests/acceptance: Remove shebang header
In reply to 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__')Message-Id: <[email protected]>
--- 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
tests/acceptance/virtio_check_params.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Test virtio-scsi and virtio-blk queue settings for all machine types #
tests/acceptance/x86_cpu_model_versions.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Basic validation of x86 versioned CPU models and CPU model aliases #
Signature · 1 line
2.21.1
[PULL 41/46] scripts: Explicit usage of Python 3 (scripts without __main__)
In reply to 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__')Message-Id: <[email protected]>
--- scripts/analyse-9p-simpletrace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/analyse-9p-simpletrace.py +1 -1
@@ -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> #
Signature · 1 line
2.21.1
[PULL 43/46] scripts/signrom: remove Python 2 support, add shebang
In reply to Philippe Mathieu-DaudéFrom: Paolo Bonzini <[email protected]>
Message-Id: <[email protected]>
--- scripts/signrom.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
scripts/signrom.py +3 -7
@@ -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()
Signature · 1 line
2.21.1
[PULL 42/46] tests/qemu-iotests/check: Only check for Python 3 interpreter
In reply to Philippe Mathieu-DaudéAll the iotests Python scripts have been converted to search for the Python 3 interpreter. Update the ./check script accordingly.
Message-Id: <[email protected]>
--- tests/qemu-iotests/check | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tests/qemu-iotests/check +1 -2
@@ -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
Signature · 1 line
2.21.1
[PULL 46/46] .readthedocs.yml: specify some minimum python requirements
In reply to Philippe Mathieu-DaudéFrom: Alex Bennée <[email protected]>
QEMU is all about the Python 3 now so lets also hint that to ReadTheDocs in its config file.
Message-Id: <[email protected]>
--- .readthedocs.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .readthedocs.yml
.readthedocs.yml new file +20 -0
@@ -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
Signature · 1 line
2.21.1
[PULL 44/46] make all Python scripts executable
In reply to Philippe Mathieu-DaudéFrom: Paolo Bonzini <[email protected]>
Scripts that have a Python shebang are meant to be executed directly from the shell; give them 755 permissions.
Message-Id: <[email protected]>
--- 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
scripts/minikconf.py +0 -0
scripts/signrom.py +0 -0
tests/qemu-iotests/222 +0 -0
tests/qemu-iotests/245 +0 -0
Signature · 1 line
2.21.1
Eduardo Habkost
Acked-byQuoted 4 lines · Philippe Mathieu-Daudé
Hi Peter,
I prepared this series on behalf of Eduardo and
Cleber (one of them will ack this cover).
Quoted 260 lines
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.plnow allows Python 3 interpreter (Philippe) . Explicit usage of Python 3 interpreter in scripts (Philippe) . Fix Python scripts permissions (Paolo, Philippe)
. Drop 'from__future__importprint_function' (Paolo)
. Specify minimum python requirements in ReadTheDocs configuration (Alex)
- Test UNIX/EXEC transports with migration (Oksana)
- Addedextract_from_rpmhelper, improvedextract_from_deb(Liam)
- Allow to use other serial consoles than default one (Philippe)
- Various improvements in QEMUMonitorProtocol (Wainer)
- Fixkvm_available()on ppc64le (Wainer)----------------------------------------------------------------
Alex Bennée (1):
.readthedocs.yml: specify some minimum python requirementsDenis Plotnikov (1):
tests: renamevirtio_seg_max_adjusttovirtio_check_paramsLiam Merwick (4):
travis.yml: install rpm2cpio for acceptance tests tests/boot_linux_console: addextract_from_rpmmethod tests/boot_linux_console: use os.path for filesystem paths tests/boot_linux_console: fixextract_from_deb()commentLukáš Doktor (1):
python: Treat None-return of greeting cmdOksana Vohchana (4):
tests/acceptance/migration: Factor outassert_migration()tests/acceptance/migration: Factor outdo_migrate()tests/acceptance/migration: Test UNIX transport when migrating tests/acceptance/migration: Test EXEC transport when migratingPaolo Bonzini (3):
scripts/signrom: remove Python 2 support, add shebang make all Python scripts executable
drop "from__future__importprint_function"Philippe Mathieu-Daudé (24):
python/qemu/machine: Allow to use other serial consoles than default Acceptance tests: Extract_console_interaction()Acceptance tests: Addinterrupt_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 -nodefaultsscripts/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 3scripts/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 interpreterThomas Huth (2):
qemu-deprecated: Remove text about Python 2 tests/acceptance: Add boot tests for some of the QEMU advent calendar
imagesWainer 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: Fixkvm_available()on ppc64leqemu-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.pySignature · 1 line
2.21.1
Signature · 1 line
Eduardo
Quoted 14 lines · Philippe Mathieu-Daudé
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)
Quoted 7 lines
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 qtestQEMU_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 qcow2QEMU_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/scratchSOCK_DIR -- /tmp/tmp.oppAzNNHIYSOCKET_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
Quoted 66 lines · Peter Maydell
Quoted 14 lines · Philippe Mathieu-Daudé
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)Quoted 7 lines
are available in the Git repository at:
https://gitlab.com/philmd/qemu.git tags/python-next-20200206for 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 qtestQEMU_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 qcow2QEMU_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/scratchSOCK_DIR--/tmp/tmp.oppAzNNHIYSOCKET_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.out2020-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(quoted diff) +0
-3@@ -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"}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug","image": "base", "node-name": "other", "take-child-perms": ["write"]}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-backup", "arguments": {"device": "source",
Quoted 7 lines
"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.
Quoted 3 lines
Failed 1 of 115 iotests
/home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
recipe for target 'check-tests/check-block.sh' failed
Quoted 77 lines · Philippe Mathieu-Daudé
Quoted 76 lines · Peter Maydell
Quoted 14 lines · Philippe Mathieu-Daudé
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)
Quoted 7 lines
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/scratchSOCK_DIR --
/tmp/tmp.oppAzNNHIYSOCKET_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.out2020-02-06 18:59:06.291529139 +0000+++
/home/petmay01/linaro/qemu-for-merges/build/all/tests/qemu-iotests/283.out.bad2020-02-07 11:25:38.477373907 +0000(quoted diff) +0
-3@@ -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"}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug","image": "base", "node-name": "other", "take-child-perms": ["write"]}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-backup", "arguments": {"device": "source","sync": "full", "target": "target"}}
-{"error": {"class": "GenericError", "desc": "Cannot set permissions
Quoted 8 lines
Quoted 5 lines
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: 283Interesting.
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 --
tests/qemu-iotests/283 +1 -1
@@ -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.
Quoted 4 lines
Quoted 4 lines
Failed 1 of 115 iotests
/home/petmay01/linaro/qemu-for-merges/tests/Makefile.include:842:
recipe for target 'check-tests/check-block.sh' failed
Cc'ing qemu-block@
Quoted 68 lines · Peter Maydell
Quoted 14 lines · Philippe Mathieu-Daudé
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)Quoted 7 lines
are available in the Git repository at:
https://gitlab.com/philmd/qemu.git tags/python-next-20200206for 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 qtestQEMU_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 qcow2QEMU_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/scratchSOCK_DIR--/tmp/tmp.oppAzNNHIYSOCKET_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.out2020-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(quoted diff) +0
-3@@ -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"}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug","image": "base", "node-name": "other", "take-child-perms": ["write"]}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-backup", "arguments": {"device": "source","sync": "full", "target": "target"}}
-{"error": {"class": "GenericError", "desc": "Cannot set permissions
Quoted 8 lines
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 --
tests/Makefile.include +0 -0
@@ -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?
Quoted 100 lines · Philippe Mathieu-Daudé
Cc'ing qemu-block@
Quoted 68 lines · Peter Maydell
Quoted 14 lines · Philippe Mathieu-Daudé
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)Quoted 7 lines
are available in the Git repository at:
https://gitlab.com/philmd/qemu.git tags/python-next-20200206for 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 qtestQEMU_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 qcow2QEMU_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/scratchSOCK_DIR--/tmp/tmp.oppAzNNHIYSOCKET_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.out2020-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(quoted diff) +0
-3@@ -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"}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-add", "arguments": {"driver": "blkdebug","image": "base", "node-name": "other", "take-child-perms": ["write"]}}
(quoted diff) +0
-2-{"return": {}} -{"execute": "blockdev-backup", "arguments": {"device": "source","sync": "full", "target": "target"}}
-{"error": {"class": "GenericError", "desc": "Cannot set permissionsQuoted 8 lines
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' failedI only run out-of-tree builds.
I noticed the block tests were not run until I add this change:
-- >8 --
tests/Makefile.include +1
-1@@ -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))) @$<
Quoted 3 lines
---
Peter, are you running only in-tree builds?
Oops nevermind, I was in a '--disable-tools' build directory when I restarted testing.