Python queue, 2018-10-30

* Makefile rule for running acceptance tests
   (make check-acceptance) (Cleber Rosa)
 * Make iotests compatible with Python 3
   (Max Reitz)
 * device-crash-test whitelist update (Thomas Huth)
 * Misc cleanups (Cleber Rosa)
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJb2Pc3AAoJECgHk2+YTcWmYjYP/1Er0DbXtYnfAAfwDg9aV+eu
 RJp8ckvhFlO2JHKBpUzfKk6lASM99LJ+yGuAyDnXvTjRH7w2sCliVw3EusISTEA4
 j7htJdtzDoiOB1uaIW05URkPrCvJO5SBcG4TuKYPNSXoCAxD7XONsKRX705CRQN7
 QVQEBD5psZN1MQLWWECpuEvTJVY9IRAKrzMpKpdtWgg4p22M1pm5rsPEEd0NAkgS
 K11Ov72UbqhjvioTNpvT/KrDMJ50HlRxBPqS/kBCdQKR7IPEEVLao77ZyIueTKyQ
 J89pdG+JgIzD3QC+rEn/BKcAHeE/bUcimNcx/Ks4vfiH/PFkQFTKfXF2g3FCGgop
 MKuDWSlhf0mVoRrowIbKZN12Hk/ofDiTSHD/W42aCm/Ul02uu12IsvL4LAzZXfBE
 aWrjIjWxZe/5cIWWztCbUgI2dD/Z98fAJbv5oVRCFfrIQruTLJ5NK0taztuLM/3L
 ssrYpHVkVo1LWk/wco+JN3QHC5i4+s1D9C35I4a+LQGG9h83joZ/4LySD+kV1cJC
 ZLMktzb9djiHE2OFfqW4J6f92XBnL+AmiJiT+3p7F6yjnA27NiXsWpEpcjSQQP5x
 x2G9XsERY5bS4O5OjZmrR1RGwa7bBOf8+iBlUBI81+bFVUso6ooREZonFXvRVvEd
 2eg8pLgOpGNi7t+3Rw6I
 =luJ2
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging

Python queue, 2018-10-30

* Makefile rule for running acceptance tests
  (make check-acceptance) (Cleber Rosa)
* Make iotests compatible with Python 3
  (Max Reitz)
* device-crash-test whitelist update (Thomas Huth)
* Misc cleanups (Cleber Rosa)

# gpg: Signature made Wed 31 Oct 2018 00:28:39 GMT
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/python-next-pull-request:
  scripts/qemu.py: use a more consistent docstring style
  scripts/decodetree.py: fix reference to attributes
  Travis support for the acceptance tests
  Acceptance tests: add make rule for running them
  Bootstrap Python venv for tests
  iotests: Unify log outputs between Python 2 and 3
  iotests: Modify imports for Python 3
  iotests: 'new' module replacement in 169
  iotests: Explicitly bequeath FDs in Python
  iotests: Different iterator behavior in Python 3
  iotests: Use // for Python integer division
  iotests: Use Python byte strings where appropriate
  iotests: Flush in iotests.py's QemuIoInteractive
  iotests: Make nbd-fault-injector flush
  scripts/device-crash-test: Remove devices that are not user_creatable anymore

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2018-11-01 13:24:51 +00:00
commit 8ebf8ea90e
44 changed files with 1009 additions and 863 deletions

View File

@ -117,6 +117,14 @@ matrix:
- env: CONFIG="--target-list=x86_64-softmmu" - env: CONFIG="--target-list=x86_64-softmmu"
python: python:
- "3.6" - "3.6"
# Acceptance (Functional) tests
- env: CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu"
TEST_CMD="make AVOCADO_SHOW=app check-acceptance"
addons:
apt:
packages:
- python3-pip
- python3.4-venv
# Using newer GCC with sanitizers # Using newer GCC with sanitizers
- addons: - addons:
apt: apt:

View File

@ -545,10 +545,39 @@ Tests based on ``avocado_qemu.Test`` can easily:
- http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.html#avocado.Test - http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.html#avocado.Test
- http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.utils.html - http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.utils.html
Installation Running tests
------------ -------------
To install Avocado and its dependencies, run: You can run the acceptance tests simply by executing:
.. code::
make check-acceptance
This involves the automatic creation of Python virtual environment
within the build tree (at ``tests/venv``) which will have all the
right dependencies, and will save tests results also within the
build tree (at ``tests/results``).
Note: the build environment must be using a Python 3 stack, and have
the ``venv`` and ``pip`` packages installed. If necessary, make sure
``configure`` is called with ``--python=`` and that those modules are
available. On Debian and Ubuntu based systems, depending on the
specific version, they may be on packages named ``python3-venv`` and
``python3-pip``.
The scripts installed inside the virtual environment may be used
without an "activation". For instance, the Avocado test runner
may be invoked by running:
.. code::
tests/venv/bin/avocado run $OPTION1 $OPTION2 tests/acceptance/
Manual Installation
-------------------
To manually install Avocado and its dependencies, run:
.. code:: .. code::
@ -689,11 +718,15 @@ The exact QEMU binary to be used on QEMUMachine.
Uninstalling Avocado Uninstalling Avocado
-------------------- --------------------
If you've followed the installation instructions above, you can easily If you've followed the manual installation instructions above, you can
uninstall Avocado. Start by listing the packages you have installed:: easily uninstall Avocado. Start by listing the packages you have
installed::
pip list --user pip list --user
And remove any package you want with:: And remove any package you want with::
pip uninstall <package_name> pip uninstall <package_name>
If you've used ``make check-acceptance``, the Python virtual environment where
Avocado is installed will be cleaned up as part of ``make check-clean``.

View File

@ -298,7 +298,7 @@ class Field:
s = 's' s = 's'
else: else:
s = '' s = ''
return str(pos) + ':' + s + str(len) return str(self.pos) + ':' + s + str(self.len)
def str_extract(self): def str_extract(self):
if self.sign: if self.sign:

View File

@ -72,21 +72,6 @@ ERROR_WHITELIST = [
# devices that don't work out of the box because they require extra options to "-device DEV": # devices that don't work out of the box because they require extra options to "-device DEV":
# DEVICE | ERROR MESSAGE # DEVICE | ERROR MESSAGE
{'device':'.*-(i386|x86_64)-cpu', 'expected':True}, # CPU socket-id is not set {'device':'.*-(i386|x86_64)-cpu', 'expected':True}, # CPU socket-id is not set
{'device':'ARM,bitband-memory', 'expected':True}, # source-memory property not set
{'device':'arm.cortex-a9-global-timer', 'expected':True}, # a9_gtimer_realize: num-cpu must be between 1 and 4
{'device':'arm_mptimer', 'expected':True}, # num-cpu must be between 1 and 4
{'device':'armv7m', 'expected':True}, # memory property was not set
{'device':'aspeed.scu', 'expected':True}, # Unknown silicon revision: 0x0
{'device':'aspeed.sdmc', 'expected':True}, # Unknown silicon revision: 0x0
{'device':'bcm2835-dma', 'expected':True}, # bcm2835_dma_realize: required dma-mr link not found: Property '.dma-mr' not found
{'device':'bcm2835-fb', 'expected':True}, # bcm2835_fb_realize: required vcram-base property not set
{'device':'bcm2835-mbox', 'expected':True}, # bcm2835_mbox_realize: required mbox-mr link not found: Property '.mbox-mr' not found
{'device':'bcm2835-peripherals', 'expected':True}, # bcm2835_peripherals_realize: required ram link not found: Property '.ram' not found
{'device':'bcm2835-property', 'expected':True}, # bcm2835_property_realize: required fb link not found: Property '.fb' not found
{'device':'bcm2835_gpio', 'expected':True}, # bcm2835_gpio_realize: required sdhci link not found: Property '.sdbus-sdhci' not found
{'device':'bcm2836', 'expected':True}, # bcm2836_realize: required ram link not found: Property '.ram' not found
{'device':'cfi.pflash01', 'expected':True}, # attribute "sector-length" not specified or zero.
{'device':'cfi.pflash02', 'expected':True}, # attribute "sector-length" not specified or zero.
{'device':'icp', 'expected':True}, # icp_realize: required link 'xics' not found: Property '.xics' not found {'device':'icp', 'expected':True}, # icp_realize: required link 'xics' not found: Property '.xics' not found
{'device':'ics', 'expected':True}, # ics_base_realize: required link 'xics' not found: Property '.xics' not found {'device':'ics', 'expected':True}, # ics_base_realize: required link 'xics' not found: Property '.xics' not found
# "-device ide-cd" does work on more recent QEMU versions, so it doesn't have expected=True # "-device ide-cd" does work on more recent QEMU versions, so it doesn't have expected=True
@ -108,7 +93,6 @@ ERROR_WHITELIST = [
{'device':'pc-dimm', 'expected':True}, # 'memdev' property is not set {'device':'pc-dimm', 'expected':True}, # 'memdev' property is not set
{'device':'pci-bridge', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. {'device':'pci-bridge', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. {'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'pxa2xx-dma', 'expected':True}, # channels value invalid
{'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. {'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'scsi-block', 'expected':True}, # drive property not set {'device':'scsi-block', 'expected':True}, # drive property not set
{'device':'scsi-disk', 'expected':True}, # drive property not set {'device':'scsi-disk', 'expected':True}, # drive property not set
@ -145,7 +129,6 @@ ERROR_WHITELIST = [
{'device':'virtio-input-host-pci', 'expected':True}, # evdev property is required {'device':'virtio-input-host-pci', 'expected':True}, # evdev property is required
{'device':'xen-pvdevice', 'expected':True}, # Device ID invalid, it must always be supplied {'device':'xen-pvdevice', 'expected':True}, # Device ID invalid, it must always be supplied
{'device':'vhost-vsock-ccw', 'expected':True}, # guest-cid property must be greater than 2 {'device':'vhost-vsock-ccw', 'expected':True}, # guest-cid property must be greater than 2
{'device':'ALTR.timer', 'expected':True}, # "clock-frequency" property must be provided
{'device':'zpci', 'expected':True}, # target must be defined {'device':'zpci', 'expected':True}, # target must be defined
{'device':'pnv-(occ|icp|lpc)', 'expected':True}, # required link 'xics' not found: Property '.xics' not found {'device':'pnv-(occ|icp|lpc)', 'expected':True}, # required link 'xics' not found: Property '.xics' not found
{'device':'powernv-cpu-.*', 'expected':True}, # pnv_core_realize: required link 'xics' not found: Property '.xics' not found {'device':'powernv-cpu-.*', 'expected':True}, # pnv_core_realize: required link 'xics' not found: Property '.xics' not found

View File

@ -59,9 +59,9 @@ class QEMUMachineAddDeviceError(QEMUMachineError):
""" """
class MonitorResponseError(qmp.qmp.QMPError): class MonitorResponseError(qmp.qmp.QMPError):
''' """
Represents erroneous QMP monitor reply Represents erroneous QMP monitor reply
''' """
def __init__(self, reply): def __init__(self, reply):
try: try:
desc = reply["error"]["desc"] desc = reply["error"]["desc"]
@ -72,14 +72,15 @@ class MonitorResponseError(qmp.qmp.QMPError):
class QEMUMachine(object): class QEMUMachine(object):
'''A QEMU VM """
A QEMU VM
Use this object as a context manager to ensure the QEMU process terminates:: Use this object as a context manager to ensure the QEMU process terminates::
with VM(binary) as vm: with VM(binary) as vm:
... ...
# vm is guaranteed to be shut down here # vm is guaranteed to be shut down here
''' """
def __init__(self, binary, args=None, wrapper=None, name=None, def __init__(self, binary, args=None, wrapper=None, name=None,
test_dir="/var/tmp", monitor_address=None, test_dir="/var/tmp", monitor_address=None,
@ -141,18 +142,28 @@ class QEMUMachine(object):
self._args.append(args) self._args.append(args)
def add_fd(self, fd, fdset, opaque, opts=''): def add_fd(self, fd, fdset, opaque, opts=''):
'''Pass a file descriptor to the VM''' """
Pass a file descriptor to the VM
"""
options = ['fd=%d' % fd, options = ['fd=%d' % fd,
'set=%d' % fdset, 'set=%d' % fdset,
'opaque=%s' % opaque] 'opaque=%s' % opaque]
if opts: if opts:
options.append(opts) options.append(opts)
# This did not exist before 3.4, but since then it is
# mandatory for our purpose
if hasattr(os, 'set_inheritable'):
os.set_inheritable(fd, True)
self._args.append('-add-fd') self._args.append('-add-fd')
self._args.append(','.join(options)) self._args.append(','.join(options))
return self return self
def send_fd_scm(self, fd_file_path): # Exactly one of fd and file_path must be given.
# (If it is file_path, the helper will open that file and pass its
# own fd)
def send_fd_scm(self, fd=None, file_path=None):
# In iotest.py, the qmp should always use unix socket. # In iotest.py, the qmp should always use unix socket.
assert self._qmp.is_scm_available() assert self._qmp.is_scm_available()
if self._socket_scm_helper is None: if self._socket_scm_helper is None:
@ -160,12 +171,27 @@ class QEMUMachine(object):
if not os.path.exists(self._socket_scm_helper): if not os.path.exists(self._socket_scm_helper):
raise QEMUMachineError("%s does not exist" % raise QEMUMachineError("%s does not exist" %
self._socket_scm_helper) self._socket_scm_helper)
# This did not exist before 3.4, but since then it is
# mandatory for our purpose
if hasattr(os, 'set_inheritable'):
os.set_inheritable(self._qmp.get_sock_fd(), True)
if fd is not None:
os.set_inheritable(fd, True)
fd_param = ["%s" % self._socket_scm_helper, fd_param = ["%s" % self._socket_scm_helper,
"%d" % self._qmp.get_sock_fd(), "%d" % self._qmp.get_sock_fd()]
"%s" % fd_file_path]
if file_path is not None:
assert fd is None
fd_param.append(file_path)
else:
assert fd is not None
fd_param.append(str(fd))
devnull = open(os.path.devnull, 'rb') devnull = open(os.path.devnull, 'rb')
proc = subprocess.Popen(fd_param, stdin=devnull, stdout=subprocess.PIPE, proc = subprocess.Popen(fd_param, stdin=devnull, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT, close_fds=False)
output = proc.communicate()[0] output = proc.communicate()[0]
if output: if output:
LOG.debug(output) LOG.debug(output)
@ -174,7 +200,9 @@ class QEMUMachine(object):
@staticmethod @staticmethod
def _remove_if_exists(path): def _remove_if_exists(path):
'''Remove file object at path if it exists''' """
Remove file object at path if it exists
"""
try: try:
os.remove(path) os.remove(path)
except OSError as exception: except OSError as exception:
@ -277,7 +305,9 @@ class QEMUMachine(object):
raise raise
def _launch(self): def _launch(self):
'''Launch the VM and establish a QMP connection''' """
Launch the VM and establish a QMP connection
"""
devnull = open(os.path.devnull, 'rb') devnull = open(os.path.devnull, 'rb')
self._pre_launch() self._pre_launch()
self._qemu_full_args = (self._wrapper + [self._binary] + self._qemu_full_args = (self._wrapper + [self._binary] +
@ -286,18 +316,23 @@ class QEMUMachine(object):
stdin=devnull, stdin=devnull,
stdout=self._qemu_log_file, stdout=self._qemu_log_file,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
shell=False) shell=False,
close_fds=False)
self._post_launch() self._post_launch()
def wait(self): def wait(self):
'''Wait for the VM to power off''' """
Wait for the VM to power off
"""
self._popen.wait() self._popen.wait()
self._qmp.close() self._qmp.close()
self._load_io_log() self._load_io_log()
self._post_shutdown() self._post_shutdown()
def shutdown(self): def shutdown(self):
'''Terminate the VM and clean up''' """
Terminate the VM and clean up
"""
if self.is_running(): if self.is_running():
try: try:
self._qmp.cmd('quit') self._qmp.cmd('quit')
@ -321,7 +356,9 @@ class QEMUMachine(object):
self._launched = False self._launched = False
def qmp(self, cmd, conv_keys=True, **args): def qmp(self, cmd, conv_keys=True, **args):
'''Invoke a QMP command and return the response dict''' """
Invoke a QMP command and return the response dict
"""
qmp_args = dict() qmp_args = dict()
for key, value in args.items(): for key, value in args.items():
if conv_keys: if conv_keys:
@ -332,11 +369,11 @@ class QEMUMachine(object):
return self._qmp.cmd(cmd, args=qmp_args) return self._qmp.cmd(cmd, args=qmp_args)
def command(self, cmd, conv_keys=True, **args): def command(self, cmd, conv_keys=True, **args):
''' """
Invoke a QMP command. Invoke a QMP command.
On success return the response dict. On success return the response dict.
On failure raise an exception. On failure raise an exception.
''' """
reply = self.qmp(cmd, conv_keys, **args) reply = self.qmp(cmd, conv_keys, **args)
if reply is None: if reply is None:
raise qmp.qmp.QMPError("Monitor is closed") raise qmp.qmp.QMPError("Monitor is closed")
@ -345,13 +382,17 @@ class QEMUMachine(object):
return reply["return"] return reply["return"]
def get_qmp_event(self, wait=False): def get_qmp_event(self, wait=False):
'''Poll for one queued QMP events and return it''' """
Poll for one queued QMP events and return it
"""
if len(self._events) > 0: if len(self._events) > 0:
return self._events.pop(0) return self._events.pop(0)
return self._qmp.pull_event(wait=wait) return self._qmp.pull_event(wait=wait)
def get_qmp_events(self, wait=False): def get_qmp_events(self, wait=False):
'''Poll for queued QMP events and return a list of dicts''' """
Poll for queued QMP events and return a list of dicts
"""
events = self._qmp.get_events(wait=wait) events = self._qmp.get_events(wait=wait)
events.extend(self._events) events.extend(self._events)
del self._events[:] del self._events[:]
@ -359,7 +400,7 @@ class QEMUMachine(object):
return events return events
def event_wait(self, name, timeout=60.0, match=None): def event_wait(self, name, timeout=60.0, match=None):
''' """
Wait for specified timeout on named event in QMP; optionally filter Wait for specified timeout on named event in QMP; optionally filter
results by match. results by match.
@ -367,7 +408,7 @@ class QEMUMachine(object):
branch processing on match's value None branch processing on match's value None
{"foo": {"bar": 1}} matches {"foo": None} {"foo": {"bar": 1}} matches {"foo": None}
{"foo": {"bar": 1}} does not matches {"foo": {"baz": None}} {"foo": {"bar": 1}} does not matches {"foo": {"baz": None}}
''' """
def event_match(event, match=None): def event_match(event, match=None):
if match is None: if match is None:
return True return True
@ -400,29 +441,29 @@ class QEMUMachine(object):
return None return None
def get_log(self): def get_log(self):
''' """
After self.shutdown or failed qemu execution, this returns the output After self.shutdown or failed qemu execution, this returns the output
of the qemu process. of the qemu process.
''' """
return self._iolog return self._iolog
def add_args(self, *args): def add_args(self, *args):
''' """
Adds to the list of extra arguments to be given to the QEMU binary Adds to the list of extra arguments to be given to the QEMU binary
''' """
self._args.extend(args) self._args.extend(args)
def set_machine(self, machine_type): def set_machine(self, machine_type):
''' """
Sets the machine type Sets the machine type
If set, the machine type will be added to the base arguments If set, the machine type will be added to the base arguments
of the resulting QEMU command line. of the resulting QEMU command line.
''' """
self._machine = machine_type self._machine = machine_type
def set_console(self, device_type=None): def set_console(self, device_type=None):
''' """
Sets the device type for a console device Sets the device type for a console device
If set, the console device and a backing character device will If set, the console device and a backing character device will
@ -440,7 +481,7 @@ class QEMUMachine(object):
@param device_type: the device type, such as "isa-serial" @param device_type: the device type, such as "isa-serial"
@raises: QEMUMachineAddDeviceError if the device type is not given @raises: QEMUMachineAddDeviceError if the device type is not given
and can not be determined. and can not be determined.
''' """
if device_type is None: if device_type is None:
if self._machine is None: if self._machine is None:
raise QEMUMachineAddDeviceError("Can not add a console device:" raise QEMUMachineAddDeviceError("Can not add a console device:"

View File

@ -64,7 +64,7 @@ class QEMUQtestProtocol(object):
@param qtest_cmd: qtest command text to be sent @param qtest_cmd: qtest command text to be sent
""" """
self._sock.sendall(qtest_cmd + "\n") self._sock.sendall((qtest_cmd + "\n").encode('utf-8'))
def close(self): def close(self):
self._sock.close() self._sock.close()

View File

@ -11,7 +11,9 @@ check-help:
@echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
@echo " $(MAKE) check-block Run block tests" @echo " $(MAKE) check-block Run block tests"
@echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-tcg Run TCG tests"
@echo " $(MAKE) check-acceptance Run all acceptance (functional) tests"
@echo " $(MAKE) check-report.html Generates an HTML test report" @echo " $(MAKE) check-report.html Generates an HTML test report"
@echo " $(MAKE) check-venv Creates a Python venv for tests"
@echo " $(MAKE) check-clean Clean the tests" @echo " $(MAKE) check-clean Clean the tests"
@echo @echo
@echo "Please note that HTML reports do not regenerate if the unit tests" @echo "Please note that HTML reports do not regenerate if the unit tests"
@ -899,6 +901,46 @@ check-decodetree:
./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \ ./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \
TEST, decodetree.py) TEST, decodetree.py)
# Python venv for running tests
.PHONY: check-venv check-acceptance
TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv
TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt
TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
# Controls the output generated by Avocado when running tests.
# Any number of command separated loggers are accepted. For more
# information please refer to "avocado --help".
AVOCADO_SHOW=none
$(shell $(PYTHON) -c 'import sys; assert sys.version_info >= (3,0)' >/dev/null 2>&1)
ifeq ($(.SHELLSTATUS),0)
$(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
$(call quiet-command, \
$(PYTHON) -m venv --system-site-packages $@, \
VENV, $@)
$(call quiet-command, \
$(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV_REQ), \
PIP, $(TESTS_VENV_REQ))
$(call quiet-command, touch $@)
else
$(TESTS_VENV_DIR):
$(error "venv directory for tests requires Python 3")
endif
$(TESTS_RESULTS_DIR):
$(call quiet-command, mkdir -p $@, \
MKDIR, $@)
check-venv: $(TESTS_VENV_DIR)
check-acceptance: check-venv $(TESTS_RESULTS_DIR)
$(call quiet-command, \
$(TESTS_VENV_DIR)/bin/python -m avocado \
--show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \
--failfast=on $(SRC_PATH)/tests/acceptance, \
"AVOCADO", "tests/acceptance")
# Consolidated targets # Consolidated targets
.PHONY: check-qapi-schema check-qtest check-unit check check-clean .PHONY: check-qapi-schema check-qtest check-unit check check-clean
@ -912,6 +954,7 @@ check-clean:
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y)) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
rm -f tests/test-qapi-gen-timestamp rm -f tests/test-qapi-gen-timestamp
rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
clean: check-clean clean: check-clean

View File

@ -521,7 +521,7 @@ new_state = "2"
state = "2" state = "2"
event = "%s" event = "%s"
new_state = "1" new_state = "1"
''' % (event, errno, self.STREAM_BUFFER_SIZE / 512, event, event)) ''' % (event, errno, self.STREAM_BUFFER_SIZE // 512, event, event))
file.close() file.close()
class TestEIO(TestErrors): class TestEIO(TestErrors):

View File

@ -195,7 +195,7 @@ class TestSingleDrive(ImageCommitTestCase):
self.assert_no_active_block_jobs() self.assert_no_active_block_jobs()
result = self.vm.qmp('block-commit', device='drive0', top=mid_img, result = self.vm.qmp('block-commit', device='drive0', top=mid_img,
base=backing_img, speed=(self.image_len / 4)) base=backing_img, speed=(self.image_len // 4))
self.assert_qmp(result, 'return', {}) self.assert_qmp(result, 'return', {})
result = self.vm.qmp('device_del', id='scsi0') result = self.vm.qmp('device_del', id='scsi0')
self.assert_qmp(result, 'return', {}) self.assert_qmp(result, 'return', {})
@ -225,7 +225,7 @@ class TestSingleDrive(ImageCommitTestCase):
self.assert_no_active_block_jobs() self.assert_no_active_block_jobs()
result = self.vm.qmp('block-commit', device='drive0', top=mid_img, result = self.vm.qmp('block-commit', device='drive0', top=mid_img,
base=backing_img, speed=(self.image_len / 4)) base=backing_img, speed=(self.image_len // 4))
self.assert_qmp(result, 'return', {}) self.assert_qmp(result, 'return', {})
result = self.vm.qmp('query-block') result = self.vm.qmp('query-block')

View File

@ -404,7 +404,7 @@ new_state = "2"
state = "2" state = "2"
event = "%s" event = "%s"
new_state = "1" new_state = "1"
''' % (event, errno, self.MIRROR_GRANULARITY / 512, event, event)) ''' % (event, errno, self.MIRROR_GRANULARITY // 512, event, event))
file.close() file.close()
def setUp(self): def setUp(self):
@ -569,7 +569,7 @@ new_state = "2"
state = "2" state = "2"
event = "%s" event = "%s"
new_state = "1" new_state = "1"
''' % (event, errno, self.MIRROR_GRANULARITY / 512, event, event)) ''' % (event, errno, self.MIRROR_GRANULARITY // 512, event, event))
file.close() file.close()
def setUp(self): def setUp(self):

View File

@ -26,6 +26,10 @@ import iotests
from iotests import qemu_img, qemu_img_verbose, qemu_io from iotests import qemu_img, qemu_img_verbose, qemu_io
import struct import struct
import subprocess import subprocess
import sys
if sys.version_info.major == 2:
range = xrange
test_img = os.path.join(iotests.test_dir, 'test.img') test_img = os.path.join(iotests.test_dir, 'test.img')
@ -52,23 +56,23 @@ class TestRefcountTableGrowth(iotests.QMPTestCase):
# Write a refcount table # Write a refcount table
fd.seek(off_reftable) fd.seek(off_reftable)
for i in xrange(0, h.refcount_table_clusters): for i in range(0, h.refcount_table_clusters):
sector = ''.join(struct.pack('>Q', sector = b''.join(struct.pack('>Q',
off_refblock + i * 64 * 512 + j * 512) off_refblock + i * 64 * 512 + j * 512)
for j in xrange(0, 64)) for j in range(0, 64))
fd.write(sector) fd.write(sector)
# Write the refcount blocks # Write the refcount blocks
assert(fd.tell() == off_refblock) assert(fd.tell() == off_refblock)
sector = ''.join(struct.pack('>H', 1) for j in xrange(0, 64 * 256)) sector = b''.join(struct.pack('>H', 1) for j in range(0, 64 * 256))
for block in xrange(0, h.refcount_table_clusters): for block in range(0, h.refcount_table_clusters):
fd.write(sector) fd.write(sector)
# Write the L1 table # Write the L1 table
assert(fd.tell() == off_l1) assert(fd.tell() == off_l1)
assert(off_l2 + 512 * h.l1_size == off_data) assert(off_l2 + 512 * h.l1_size == off_data)
table = ''.join(struct.pack('>Q', (1 << 63) | off_l2 + 512 * j) table = b''.join(struct.pack('>Q', (1 << 63) | off_l2 + 512 * j)
for j in xrange(0, h.l1_size)) for j in range(0, h.l1_size))
fd.write(table) fd.write(table)
# Write the L2 tables # Write the L2 tables
@ -79,14 +83,14 @@ class TestRefcountTableGrowth(iotests.QMPTestCase):
off = off_data off = off_data
while remaining > 1024 * 512: while remaining > 1024 * 512:
pytable = list((1 << 63) | off + 512 * j pytable = list((1 << 63) | off + 512 * j
for j in xrange(0, 1024)) for j in range(0, 1024))
table = struct.pack('>1024Q', *pytable) table = struct.pack('>1024Q', *pytable)
fd.write(table) fd.write(table)
remaining = remaining - 1024 * 512 remaining = remaining - 1024 * 512
off = off + 1024 * 512 off = off + 1024 * 512
table = ''.join(struct.pack('>Q', (1 << 63) | off + 512 * j) table = b''.join(struct.pack('>Q', (1 << 63) | off + 512 * j)
for j in xrange(0, remaining / 512)) for j in range(0, remaining // 512))
fd.write(table) fd.write(table)

View File

@ -140,7 +140,7 @@ class TestSCMFd(iotests.QMPTestCase):
os.remove(image0) os.remove(image0)
def _send_fd_by_SCM(self): def _send_fd_by_SCM(self):
ret = self.vm.send_fd_scm(image0) ret = self.vm.send_fd_scm(file_path=image0)
self.assertEqual(ret, 0, 'Failed to send fd with UNIX SCM') self.assertEqual(ret, 0, 'Failed to send fd with UNIX SCM')
def test_add_fd(self): def test_add_fd(self):

View File

@ -32,7 +32,7 @@ target_img = os.path.join(iotests.test_dir, 'target.img')
def img_create(img, fmt=iotests.imgfmt, size='64M', **kwargs): def img_create(img, fmt=iotests.imgfmt, size='64M', **kwargs):
fullname = os.path.join(iotests.test_dir, '%s.%s' % (img, fmt)) fullname = os.path.join(iotests.test_dir, '%s.%s' % (img, fmt))
optargs = [] optargs = []
for k,v in kwargs.iteritems(): for k,v in kwargs.items():
optargs = optargs + ['-o', '%s=%s' % (k,v)] optargs = optargs + ['-o', '%s=%s' % (k,v)]
args = ['create', '-f', fmt] + optargs + [fullname, size] args = ['create', '-f', fmt] + optargs + [fullname, size]
iotests.qemu_img(*args) iotests.qemu_img(*args)

View File

@ -59,7 +59,7 @@ class TestQemuImgInfo(TestImageInfoSpecific):
:data.index('')] :data.index('')]
for field in data: for field in data:
self.assertTrue(re.match('^ {4}[^ ]', field) is not None) self.assertTrue(re.match('^ {4}[^ ]', field) is not None)
data = map(lambda line: line.strip(), data) data = [line.strip() for line in data]
self.assertEqual(data, self.human_compare) self.assertEqual(data, self.human_compare)
class TestQMP(TestImageInfoSpecific): class TestQMP(TestImageInfoSpecific):
@ -80,7 +80,7 @@ class TestQMP(TestImageInfoSpecific):
def test_qmp(self): def test_qmp(self):
result = self.vm.qmp('query-block')['return'] result = self.vm.qmp('query-block')['return']
drive = filter(lambda drive: drive['device'] == 'drive0', result)[0] drive = next(drive for drive in result if drive['device'] == 'drive0')
data = drive['inserted']['image']['format-specific'] data = drive['inserted']['image']['format-specific']
self.assertEqual(data['type'], iotests.imgfmt) self.assertEqual(data['type'], iotests.imgfmt)
self.assertEqual(data['data'], self.compare) self.assertEqual(data['data'], self.compare)

View File

@ -41,6 +41,7 @@ can't open device nbd+tcp://127.0.0.1:PORT/foo
=== Check disconnect after neg2 === === Check disconnect after neg2 ===
Unable to read from socket: Connection reset by peer
Connection closed Connection closed
read failed: Input/output error read failed: Input/output error
@ -54,6 +55,7 @@ can't open device nbd+tcp://127.0.0.1:PORT/foo
=== Check disconnect before request === === Check disconnect before request ===
Unable to read from socket: Connection reset by peer
Connection closed Connection closed
read failed: Input/output error read failed: Input/output error
@ -116,6 +118,7 @@ can't open device nbd+tcp://127.0.0.1:PORT/
=== Check disconnect after neg-classic === === Check disconnect after neg-classic ===
Unable to read from socket: Connection reset by peer
Connection closed Connection closed
read failed: Input/output error read failed: Input/output error
@ -161,6 +164,8 @@ can't open device nbd+unix:///foo?socket=TEST_DIR/nbd.sock
=== Check disconnect after neg2 === === Check disconnect after neg2 ===
Unable to read from socket: Connection reset by peer
Connection closed
read failed: Input/output error read failed: Input/output error
=== Check disconnect 8 neg2 === === Check disconnect 8 neg2 ===
@ -173,6 +178,8 @@ can't open device nbd+unix:///foo?socket=TEST_DIR/nbd.sock
=== Check disconnect before request === === Check disconnect before request ===
Unable to read from socket: Connection reset by peer
Connection closed
read failed: Input/output error read failed: Input/output error
=== Check disconnect after request === === Check disconnect after request ===
@ -234,6 +241,8 @@ can't open device nbd+unix:///?socket=TEST_DIR/nbd.sock
=== Check disconnect after neg-classic === === Check disconnect after neg-classic ===
Unable to read from socket: Connection reset by peer
Connection closed
read failed: Input/output error read failed: Input/output error
*** done *** done

View File

@ -69,18 +69,18 @@ class ThrottleTestCase(iotests.QMPTestCase):
# in. The throttled requests won't be executed until we # in. The throttled requests won't be executed until we
# advance the virtual clock. # advance the virtual clock.
rq_size = 512 rq_size = 512
rd_nr = max(params['bps'] / rq_size / 2, rd_nr = max(params['bps'] // rq_size // 2,
params['bps_rd'] / rq_size, params['bps_rd'] // rq_size,
params['iops'] / 2, params['iops'] // 2,
params['iops_rd']) params['iops_rd'])
rd_nr *= seconds * 2 rd_nr *= seconds * 2
rd_nr /= ndrives rd_nr //= ndrives
wr_nr = max(params['bps'] / rq_size / 2, wr_nr = max(params['bps'] // rq_size // 2,
params['bps_wr'] / rq_size, params['bps_wr'] // rq_size,
params['iops'] / 2, params['iops'] // 2,
params['iops_wr']) params['iops_wr'])
wr_nr *= seconds * 2 wr_nr *= seconds * 2
wr_nr /= ndrives wr_nr //= ndrives
# Send I/O requests to all drives # Send I/O requests to all drives
for i in range(rd_nr): for i in range(rd_nr):
@ -196,7 +196,7 @@ class ThrottleTestCase(iotests.QMPTestCase):
self.configure_throttle(ndrives, settings) self.configure_throttle(ndrives, settings)
# Wait for the bucket to empty so we can do bursts # Wait for the bucket to empty so we can do bursts
wait_ns = nsec_per_sec * burst_length * burst_rate / rate wait_ns = nsec_per_sec * burst_length * burst_rate // rate
self.vm.qtest("clock_step %d" % wait_ns) self.vm.qtest("clock_step %d" % wait_ns)
# Test I/O at the max burst rate # Test I/O at the max burst rate

View File

@ -39,7 +39,7 @@ def try_remove(img):
def transaction_action(action, **kwargs): def transaction_action(action, **kwargs):
return { return {
'type': action, 'type': action,
'data': dict((k.replace('_', '-'), v) for k, v in kwargs.iteritems()) 'data': dict((k.replace('_', '-'), v) for k, v in kwargs.items())
} }
@ -134,7 +134,7 @@ class TestIncrementalBackupBase(iotests.QMPTestCase):
def img_create(self, img, fmt=iotests.imgfmt, size='64M', def img_create(self, img, fmt=iotests.imgfmt, size='64M',
parent=None, parentFormat=None, **kwargs): parent=None, parentFormat=None, **kwargs):
optargs = [] optargs = []
for k,v in kwargs.iteritems(): for k,v in kwargs.items():
optargs = optargs + ['-o', '%s=%s' % (k,v)] optargs = optargs + ['-o', '%s=%s' % (k,v)]
args = ['create', '-f', fmt] + optargs + [img, size] args = ['create', '-f', fmt] + optargs + [img, size]
if parent: if parent:

View File

@ -24,7 +24,7 @@ import os
interval_length = 10 interval_length = 10
nsec_per_sec = 1000000000 nsec_per_sec = 1000000000
op_latency = nsec_per_sec / 1000 # See qtest_latency_ns in accounting.c op_latency = nsec_per_sec // 1000 # See qtest_latency_ns in accounting.c
bad_sector = 8192 bad_sector = 8192
bad_offset = bad_sector * 512 bad_offset = bad_sector * 512
blkdebug_file = os.path.join(iotests.test_dir, 'blkdebug.conf') blkdebug_file = os.path.join(iotests.test_dir, 'blkdebug.conf')

View File

@ -51,7 +51,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
# Check whether a BlockDriverState exists # Check whether a BlockDriverState exists
def checkBlockDriverState(self, node, must_exist = True): def checkBlockDriverState(self, node, must_exist = True):
result = self.vm.qmp('query-named-block-nodes') result = self.vm.qmp('query-named-block-nodes')
nodes = filter(lambda x: x['node-name'] == node, result['return']) nodes = [x for x in result['return'] if x['node-name'] == node]
self.assertLessEqual(len(nodes), 1) self.assertLessEqual(len(nodes), 1)
self.assertEqual(must_exist, len(nodes) == 1) self.assertEqual(must_exist, len(nodes) == 1)

View File

@ -229,7 +229,7 @@ class BuiltinNBD(NBDBlockdevAddBase):
sockfd = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sockfd = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sockfd.connect(unix_socket) sockfd.connect(unix_socket)
result = self.vm.send_fd_scm(str(sockfd.fileno())) result = self.vm.send_fd_scm(fd=sockfd.fileno())
self.assertEqual(result, 0, 'Failed to send socket FD') self.assertEqual(result, 0, 'Failed to send socket FD')
result = self.vm.qmp('getfd', fdname='nbd-fifo') result = self.vm.qmp('getfd', fdname='nbd-fifo')

View File

@ -79,7 +79,7 @@ class LUKSConfig(object):
def first_password_base64(self): def first_password_base64(self):
(pw, slot) = self.first_password() (pw, slot) = self.first_password()
return base64.b64encode(pw) return base64.b64encode(pw.encode('ascii')).decode('ascii')
def active_slots(self): def active_slots(self):
slots = [] slots = []
@ -98,7 +98,8 @@ def verify_passwordless_sudo():
proc = subprocess.Popen(args, proc = subprocess.Popen(args,
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT,
universal_newlines=True)
msg = proc.communicate()[0] msg = proc.communicate()[0]
@ -116,7 +117,8 @@ def cryptsetup(args, password=None):
proc = subprocess.Popen(fullargs, proc = subprocess.Popen(fullargs,
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT,
universal_newlines=True)
msg = proc.communicate(password)[0] msg = proc.communicate(password)[0]
@ -312,13 +314,13 @@ def test_once(config, qemu_img=False):
image_size = 4 * oneTB image_size = 4 * oneTB
if qemu_img: if qemu_img:
iotests.log("# Create image") iotests.log("# Create image")
qemu_img_create(config, image_size / oneMB) qemu_img_create(config, image_size // oneMB)
else: else:
iotests.log("# Create image") iotests.log("# Create image")
create_image(config, image_size / oneMB) create_image(config, image_size // oneMB)
lowOffsetMB = 100 lowOffsetMB = 100
highOffsetMB = 3 * oneTB / oneMB highOffsetMB = 3 * oneTB // oneMB
try: try:
if not qemu_img: if not qemu_img:

View File

@ -67,9 +67,9 @@ class TestActiveMirror(iotests.QMPTestCase):
'write -P 1 0 %i' % self.image_len); 'write -P 1 0 %i' % self.image_len);
# Start some background requests # Start some background requests
for offset in range(1 * self.image_len / 8, 3 * self.image_len / 8, 1024 * 1024): for offset in range(1 * self.image_len // 8, 3 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -P 2 %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -P 2 %i 1M' % offset)
for offset in range(2 * self.image_len / 8, 3 * self.image_len / 8, 1024 * 1024): for offset in range(2 * self.image_len // 8, 3 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
# Start the block job # Start the block job
@ -83,9 +83,9 @@ class TestActiveMirror(iotests.QMPTestCase):
self.assert_qmp(result, 'return', {}) self.assert_qmp(result, 'return', {})
# Start some more requests # Start some more requests
for offset in range(3 * self.image_len / 8, 5 * self.image_len / 8, 1024 * 1024): for offset in range(3 * self.image_len // 8, 5 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
for offset in range(4 * self.image_len / 8, 5 * self.image_len / 8, 1024 * 1024): for offset in range(4 * self.image_len // 8, 5 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
# Wait for the READY event # Wait for the READY event
@ -95,9 +95,9 @@ class TestActiveMirror(iotests.QMPTestCase):
# the source) should be settled using the active mechanism. # the source) should be settled using the active mechanism.
# The mirror code itself asserts that the source BDS's dirty # The mirror code itself asserts that the source BDS's dirty
# bitmap will stay clean between READY and COMPLETED. # bitmap will stay clean between READY and COMPLETED.
for offset in range(5 * self.image_len / 8, 7 * self.image_len / 8, 1024 * 1024): for offset in range(5 * self.image_len // 8, 7 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
for offset in range(6 * self.image_len / 8, 7 * self.image_len / 8, 1024 * 1024): for offset in range(6 * self.image_len // 8, 7 * self.image_len // 8, 1024 * 1024):
self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset) self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
if sync_source_and_target: if sync_source_and_target:

View File

@ -18,9 +18,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import os, random, iotests, struct, qcow2 import os, random, iotests, struct, qcow2, sys
from iotests import qemu_img, qemu_io, image_size from iotests import qemu_img, qemu_io, image_size
if sys.version_info.major == 2:
range = xrange
test_img = os.path.join(iotests.test_dir, 'test.img') test_img = os.path.join(iotests.test_dir, 'test.img')
check_img = os.path.join(iotests.test_dir, 'check.img') check_img = os.path.join(iotests.test_dir, 'check.img')
@ -38,10 +41,10 @@ class ShrinkBaseClass(iotests.QMPTestCase):
entry_bits = 3 entry_bits = 3
entry_size = 1 << entry_bits entry_size = 1 << entry_bits
l1_mask = 0x00fffffffffffe00 l1_mask = 0x00fffffffffffe00
div_roundup = lambda n, d: (n + d - 1) / d div_roundup = lambda n, d: (n + d - 1) // d
def split_by_n(data, n): def split_by_n(data, n):
for x in xrange(0, len(data), n): for x in range(0, len(data), n):
yield struct.unpack('>Q', data[x:x + n])[0] & l1_mask yield struct.unpack('>Q', data[x:x + n])[0] & l1_mask
def check_l1_table(h, l1_data): def check_l1_table(h, l1_data):
@ -135,8 +138,8 @@ class ShrinkBaseClass(iotests.QMPTestCase):
self.image_verify() self.image_verify()
def test_random_write(self): def test_random_write(self):
offs_list = range(0, size_to_int(self.image_len), offs_list = list(range(0, size_to_int(self.image_len),
size_to_int(self.chunk_size)) size_to_int(self.chunk_size)))
random.shuffle(offs_list) random.shuffle(offs_list)
for offs in offs_list: for offs in offs_list:
qemu_io('-c', 'write -P 0xff %d %s' % (offs, self.chunk_size), qemu_io('-c', 'write -P 0xff %d %s' % (offs, self.chunk_size),

View File

@ -23,7 +23,6 @@ import iotests
import time import time
import itertools import itertools
import operator import operator
import new
import re import re
from iotests import qemu_img from iotests import qemu_img
@ -204,7 +203,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
def inject_test_case(klass, name, method, *args, **kwargs): def inject_test_case(klass, name, method, *args, **kwargs):
mc = operator.methodcaller(method, *args, **kwargs) mc = operator.methodcaller(method, *args, **kwargs)
setattr(klass, 'test_' + method + name, new.instancemethod(mc, None, klass)) setattr(klass, 'test_' + method + name, lambda self: mc(self))
for cmb in list(itertools.product((True, False), repeat=4)): for cmb in list(itertools.product((True, False), repeat=4)):
name = ('_' if cmb[0] else '_not_') + 'persistent_' name = ('_' if cmb[0] else '_not_') + 'persistent_'

View File

@ -1,18 +1,18 @@
Launching VMs... Launching VMs...
Launching NBD server on destination... Launching NBD server on destination...
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
Starting `drive-mirror` on source... Starting `drive-mirror` on source...
{u'return': {}} {"return": {}}
Waiting for `drive-mirror` to complete... Waiting for `drive-mirror` to complete...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror-job0', u'type': u'mirror', u'speed': 0, u'len': 1073741824, u'offset': 1073741824}, u'event': u'BLOCK_JOB_READY'} {"data": {"device": "mirror-job0", "len": 1073741824, "offset": 1073741824, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Starting migration... Starting migration...
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'setup'}, u'event': u'MIGRATION'} {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'active'}, u'event': u'MIGRATION'} {"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'completed'}, u'event': u'MIGRATION'} {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Gracefully ending the `drive-mirror` job on source... Gracefully ending the `drive-mirror` job on source...
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror-job0', u'type': u'mirror', u'speed': 0, u'len': 1073741824, u'offset': 1073741824}, u'event': u'BLOCK_JOB_COMPLETED'} {"data": {"device": "mirror-job0", "len": 1073741824, "offset": 1073741824, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Stopping the NBD server on destination... Stopping the NBD server on destination...
{u'return': {}} {"return": {}}

View File

@ -1,11 +1,11 @@
Launching VM... Launching VM...
Adding IOThread... Adding IOThread...
{u'return': {}} {"return": {}}
Adding blockdevs... Adding blockdevs...
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
Setting iothread... Setting iothread...
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
Creating external snapshots... Creating external snapshots...
{u'return': {}} {"return": {}}

View File

@ -1,11 +1,11 @@
Launching VM... Launching VM...
Setting IOThreads... Setting IOThreads...
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
Enabling migration QMP events... Enabling migration QMP events...
{u'return': {}} {"return": {}}
Starting migration... Starting migration...
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'setup'}, u'event': u'MIGRATION'} {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'active'}, u'event': u'MIGRATION'} {"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'completed'}, u'event': u'MIGRATION'} {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}

View File

@ -1,16 +1,16 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}} {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "node_name": "imgfile"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'imgfile', 'size': 134217728}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "imgfile", "size": 134217728}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -24,15 +24,15 @@ Format specific information:
=== Successful image creation (inline blockdev-add, explicit defaults) === === Successful image creation (inline blockdev-add, explicit defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'nocow': False, 'preallocation': 'off', 'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 65536, 'refcount-bits': 16, 'version': 'v3', 'preallocation': 'off', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'lazy-refcounts': False, 'driver': 'qcow2', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 65536, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": false, "preallocation": "off", "refcount-bits": 16, "size": 67108864, "version": "v3"}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -46,15 +46,15 @@ Format specific information:
=== Successful image creation (v3 non-default options) === === Successful image creation (v3 non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'nocow': True, 'preallocation': 'falloc', 'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 2097152, 'refcount-bits': 1, 'version': 'v3', 'preallocation': 'metadata', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'lazy-refcounts': True, 'driver': 'qcow2', 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 2097152, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": true, "preallocation": "metadata", "refcount-bits": 1, "size": 33554432, "version": "v3"}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -68,15 +68,15 @@ Format specific information:
=== Successful image creation (v2 non-default options) === === Successful image creation (v2 non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'backing-fmt': 'qcow2', 'driver': 'qcow2', 'version': 'v2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'backing-file': 'TEST_DIR/PID-t.qcow2.base', 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"backing-file": "TEST_DIR/PID-t.qcow2.base", "backing-fmt": "qcow2", "cluster-size": 512, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432, "version": "v2"}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -90,10 +90,10 @@ Format specific information:
=== Successful image creation (encrypted) === === Successful image creation (encrypted) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'encrypt': {'key-secret': 'keysec0', 'iter-time': 10, 'cipher-mode': 'ctr', 'ivgen-hash-alg': 'md5', 'cipher-alg': 'twofish-128', 'format': 'luks', 'ivgen-alg': 'plain64', 'hash-alg': 'sha1'}, 'driver': 'qcow2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "encrypt": {"cipher-alg": "twofish-128", "cipher-mode": "ctr", "format": "luks", "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-alg": "md5", "key-secret": "keysec0"}, "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -144,113 +144,113 @@ Format specific information:
=== Invalid BlockdevRef === === Invalid BlockdevRef ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': "this doesn't exist", 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
{u'return': {}} {"return": {}}
Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid sizes === === Invalid sizes ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 1234}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
{u'return': {}} {"return": {}}
Job failed: Image size must be a multiple of 512 bytes Job failed: Image size must be a multiple of 512 bytes
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 18446744073709551104L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
{u'return': {}} {"return": {}}
Job failed: Could not resize image: Image size cannot be negative Job failed: Could not resize image: Image size cannot be negative
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775808L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
{u'return': {}} {"return": {}}
Job failed: Could not resize image: Image size cannot be negative Job failed: Could not resize image: Image size cannot be negative
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775296}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
{u'return': {}} {"return": {}}
Job failed: Could not resize image: Failed to grow the L1 table: File too large Job failed: Could not resize image: Failed to grow the L1 table: File too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid version === === Invalid version ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'version': 'v1', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter 'v1'"}} {"error": {"class": "GenericError", "desc": "Invalid parameter 'v1'"}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'lazy-refcounts': True, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
{u'return': {}} {"return": {}}
Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater) Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 8, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
{u'return': {}} {"return": {}}
Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater) Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid backing file options === === Invalid backing file options ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'preallocation': 'full', 'driver': 'qcow2', 'backing-file': '/dev/null', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Backing file and preallocation cannot be used at the same time Job failed: Backing file and preallocation cannot be used at the same time
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'backing-fmt': 'qcow2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Backing format cannot be used without backing file Job failed: Backing format cannot be used without backing file
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid cluster size === === Invalid cluster size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1234, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a power of two between 512 and 2048k Job failed: Cluster size must be a power of two between 512 and 2048k
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a power of two between 512 and 2048k Job failed: Cluster size must be a power of two between 512 and 2048k
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 4194304, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a power of two between 512 and 2048k Job failed: Cluster size must be a power of two between 512 and 2048k
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a power of two between 512 and 2048k Job failed: Cluster size must be a power of two between 512 and 2048k
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'driver': 'qcow2', 'file': 'node0', 'size': 281474976710656}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
{u'return': {}} {"return": {}}
Job failed: Could not resize image: Failed to grow the L1 table: File too large Job failed: Could not resize image: Failed to grow the L1 table: File too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid refcount width === === Invalid refcount width ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Refcount width must be a power of two and may not exceed 64 bits Job failed: Refcount width must be a power of two and may not exceed 64 bits
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Refcount width must be a power of two and may not exceed 64 bits Job failed: Refcount width must be a power of two and may not exceed 64 bits
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 7, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Refcount width must be a power of two and may not exceed 64 bits Job failed: Refcount width must be a power of two and may not exceed 64 bits
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}

View File

@ -28,7 +28,7 @@ iotests.verify_image_format(supported_fmts=['raw'])
iotests.verify_protocol(supported=['ssh']) iotests.verify_protocol(supported=['ssh'])
def filter_hash(msg): def filter_hash(msg):
return re.sub("'hash': '[0-9a-f]+'", "'hash': HASH", msg) return re.sub('"hash": "[0-9a-f]+"', '"hash": HASH', msg)
def blockdev_create(vm, options): def blockdev_create(vm, options):
result = vm.qmp_log('blockdev-create', job_id='job0', options=options, result = vm.qmp_log('blockdev-create', job_id='job0', options=options,
@ -109,7 +109,7 @@ with iotests.FilePath('t.img') as disk_path, \
md5_key = subprocess.check_output( md5_key = subprocess.check_output(
'ssh-keyscan -t rsa 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' + 'ssh-keyscan -t rsa 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' +
'cut -d" " -f3 | base64 -d | md5sum -b | cut -d" " -f1', 'cut -d" " -f3 | base64 -d | md5sum -b | cut -d" " -f1',
shell=True).rstrip() shell=True).rstrip().decode('ascii')
vm.launch() vm.launch()
blockdev_create(vm, { 'driver': 'ssh', blockdev_create(vm, { 'driver': 'ssh',
@ -147,7 +147,7 @@ with iotests.FilePath('t.img') as disk_path, \
sha1_key = subprocess.check_output( sha1_key = subprocess.check_output(
'ssh-keyscan -t rsa 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' + 'ssh-keyscan -t rsa 127.0.0.1 2>/dev/null | grep -v "\\^#" | ' +
'cut -d" " -f3 | base64 -d | sha1sum -b | cut -d" " -f1', 'cut -d" " -f3 | base64 -d | sha1sum -b | cut -d" " -f1',
shell=True).rstrip() shell=True).rstrip().decode('ascii')
vm.launch() vm.launch()
blockdev_create(vm, { 'driver': 'ssh', blockdev_create(vm, { 'driver': 'ssh',

View File

@ -1,9 +1,9 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}}
file format: IMGFMT file format: IMGFMT
@ -16,49 +16,49 @@ virtual size: 4.0M (4194304 bytes)
=== Test host-key-check options === === Test host-key-check options ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 8388608}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 8388608}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}}
file format: IMGFMT file format: IMGFMT
virtual size: 8.0M (8388608 bytes) virtual size: 8.0M (8388608 bytes)
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'known_hosts'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "known_hosts"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}}
file format: IMGFMT file format: IMGFMT
virtual size: 4.0M (4194304 bytes) virtual size: 4.0M (4194304 bytes)
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': 'wrong', 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 2097152}}}
{u'return': {}} {"return": {}}
Job failed: remote host key does not match host_key_check 'wrong' Job failed: remote host key does not match host_key_check 'wrong'
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': HASH, 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 8388608}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": HASH, "mode": "hash", "type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 8388608}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}}
file format: IMGFMT file format: IMGFMT
virtual size: 8.0M (8388608 bytes) virtual size: 8.0M (8388608 bytes)
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': 'wrong', 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 2097152}}}
{u'return': {}} {"return": {}}
Job failed: remote host key does not match host_key_check 'wrong' Job failed: remote host key does not match host_key_check 'wrong'
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': HASH, 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": HASH, "mode": "hash", "type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}}
file format: IMGFMT file format: IMGFMT
@ -66,15 +66,15 @@ virtual size: 4.0M (4194304 bytes)
=== Invalid path and user === === Invalid path and user ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': '/this/is/not/an/existing/path', 'host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "/this/is/not/an/existing/path", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}}
{u'return': {}} {"return": {}}
Job failed: failed to open remote file '/this/is/not/an/existing/path': Failed opening remote file (libssh2 error code: -31) Job failed: failed to open remote file '/this/is/not/an/existing/path': Failed opening remote file (libssh2 error code: -31)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'none'}, 'user': 'invalid user', 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}, "user": "invalid user"}, "size": 4194304}}}
{u'return': {}} {"return": {}}
Job failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent Job failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}

View File

@ -1,9 +1,9 @@
Launching VM... Launching VM...
Starting NBD server... Starting NBD server...
{u'return': {}} {"return": {}}
Adding NBD export... Adding NBD export...
{u'return': {}} {"return": {}}
Creating external snapshot... Creating external snapshot...
{u'return': {}} {"return": {}}
Stopping NBD server... Stopping NBD server...
{u'return': {}} {"return": {}}

View File

@ -1,16 +1,16 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}} {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "node_name": "imgfile"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'imgfile', 'size': 134217728}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "imgfile", "iter-time": 10, "key-secret": "keysec0", "size": 134217728}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
file format: IMGFMT file format: IMGFMT
@ -54,15 +54,15 @@ Format specific information:
=== Successful image creation (with non-default options) === === Successful image creation (with non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'hash-alg': 'sha1', 'cipher-mode': 'ctr', 'cipher-alg': 'twofish-128', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}, 'iter-time': 10, 'ivgen-alg': 'plain64', 'ivgen-hash-alg': 'md5', 'driver': 'luks', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cipher-alg": "twofish-128", "cipher-mode": "ctr", "driver": "luks", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.luks"}, "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-alg": "md5", "key-secret": "keysec0", "size": 67108864}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
file format: IMGFMT file format: IMGFMT
@ -106,18 +106,18 @@ Format specific information:
=== Invalid BlockdevRef === === Invalid BlockdevRef ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'luks', 'file': "this doesn't exist", 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "this doesn't exist", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Zero size === === Zero size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'node0', 'size': 0}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "iter-time": 10, "key-secret": "keysec0", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
file format: IMGFMT file format: IMGFMT
@ -161,34 +161,34 @@ Format specific information:
=== Invalid sizes === === Invalid sizes ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 18446744073709551104L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 18446744073709551104}}}
{u'return': {}} {"return": {}}
Job failed: The requested file size is too large Job failed: The requested file size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223372036854775808L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775808}}}
{u'return': {}} {"return": {}}
Job failed: The requested file size is too large Job failed: The requested file size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223372036854775296}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775296}}}
{u'return': {}} {"return": {}}
Job failed: The requested file size is too large Job failed: The requested file size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Resize image with invalid sizes === === Resize image with invalid sizes ===
{'execute': 'block_resize', 'arguments': {'size': 9223372036854775296, 'node_name': 'node1'}} {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 9223372036854775296}}
{u'error': {u'class': u'GenericError', u'desc': u'The requested file size is too large'}} {"error": {"class": "GenericError", "desc": "The requested file size is too large"}}
{'execute': 'block_resize', 'arguments': {'size': 9223372036854775808L, 'node_name': 'node1'}} {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 9223372036854775808}}
{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type for 'size', expected: integer"}} {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
{'execute': 'block_resize', 'arguments': {'size': 18446744073709551104L, 'node_name': 'node1'}} {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 18446744073709551104}}
{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type for 'size', expected: integer"}} {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
{'execute': 'block_resize', 'arguments': {'size': -9223372036854775808, 'node_name': 'node1'}} {"execute": "block_resize", "arguments": {"node_name": "node1", "size": -9223372036854775808}}
{u'error': {u'class': u'GenericError', u'desc': u"Parameter 'size' expects a >0 size"}} {"error": {"class": "GenericError", "desc": "Parameter 'size' expects a >0 size"}}
image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
file format: IMGFMT file format: IMGFMT
virtual size: 0 (0 bytes) virtual size: 0 (0 bytes)

View File

@ -1,16 +1,16 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}} {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "node_name": "imgfile"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'imgfile', 'size': 134217728}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "imgfile", "size": 134217728}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -21,15 +21,15 @@ cluster_size: 1048576
=== Successful image creation (explicit defaults) === === Successful image creation (explicit defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'preallocation': 'off', 'driver': 'vdi', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}, 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "off", "size": 67108864}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -40,15 +40,15 @@ cluster_size: 1048576
=== Successful image creation (with non-default options) === === Successful image creation (with non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'preallocation': 'metadata', 'driver': 'vdi', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vdi'}, 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "metadata", "size": 33554432}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -60,18 +60,18 @@ cluster_size: 1048576
=== Invalid BlockdevRef === === Invalid BlockdevRef ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': "this doesn't exist", 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "this doesn't exist", "size": 33554432}}}
{u'return': {}} {"return": {}}
Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Zero size === === Zero size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'node0', 'size': 0}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -80,10 +80,10 @@ cluster_size: 1048576
=== Maximum size === === Maximum size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'node0', 'size': 562949819203584}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203584}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -92,21 +92,21 @@ cluster_size: 1048576
=== Invalid sizes === === Invalid sizes ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'node0', 'size': 18446744073709551104L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 18446744073709551104}}}
{u'return': {}} {"return": {}}
Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max supported is 0x1fffff8000000) Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max supported is 0x1fffff8000000)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'node0', 'size': 9223372036854775808L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 9223372036854775808}}}
{u'return': {}} {"return": {}}
Job failed: Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000) Job failed: Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vdi', 'file': 'node0', 'size': 562949819203585}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203585}}}
{u'return': {}} {"return": {}}
Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000) Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000)
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}

View File

@ -1,16 +1,16 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}} {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels", "node_name": "imgfile"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'imgfile', 'size': 134217728}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "imgfile", "size": 134217728}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -18,15 +18,15 @@ virtual size: 128M (134217728 bytes)
=== Successful image creation (explicit defaults) === === Successful image creation (explicit defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1048576, 'driver': 'parallels', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 1048576, "driver": "parallels", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels"}, "size": 67108864}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -34,15 +34,15 @@ virtual size: 64M (67108864 bytes)
=== Successful image creation (with non-default options) === === Successful image creation (with non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 65536, 'driver': 'parallels', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 65536, "driver": "parallels", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.parallels"}, "size": 33554432}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -50,18 +50,18 @@ virtual size: 32M (33554432 bytes)
=== Invalid BlockdevRef === === Invalid BlockdevRef ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': "this doesn't exist", 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "this doesn't exist", "size": 33554432}}}
{u'return': {}} {"return": {}}
Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Zero size === === Zero size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 0}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -69,10 +69,10 @@ virtual size: 0 (0 bytes)
=== Maximum size === === Maximum size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 4503599627369984}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 4503599627369984}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -80,77 +80,77 @@ virtual size: 4096T (4503599627369984 bytes)
=== Invalid sizes === === Invalid sizes ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 1234}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 1234}}}
{u'return': {}} {"return": {}}
Job failed: Image size must be a multiple of 512 bytes Job failed: Image size must be a multiple of 512 bytes
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 18446744073709551104L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 18446744073709551104}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775808L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 9223372036854775808}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775296}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 9223372036854775296}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 4503599627370497}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "parallels", "file": "node0", "size": 4503599627370497}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid cluster size === === Invalid cluster size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1234, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 1234, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a multiple of 512 bytes Job failed: Cluster size must be a multiple of 512 bytes
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 128, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 128, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size must be a multiple of 512 bytes Job failed: Cluster size must be a multiple of 512 bytes
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 4294967296, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 4294967296, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size is too large Job failed: Cluster size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 9223372036854775808L, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 9223372036854775808, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size is too large Job failed: Cluster size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 18446744073709551104L, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 18446744073709551104, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Cluster size is too large Job failed: Cluster size is too large
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 0, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 0, "driver": "parallels", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'driver': 'parallels', 'file': 'node0', 'size': 281474976710656}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cluster-size": 512, "driver": "parallels", "file": "node0", "size": 281474976710656}}}
{u'return': {}} {"return": {}}
Job failed: Image size is too large for this cluster size Job failed: Image size is too large for this cluster size
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}

View File

@ -1,16 +1,16 @@
=== Successful image creation (defaults) === === Successful image creation (defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}} {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx", "node_name": "imgfile"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'imgfile', 'size': 134217728}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "imgfile", "size": 134217728}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -19,15 +19,15 @@ cluster_size: 8388608
=== Successful image creation (explicit defaults) === === Successful image creation (explicit defaults) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'block-size': 8388608, 'driver': 'vhdx', 'subformat': 'dynamic', 'log-size': 1048576, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}, 'block-state-zero': True, 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 8388608, "block-state-zero": true, "driver": "vhdx", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx"}, "log-size": 1048576, "size": 67108864, "subformat": "dynamic"}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -36,15 +36,15 @@ cluster_size: 8388608
=== Successful image creation (with non-default options) === === Successful image creation (with non-default options) ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'block-size': 268435456, 'driver': 'vhdx', 'subformat': 'fixed', 'log-size': 8388608, 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.vhdx'}, 'block-state-zero': False, 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 268435456, "block-state-zero": false, "driver": "vhdx", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vhdx"}, "log-size": 8388608, "size": 33554432, "subformat": "fixed"}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -53,18 +53,18 @@ cluster_size: 268435456
=== Invalid BlockdevRef === === Invalid BlockdevRef ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': "this doesn't exist", 'size': 33554432}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "this doesn't exist", "size": 33554432}}}
{u'return': {}} {"return": {}}
Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Zero size === === Zero size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 0}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 0}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -73,10 +73,10 @@ cluster_size: 8388608
=== Maximum size === === Maximum size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177664}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 70368744177664}}}
{u'return': {}} {"return": {}}
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
image: TEST_IMG image: TEST_IMG
file format: IMGFMT file format: IMGFMT
@ -85,85 +85,85 @@ cluster_size: 67108864
=== Invalid sizes === === Invalid sizes ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 18446744073709551104L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 18446744073709551104}}}
{u'return': {}} {"return": {}}
Job failed: Image size too large; max of 64TB Job failed: Image size too large; max of 64TB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775808L}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 9223372036854775808}}}
{u'return': {}} {"return": {}}
Job failed: Image size too large; max of 64TB Job failed: Image size too large; max of 64TB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 9223372036854775296}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 9223372036854775296}}}
{u'return': {}} {"return": {}}
Job failed: Image size too large; max of 64TB Job failed: Image size too large; max of 64TB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'file': 'node0', 'size': 70368744177665}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "size": 70368744177665}}}
{u'return': {}} {"return": {}}
Job failed: Image size too large; max of 64TB Job failed: Image size too large; max of 64TB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid block size === === Invalid block size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'block-size': 1234567, 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 1234567, "driver": "vhdx", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Block size must be a multiple of 1 MB Job failed: Block size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'block-size': 128, 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 128, "driver": "vhdx", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Block size must be a multiple of 1 MB Job failed: Block size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'block-size': 3145728, 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 3145728, "driver": "vhdx", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Block size must be a power of two Job failed: Block size must be a power of two
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'block-size': 536870912, 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 536870912, "driver": "vhdx", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Block size must not exceed 268435456 Job failed: Block size must not exceed 268435456
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'vhdx', 'block-size': 0, 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"block-size": 0, "driver": "vhdx", "file": "node0", "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Block size must be a multiple of 1 MB Job failed: Block size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
=== Invalid log size === === Invalid log size ===
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'log-size': 1234567, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "log-size": 1234567, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Log size must be a multiple of 1 MB Job failed: Log size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'log-size': 128, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "log-size": 128, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Log size must be a multiple of 1 MB Job failed: Log size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'log-size': 4294967296, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "log-size": 4294967296, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Log size must be smaller than 4 GB Job failed: Log size must be smaller than 4 GB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'log-size': 0, 'driver': 'vhdx', 'file': 'node0', 'size': 67108864}}} {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vhdx", "file": "node0", "log-size": 0, "size": 67108864}}}
{u'return': {}} {"return": {}}
Job failed: Log size must be a multiple of 1 MB Job failed: Log size must be a multiple of 1 MB
{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} {"execute": "job-dismiss", "arguments": {"id": "job0"}}
{u'return': {}} {"return": {}}

View File

@ -7,8 +7,8 @@ Done
--- Doing COR --- --- Doing COR ---
{u'return': {}} {"return": {}}
{u'return': u''} {"return": ""}
--- Checking COR result --- --- Checking COR result ---

View File

@ -4,27 +4,27 @@
--- force=false --- --- force=false ---
Cancelling job Cancelling job
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 65536, u'len': 1048576, u'offset': 65536}, u'event': u'BLOCK_JOB_CANCELLED'} {"data": {"device": "mirror", "len": 1048576, "offset": 65536, "speed": 65536, "type": "mirror"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
--- force=true --- --- force=true ---
Cancelling job Cancelling job
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 65536, u'len': 1048576, u'offset': 65536}, u'event': u'BLOCK_JOB_CANCELLED'} {"data": {"device": "mirror", "len": 1048576, "offset": 65536, "speed": 65536, "type": "mirror"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
=== Cancel mirror job after convergence === === Cancel mirror job after convergence ===
--- force=false --- --- force=false ---
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 0, u'len': 1048576, u'offset': 1048576}, u'event': u'BLOCK_JOB_READY'} {"data": {"device": "mirror", "len": 1048576, "offset": 1048576, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Cancelling job Cancelling job
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 0, u'len': 1048576, u'offset': 1048576}, u'event': u'BLOCK_JOB_COMPLETED'} {"data": {"device": "mirror", "len": 1048576, "offset": 1048576, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
--- force=true --- --- force=true ---
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 0, u'len': 1048576, u'offset': 1048576}, u'event': u'BLOCK_JOB_READY'} {"data": {"device": "mirror", "len": 1048576, "offset": 1048576, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Cancelling job Cancelling job
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'mirror', u'type': u'mirror', u'speed': 0, u'len': 1048576, u'offset': 1048576}, u'event': u'BLOCK_JOB_CANCELLED'} {"data": {"device": "mirror", "len": 1048576, "offset": 1048576, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}

View File

@ -2,326 +2,326 @@ Launching VM...
Starting block job: drive-mirror (auto-finalize: True; auto-dismiss: True) Starting block job: drive-mirror (auto-finalize: True; auto-dismiss: True)
{u'return': {}} {"return": {}}
{u'return': [{u'status': u'running', u'current-progress': 'FILTERED', u'total-progress': 'FILTERED', u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": "FILTERED", "id": "job0", "status": "running", "total-progress": "FILTERED", "type": "mirror"}]}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'created', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "created"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Pause/resume in RUNNING Pause/resume in RUNNING
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 65536, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 65536, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "running", "total-progress": 4194304, "type": "mirror"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "running", "total-progress": 4194304, "type": "mirror"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "running", "total-progress": 4194304, "type": "mirror"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 327680, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 327680, "id": "job0", "status": "running", "total-progress": 4194304, "type": "mirror"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for READY state... Waiting for READY state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'ready', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "ready"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'ready', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "ready", "total-progress": 4194304, "type": "mirror"}]}
Pause/resume in READY Pause/resume in READY
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'standby', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "standby"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'standby', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "standby", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'ready', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "ready"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'ready', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "ready", "total-progress": 4194304, "type": "mirror"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'standby', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "standby"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'standby', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "standby", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'ready', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "ready"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'ready', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "ready", "total-progress": 4194304, "type": "mirror"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'standby', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "standby"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'standby', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "standby", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'ready', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "ready"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'ready', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "ready", "total-progress": 4194304, "type": "mirror"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'standby', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "standby"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'standby', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "standby", "total-progress": 4194304, "type": "mirror"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'ready', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "ready"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'ready', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'mirror'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "ready", "total-progress": 4194304, "type": "mirror"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'ready' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'ready' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'ready' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'ready' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'ready' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'ready' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'ready' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'ready' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for PENDING state... Waiting for PENDING state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'waiting', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "waiting"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'pending', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "pending"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'concluded', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "concluded"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'null', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "null"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': []} {"return": []}
Starting block job: drive-backup (auto-finalize: True; auto-dismiss: True) Starting block job: drive-backup (auto-finalize: True; auto-dismiss: True)
{u'return': {}} {"return": {}}
{u'return': [{u'status': u'running', u'current-progress': 'FILTERED', u'total-progress': 'FILTERED', u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": "FILTERED", "id": "job0", "status": "running", "total-progress": "FILTERED", "type": "backup"}]}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'created', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "created"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Pause/resume in RUNNING Pause/resume in RUNNING
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 65536, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 65536, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 327680, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 327680, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for PENDING state... Waiting for PENDING state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'waiting', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "waiting"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'pending', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "pending"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'concluded', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "concluded"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'null', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "null"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': []} {"return": []}
Starting block job: drive-backup (auto-finalize: True; auto-dismiss: False) Starting block job: drive-backup (auto-finalize: True; auto-dismiss: False)
{u'return': {}} {"return": {}}
{u'return': [{u'status': u'running', u'current-progress': 'FILTERED', u'total-progress': 'FILTERED', u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": "FILTERED", "id": "job0", "status": "running", "total-progress": "FILTERED", "type": "backup"}]}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'created', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "created"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Pause/resume in RUNNING Pause/resume in RUNNING
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 65536, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 65536, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 327680, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 327680, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for PENDING state... Waiting for PENDING state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'waiting', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "waiting"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'pending', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "pending"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'concluded', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "concluded"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'concluded', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "concluded", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'null', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "null"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': []} {"return": []}
Starting block job: drive-backup (auto-finalize: False; auto-dismiss: True) Starting block job: drive-backup (auto-finalize: False; auto-dismiss: True)
{u'return': {}} {"return": {}}
{u'return': [{u'status': u'running', u'current-progress': 'FILTERED', u'total-progress': 'FILTERED', u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": "FILTERED", "id": "job0", "status": "running", "total-progress": "FILTERED", "type": "backup"}]}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'created', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "created"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Pause/resume in RUNNING Pause/resume in RUNNING
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 65536, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 65536, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 327680, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 327680, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for PENDING state... Waiting for PENDING state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'waiting', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "waiting"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'pending', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "pending"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'pending', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "pending", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'concluded', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "concluded"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'null', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "null"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': []} {"return": []}
Starting block job: drive-backup (auto-finalize: False; auto-dismiss: False) Starting block job: drive-backup (auto-finalize: False; auto-dismiss: False)
{u'return': {}} {"return": {}}
{u'return': [{u'status': u'running', u'current-progress': 'FILTERED', u'total-progress': 'FILTERED', u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": "FILTERED", "id": "job0", "status": "running", "total-progress": "FILTERED", "type": "backup"}]}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'created', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "created"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Pause/resume in RUNNING Pause/resume in RUNNING
=== Testing block-job-pause/block-job-resume === === Testing block-job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 65536, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 65536, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing block-job-pause/job-resume === === Testing block-job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 131072, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 131072, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/block-job-resume === === Testing job-pause/block-job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 196608, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 196608, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
=== Testing job-pause/job-resume === === Testing job-pause/job-resume ===
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'paused', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "paused"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'paused', u'current-progress': 262144, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 262144, "id": "job0", "status": "paused", "total-progress": 4194304, "type": "backup"}]}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'running', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "running"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'running', u'current-progress': 327680, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 327680, "id": "job0", "status": "running", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'running' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
Waiting for PENDING state... Waiting for PENDING state...
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'waiting', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "waiting"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'pending', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "pending"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'pending', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "pending", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'pending' cannot accept command verb 'dismiss'"}}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'concluded', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "concluded"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': [{u'status': u'concluded', u'current-progress': 4194304, u'total-progress': 4194304, u'id': u'job0', u'type': u'backup'}]} {"return": [{"current-progress": 4194304, "id": "job0", "status": "concluded", "total-progress": 4194304, "type": "backup"}]}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'pause'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'complete'"}}
{u'error': {u'class': u'GenericError', u'desc': u"Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}} {"error": {"class": "GenericError", "desc": "Job 'job0' in state 'concluded' cannot accept command verb 'finalize'"}}
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'status': u'null', u'id': u'job0'}, u'event': u'JOB_STATUS_CHANGE'} {"data": {"id": "job0", "status": "null"}, "event": "JOB_STATUS_CHANGE", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': []} {"return": []}

View File

@ -8,13 +8,13 @@ Done
--- Setting up Fleecing Graph --- --- Setting up Fleecing Graph ---
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
--- Setting up NBD Export --- --- Setting up NBD Export ---
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
--- Sanity Check --- --- Sanity Check ---
@ -29,13 +29,13 @@ read -P0 0x3fe0000 64k
--- Testing COW --- --- Testing COW ---
write -P0xab 0 64k write -P0xab 0 64k
{u'return': u''} {"return": ""}
write -P0xad 0x00f8000 64k write -P0xad 0x00f8000 64k
{u'return': u''} {"return": ""}
write -P0x1d 0x2008000 64k write -P0x1d 0x2008000 64k
{u'return': u''} {"return": ""}
write -P0xea 0x3fe0000 64k write -P0xea 0x3fe0000 64k
{u'return': u''} {"return": ""}
--- Verifying Data --- --- Verifying Data ---
@ -49,10 +49,10 @@ read -P0 0x3fe0000 64k
--- Cleanup --- --- Cleanup ---
{u'return': {}} {"return": {}}
{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'drive0', u'type': u'backup', u'speed': 0, u'len': 67108864, u'offset': 393216}, u'event': u'BLOCK_JOB_CANCELLED'} {"data": {"device": "drive0", "len": 67108864, "offset": 393216, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
{u'return': {}} {"return": {}}
{u'return': {}} {"return": {}}
--- Confirming writes --- --- Confirming writes ---

View File

@ -29,6 +29,7 @@ import json
import signal import signal
import logging import logging
import atexit import atexit
import io
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts')) sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts'))
import qtest import qtest
@ -104,7 +105,8 @@ def qemu_img_pipe(*args):
'''Run qemu-img and return its output''' '''Run qemu-img and return its output'''
subp = subprocess.Popen(qemu_img_args + list(args), subp = subprocess.Popen(qemu_img_args + list(args),
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT,
universal_newlines=True)
exitcode = subp.wait() exitcode = subp.wait()
if exitcode < 0: if exitcode < 0:
sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode, ' '.join(qemu_img_args + list(args)))) sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode, ' '.join(qemu_img_args + list(args))))
@ -128,7 +130,8 @@ def qemu_io(*args):
'''Run qemu-io and return the stdout data''' '''Run qemu-io and return the stdout data'''
args = qemu_io_args + list(args) args = qemu_io_args + list(args)
subp = subprocess.Popen(args, stdout=subprocess.PIPE, subp = subprocess.Popen(args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT,
universal_newlines=True)
exitcode = subp.wait() exitcode = subp.wait()
if exitcode < 0: if exitcode < 0:
sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, ' '.join(args))) sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, ' '.join(args)))
@ -149,7 +152,8 @@ class QemuIoInteractive:
self.args = qemu_io_args + list(args) self.args = qemu_io_args + list(args)
self._p = subprocess.Popen(self.args, stdin=subprocess.PIPE, self._p = subprocess.Popen(self.args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT,
universal_newlines=True)
assert self._p.stdout.read(9) == 'qemu-io> ' assert self._p.stdout.read(9) == 'qemu-io> '
def close(self): def close(self):
@ -178,6 +182,7 @@ class QemuIoInteractive:
cmd = cmd.strip() cmd = cmd.strip()
assert cmd != 'q' and cmd != 'quit' assert cmd != 'q' and cmd != 'quit'
self._p.stdin.write(cmd + '\n') self._p.stdin.write(cmd + '\n')
self._p.stdin.flush()
return self._read_output() return self._read_output()
@ -192,10 +197,10 @@ def compare_images(img1, img2, fmt1=imgfmt, fmt2=imgfmt):
def create_image(name, size): def create_image(name, size):
'''Create a fully-allocated raw image with sector markers''' '''Create a fully-allocated raw image with sector markers'''
file = open(name, 'w') file = open(name, 'wb')
i = 0 i = 0
while i < size: while i < size:
sector = struct.pack('>l504xl', i / 512, i / 512) sector = struct.pack('>l504xl', i // 512, i // 512)
file.write(sector) file.write(sector)
i = i + 512 i = i + 512
file.close() file.close()
@ -249,7 +254,10 @@ def filter_img_info(output, filename):
def log(msg, filters=[]): def log(msg, filters=[]):
for flt in filters: for flt in filters:
msg = flt(msg) msg = flt(msg)
print(msg) if type(msg) is dict or type(msg) is list:
print(json.dumps(msg, sort_keys=True))
else:
print(msg)
class Timeout: class Timeout:
def __init__(self, seconds, errmsg = "Timeout"): def __init__(self, seconds, errmsg = "Timeout"):
@ -437,10 +445,11 @@ class VM(qtest.QEMUQtestMachine):
return result return result
def qmp_log(self, cmd, filters=[filter_testfiles], **kwargs): def qmp_log(self, cmd, filters=[filter_testfiles], **kwargs):
logmsg = "{'execute': '%s', 'arguments': %s}" % (cmd, kwargs) logmsg = '{"execute": "%s", "arguments": %s}' % \
(cmd, json.dumps(kwargs, sort_keys=True))
log(logmsg, filters) log(logmsg, filters)
result = self.qmp(cmd, **kwargs) result = self.qmp(cmd, **kwargs)
log(str(result), filters) log(json.dumps(result, sort_keys=True), filters)
return result return result
def run_job(self, job, auto_finalize=True, auto_dismiss=False): def run_job(self, job, auto_finalize=True, auto_dismiss=False):
@ -677,15 +686,19 @@ def main(supported_fmts=[], supported_oses=['linux'], supported_cache_modes=[],
verify_platform(supported_oses) verify_platform(supported_oses)
verify_cache_mode(supported_cache_modes) verify_cache_mode(supported_cache_modes)
# We need to filter out the time taken from the output so that qemu-iotest
# can reliably diff the results against master output.
import StringIO
if debug: if debug:
output = sys.stdout output = sys.stdout
verbosity = 2 verbosity = 2
sys.argv.remove('-d') sys.argv.remove('-d')
else: else:
output = StringIO.StringIO() # We need to filter out the time taken from the output so that
# qemu-iotest can reliably diff the results against master output.
if sys.version_info.major >= 3:
output = io.StringIO()
else:
# io.StringIO is for unicode strings, which is not what
# 2.x's test runner emits.
output = io.BytesIO()
logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN)) logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN))

View File

@ -48,7 +48,10 @@ import sys
import socket import socket
import struct import struct
import collections import collections
import ConfigParser if sys.version_info.major >= 3:
import configparser
else:
import ConfigParser as configparser
FAKE_DISK_SIZE = 8 * 1024 * 1024 * 1024 # 8 GB FAKE_DISK_SIZE = 8 * 1024 * 1024 * 1024 # 8 GB
@ -86,7 +89,7 @@ def recvall(sock, bufsize):
raise Exception('unexpected disconnect') raise Exception('unexpected disconnect')
chunks.append(chunk) chunks.append(chunk)
received += len(chunk) received += len(chunk)
return ''.join(chunks) return b''.join(chunks)
class Rule(object): class Rule(object):
def __init__(self, name, event, io, when): def __init__(self, name, event, io, when):
@ -112,6 +115,7 @@ class FaultInjectionSocket(object):
if rule.match(event, io): if rule.match(event, io):
if rule.when == 0 or bufsize is None: if rule.when == 0 or bufsize is None:
print('Closing connection on rule match %s' % rule.name) print('Closing connection on rule match %s' % rule.name)
self.sock.flush()
sys.exit(0) sys.exit(0)
if rule.when != -1: if rule.when != -1:
return rule.when return rule.when
@ -176,7 +180,7 @@ def handle_connection(conn, use_export):
req = read_request(conn) req = read_request(conn)
if req.type == NBD_CMD_READ: if req.type == NBD_CMD_READ:
write_reply(conn, 0, req.handle) write_reply(conn, 0, req.handle)
conn.send('\0' * req.len, event='data') conn.send(b'\0' * req.len, event='data')
elif req.type == NBD_CMD_WRITE: elif req.type == NBD_CMD_WRITE:
_ = conn.recv(req.len, event='data') _ = conn.recv(req.len, event='data')
write_reply(conn, 0, req.handle) write_reply(conn, 0, req.handle)
@ -224,7 +228,7 @@ def parse_config(config):
return rules return rules
def load_rules(filename): def load_rules(filename):
config = ConfigParser.RawConfigParser() config = configparser.RawConfigParser()
with open(filename, 'rt') as f: with open(filename, 'rt') as f:
config.readfp(f, filename) config.readfp(f, filename)
return parse_config(config) return parse_config(config)

View File

@ -10,7 +10,7 @@ class QcowHeaderExtension:
def __init__(self, magic, length, data): def __init__(self, magic, length, data):
if length % 8 != 0: if length % 8 != 0:
padding = 8 - (length % 8) padding = 8 - (length % 8)
data += "\0" * padding data += b"\0" * padding
self.magic = magic self.magic = magic
self.length = length self.length = length
@ -103,7 +103,7 @@ class QcowHeader:
fd.seek(self.header_length) fd.seek(self.header_length)
extensions = self.extensions extensions = self.extensions
extensions.append(QcowHeaderExtension(0, 0, "")) extensions.append(QcowHeaderExtension(0, 0, b""))
for ex in extensions: for ex in extensions:
buf = struct.pack('>II', ex.magic, ex.length) buf = struct.pack('>II', ex.magic, ex.length)
fd.write(buf) fd.write(buf)
@ -137,8 +137,8 @@ class QcowHeader:
for ex in self.extensions: for ex in self.extensions:
data = ex.data[:ex.length] data = ex.data[:ex.length]
if all(c in string.printable for c in data): if all(c in string.printable.encode('ascii') for c in data):
data = "'%s'" % data data = "'%s'" % data.decode('ascii')
else: else:
data = "<binary>" data = "<binary>"
@ -178,7 +178,7 @@ def cmd_add_header_ext(fd, magic, data):
sys.exit(1) sys.exit(1)
h = QcowHeader(fd) h = QcowHeader(fd)
h.extensions.append(QcowHeaderExtension.create(magic, data)) h.extensions.append(QcowHeaderExtension.create(magic, data.encode('ascii')))
h.update(fd) h.update(fd)
def cmd_add_header_ext_stdio(fd, magic): def cmd_add_header_ext_stdio(fd, magic):

View File

@ -80,7 +80,7 @@ class QED(object):
def load_l1_table(self): def load_l1_table(self):
self.l1_table = self.read_table(self.header['l1_table_offset']) self.l1_table = self.read_table(self.header['l1_table_offset'])
self.table_nelems = self.header['table_size'] * self.header['cluster_size'] / table_elem_size self.table_nelems = self.header['table_size'] * self.header['cluster_size'] // table_elem_size
def write_table(self, offset, table): def write_table(self, offset, table):
s = ''.join(pack_table_elem(x) for x in table) s = ''.join(pack_table_elem(x) for x in table)
@ -167,14 +167,14 @@ def cmd_zero_cluster(qed, pos, *args):
n = int(args[0]) n = int(args[0])
for i in xrange(n): for i in xrange(n):
l1_index = pos / qed.header['cluster_size'] / len(qed.l1_table) l1_index = pos // qed.header['cluster_size'] // len(qed.l1_table)
if qed.l1_table[l1_index] == 0: if qed.l1_table[l1_index] == 0:
err('no l2 table allocated') err('no l2 table allocated')
l2_offset = qed.l1_table[l1_index] l2_offset = qed.l1_table[l1_index]
l2_table = qed.read_table(l2_offset) l2_table = qed.read_table(l2_offset)
l2_index = (pos / qed.header['cluster_size']) % len(qed.l1_table) l2_index = (pos // qed.header['cluster_size']) % len(qed.l1_table)
l2_table[l2_index] = 1 # zero the data cluster l2_table[l2_index] = 1 # zero the data cluster
qed.write_table(l2_offset, l2_table) qed.write_table(l2_offset, l2_table)
pos += qed.header['cluster_size'] pos += qed.header['cluster_size']

4
tests/requirements.txt Normal file
View File

@ -0,0 +1,4 @@
# Add Python module requirements, one per line, to be installed
# in the tests/venv Python virtual environment. For more info,
# refer to: https://pip.pypa.io/en/stable/user_guide/#id1
avocado-framework==65.0