aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py23
-rw-r--r--tests/acceptance/multiprocess.py95
-rw-r--r--tests/acceptance/pc_cpu_hotplug_props.py2
-rw-r--r--tests/acceptance/x86_cpu_model_versions.py2
-rw-r--r--tests/migration/guestperf/engine.py25
-rw-r--r--tests/plugin/meson.build2
-rw-r--r--tests/plugin/syscall.c49
-rwxr-xr-xtests/qemu-iotests/0514
-rw-r--r--tests/qemu-iotests/051.pc.out20
-rwxr-xr-xtests/qemu-iotests/1244
-rwxr-xr-xtests/qemu-iotests/1812
-rw-r--r--tests/qemu-iotests/184.out6
-rw-r--r--tests/qemu-iotests/191.out48
-rwxr-xr-xtests/qemu-iotests/1944
-rw-r--r--tests/qemu-iotests/194.out4
-rw-r--r--tests/qemu-iotests/226.out10
-rwxr-xr-xtests/qemu-iotests/2362
-rw-r--r--tests/qemu-iotests/236.out42
-rwxr-xr-xtests/qemu-iotests/2463
-rw-r--r--tests/qemu-iotests/246.out66
-rwxr-xr-xtests/qemu-iotests/2542
-rw-r--r--tests/qemu-iotests/254.out9
-rw-r--r--tests/qemu-iotests/257.out378
-rwxr-xr-xtests/qemu-iotests/2605
-rw-r--r--tests/qemu-iotests/273.out15
-rwxr-xr-xtests/qemu-iotests/tests/migrate-bitmaps-postcopy-test6
-rw-r--r--tests/qtest/migration-test.c48
-rw-r--r--tests/qtest/numa-test.c6
-rw-r--r--tests/qtest/qmp-test.c6
-rw-r--r--tests/qtest/test-hmp.c6
-rw-r--r--tests/qtest/test-x86-cpuid-compat.c4
-rw-r--r--tests/qtest/vhost-user-test.c8
32 files changed, 407 insertions, 499 deletions
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index df167b1..83b1741 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -93,11 +93,12 @@ def _console_interaction(test, success_message, failure_message,
if not msg:
continue
console_logger.debug(msg)
- if success_message in msg:
+ if success_message is None or success_message in msg:
break
if failure_message and failure_message in msg:
console.close()
- fail = 'Failure message found in console: %s' % failure_message
+ fail = 'Failure message found in console: "%s". Expected: "%s"' % \
+ (failure_message, success_message)
test.fail(fail)
def interrupt_interactive_console_until_pattern(test, success_message,
@@ -139,6 +140,18 @@ def wait_for_console_pattern(test, success_message, failure_message=None,
"""
_console_interaction(test, success_message, failure_message, None, vm=vm)
+def exec_command(test, command):
+ """
+ Send a command to a console (appending CRLF characters), while logging
+ the content.
+
+ :param test: an Avocado test containing a VM.
+ :type test: :class:`avocado_qemu.Test`
+ :param command: the command to send
+ :type command: str
+ """
+ _console_interaction(test, None, None, command + '\r')
+
def exec_command_and_wait_for_pattern(test, command,
success_message, failure_message=None):
"""
@@ -304,8 +317,10 @@ class LinuxTest(Test):
try:
cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
self.phone_home_port = network.find_free_port()
- with open(ssh_pubkey) as pubkey:
- pubkey_content = pubkey.read()
+ pubkey_content = None
+ if ssh_pubkey:
+ with open(ssh_pubkey) as pubkey:
+ pubkey_content = pubkey.read()
cloudinit.iso(cloudinit_iso, self.name,
username='root',
password='password',
diff --git a/tests/acceptance/multiprocess.py b/tests/acceptance/multiprocess.py
new file mode 100644
index 0000000..96627f0
--- /dev/null
+++ b/tests/acceptance/multiprocess.py
@@ -0,0 +1,95 @@
+# Test for multiprocess qemu
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+
+import os
+import socket
+
+from avocado_qemu import Test
+from avocado_qemu import wait_for_console_pattern
+from avocado_qemu import exec_command
+from avocado_qemu import exec_command_and_wait_for_pattern
+
+class Multiprocess(Test):
+ """
+ :avocado: tags=multiprocess
+ """
+ KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
+
+ def do_test(self, kernel_url, initrd_url, kernel_command_line,
+ machine_type):
+ """Main test method"""
+ self.require_accelerator('kvm')
+
+ # Create socketpair to connect proxy and remote processes
+ proxy_sock, remote_sock = socket.socketpair(socket.AF_UNIX,
+ socket.SOCK_STREAM)
+ os.set_inheritable(proxy_sock.fileno(), True)
+ os.set_inheritable(remote_sock.fileno(), True)
+
+ kernel_path = self.fetch_asset(kernel_url)
+ initrd_path = self.fetch_asset(initrd_url)
+
+ # Create remote process
+ remote_vm = self.get_vm()
+ remote_vm.add_args('-machine', 'x-remote')
+ remote_vm.add_args('-nodefaults')
+ remote_vm.add_args('-device', 'lsi53c895a,id=lsi1')
+ remote_vm.add_args('-object', 'x-remote-object,id=robj1,'
+ 'devid=lsi1,fd='+str(remote_sock.fileno()))
+ remote_vm.launch()
+
+ # Create proxy process
+ self.vm.set_console()
+ self.vm.add_args('-machine', machine_type)
+ self.vm.add_args('-accel', 'kvm')
+ self.vm.add_args('-cpu', 'host')
+ self.vm.add_args('-object',
+ 'memory-backend-memfd,id=sysmem-file,size=2G')
+ self.vm.add_args('--numa', 'node,memdev=sysmem-file')
+ self.vm.add_args('-m', '2048')
+ self.vm.add_args('-kernel', kernel_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line)
+ self.vm.add_args('-device',
+ 'x-pci-proxy-dev,'
+ 'id=lsi1,fd='+str(proxy_sock.fileno()))
+ self.vm.launch()
+ wait_for_console_pattern(self, 'as init process',
+ 'Kernel panic - not syncing')
+ exec_command(self, 'mount -t sysfs sysfs /sys')
+ exec_command_and_wait_for_pattern(self,
+ 'cat /sys/bus/pci/devices/*/uevent',
+ 'PCI_ID=1000:0012')
+
+ def test_multiprocess_x86_64(self):
+ """
+ :avocado: tags=arch:x86_64
+ """
+ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+ '/linux/releases/31/Everything/x86_64/os/images'
+ '/pxeboot/vmlinuz')
+ initrd_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+ '/linux/releases/31/Everything/x86_64/os/images'
+ '/pxeboot/initrd.img')
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0 rdinit=/bin/bash')
+ machine_type = 'pc'
+ self.do_test(kernel_url, initrd_url, kernel_command_line, machine_type)
+
+ def test_multiprocess_aarch64(self):
+ """
+ :avocado: tags=arch:aarch64
+ """
+ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+ '/linux/releases/31/Everything/aarch64/os/images'
+ '/pxeboot/vmlinuz')
+ initrd_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+ '/linux/releases/31/Everything/aarch64/os/images'
+ '/pxeboot/initrd.img')
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'rdinit=/bin/bash console=ttyAMA0')
+ machine_type = 'virt,gic-version=3'
+ self.do_test(kernel_url, initrd_url, kernel_command_line, machine_type)
diff --git a/tests/acceptance/pc_cpu_hotplug_props.py b/tests/acceptance/pc_cpu_hotplug_props.py
index e49bf33..f48f68f 100644
--- a/tests/acceptance/pc_cpu_hotplug_props.py
+++ b/tests/acceptance/pc_cpu_hotplug_props.py
@@ -32,4 +32,4 @@ class OmittedCPUProps(Test):
self.vm.add_args('-cpu', 'qemu64')
self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0')
self.vm.launch()
- self.assertEquals(len(self.vm.command('query-cpus')), 2)
+ self.assertEquals(len(self.vm.command('query-cpus-fast')), 2)
diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/x86_cpu_model_versions.py
index 2b7461b..77ed859 100644
--- a/tests/acceptance/x86_cpu_model_versions.py
+++ b/tests/acceptance/x86_cpu_model_versions.py
@@ -246,7 +246,7 @@ class CascadelakeArchCapabilities(avocado_qemu.Test):
:avocado: tags=arch:x86_64
"""
def get_cpu_prop(self, prop):
- cpu_path = self.vm.command('query-cpus')[0].get('qom_path')
+ cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path')
return self.vm.command('qom-get', path=cpu_path, property=prop)
def test_4_1(self):
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
index 83bfc3b..e399447 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -110,7 +110,7 @@ class Engine(object):
src_vcpu_time = []
src_pid = src.get_pid()
- vcpus = src.command("query-cpus")
+ vcpus = src.command("query-cpus-fast")
src_threads = []
for vcpu in vcpus:
src_threads.append(vcpu["thread_id"])
@@ -149,11 +149,11 @@ class Engine(object):
"state": True }
])
- resp = src.command("migrate_set_speed",
- value=scenario._bandwidth * 1024 * 1024)
+ resp = src.command("migrate-set-parameters",
+ max_bandwidth=scenario._bandwidth * 1024 * 1024)
- resp = src.command("migrate_set_downtime",
- value=scenario._downtime / 1024.0)
+ resp = src.command("migrate-set-parameters",
+ downtime_limit=scenario._downtime / 1024.0)
if scenario._compression_mt:
resp = src.command("migrate-set-capabilities",
@@ -182,9 +182,11 @@ class Engine(object):
{ "capability": "xbzrle",
"state": True }
])
- resp = src.command("migrate-set-cache-size",
- value=(hardware._mem * 1024 * 1024 * 1024 / 100 *
- scenario._compression_xbzrle_cache))
+ resp = src.command("migrate-set-parameters",
+ xbzrle_cache_size=(
+ hardware._mem *
+ 1024 * 1024 * 1024 / 100 *
+ scenario._compression_xbzrle_cache))
resp = src.command("migrate", uri=connect_uri)
@@ -407,6 +409,13 @@ class Engine(object):
vcpu_timings = ret[2]
if uri[0:5] == "unix:":
os.remove(uri[5:])
+
+ if os.path.exists(srcmonaddr):
+ os.remove(srcmonaddr)
+
+ if self._dst_host == "localhost" and os.path.exists(dstmonaddr):
+ os.remove(dstmonaddr)
+
if self._verbose:
print("Finished migration")
diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build
index 1eacfa6..2bbfc4b 100644
--- a/tests/plugin/meson.build
+++ b/tests/plugin/meson.build
@@ -1,5 +1,5 @@
t = []
-foreach i : ['bb', 'empty', 'insn', 'mem']
+foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall']
t += shared_module(i, files(i + '.c'),
include_directories: '../../include/qemu',
dependencies: glib)
diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c
new file mode 100644
index 0000000..53ee2ab
--- /dev/null
+++ b/tests/plugin/syscall.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020, Matthias Weckbecker <matthias@weckbecker.name>
+ *
+ * License: GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <inttypes.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <glib.h>
+
+#include <qemu-plugin.h>
+
+QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
+
+static void vcpu_syscall(qemu_plugin_id_t id, unsigned int vcpu_index,
+ int64_t num, uint64_t a1, uint64_t a2,
+ uint64_t a3, uint64_t a4, uint64_t a5,
+ uint64_t a6, uint64_t a7, uint64_t a8)
+{
+ g_autofree gchar *out = g_strdup_printf("syscall #%" PRIi64 "\n", num);
+ qemu_plugin_outs(out);
+}
+
+static void vcpu_syscall_ret(qemu_plugin_id_t id, unsigned int vcpu_idx,
+ int64_t num, int64_t ret)
+{
+ g_autofree gchar *out;
+ out = g_strdup_printf("syscall #%" PRIi64 " returned -> %" PRIi64 "\n",
+ num, ret);
+ qemu_plugin_outs(out);
+}
+
+/* ************************************************************************* */
+
+static void plugin_exit(qemu_plugin_id_t id, void *p) {}
+
+QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
+ const qemu_info_t *info,
+ int argc, char **argv)
+{
+ qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall);
+ qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret);
+ qemu_plugin_register_atexit_cb(id, plugin_exit, NULL);
+ return 0;
+}
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 7cbd141..f92161d 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -185,9 +185,7 @@ case "$QEMU_DEFAULT_MACHINE" in
pc)
run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
- run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
- run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
;;
*)
@@ -238,9 +236,7 @@ case "$QEMU_DEFAULT_MACHINE" in
pc)
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
;;
*)
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
index f570610..a28e3fc 100644
--- a/tests/qemu-iotests/051.pc.out
+++ b/tests/qemu-iotests/051.pc.out
@@ -156,20 +156,10 @@ Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
-Testing: -drive if=none,id=disk -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
-
Testing: -drive if=none,id=disk -device ide-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
-
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
@@ -228,20 +218,10 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
-
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-quit
-
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
QEMU X.Y.Z monitor - type 'help' for more information
(qemu) quit
diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124
index 90cdbd8..845ab53 100755
--- a/tests/qemu-iotests/124
+++ b/tests/qemu-iotests/124
@@ -348,7 +348,6 @@ class TestIncrementalBackup(TestIncrementalBackupBase):
'name': 'bitmap0',
'count': 458752,
'granularity': 65536,
- 'status': 'active',
'persistent': False
}))
@@ -705,7 +704,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
drive0['id'], bitmap.name, {
'count': 458752,
'granularity': 65536,
- 'status': 'active',
'busy': False,
'recording': True
}))
@@ -736,7 +734,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
drive0['id'], bitmap.name, {
'count': 458752,
'granularity': 65536,
- 'status': 'frozen',
'busy': True,
'recording': True
}))
@@ -751,7 +748,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
drive0['id'], bitmap.name, {
'count': 0,
'granularity': 65536,
- 'status': 'active',
'busy': False,
'recording': True
}))
diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181
index 820c53e..cb96d09 100755
--- a/tests/qemu-iotests/181
+++ b/tests/qemu-iotests/181
@@ -109,7 +109,7 @@ if [ ${QEMU_STATUS[$dest]} -lt 0 ]; then
_notrun 'Postcopy is not supported'
fi
-_send_qemu_cmd $src 'migrate_set_speed 4k' "(qemu)"
+_send_qemu_cmd $src 'migrate_set_parameter max_bandwidth 4k' "(qemu)"
_send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)"
_send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)"
_send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)"
diff --git a/tests/qemu-iotests/184.out b/tests/qemu-iotests/184.out
index 87c7307..77e5489 100644
--- a/tests/qemu-iotests/184.out
+++ b/tests/qemu-iotests/184.out
@@ -54,8 +54,7 @@ Testing:
"direct": false,
"writeback": true
},
- "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"throttle\", \"file\": {\"driver\": \"null-co\"}}",
- "encryption_key_missing": false
+ "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"throttle\", \"file\": {\"driver\": \"null-co\"}}"
},
{
"iops_rd": 0,
@@ -82,8 +81,7 @@ Testing:
"direct": false,
"writeback": true
},
- "file": "null-co://",
- "encryption_key_missing": false
+ "file": "null-co://"
}
]
}
diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out
index 022021e..ea88777 100644
--- a/tests/qemu-iotests/191.out
+++ b/tests/qemu-iotests/191.out
@@ -150,8 +150,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl2",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl2"
},
{
"iops_rd": 0,
@@ -179,8 +178,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl2",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl2"
},
{
"iops_rd": 0,
@@ -221,8 +219,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
},
{
"iops_rd": 0,
@@ -250,8 +247,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
},
{
"iops_rd": 0,
@@ -292,8 +288,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.mid",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.mid"
},
{
"iops_rd": 0,
@@ -321,8 +316,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.mid",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.mid"
},
{
"iops_rd": 0,
@@ -351,8 +345,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.base",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.base"
},
{
"iops_rd": 0,
@@ -380,8 +373,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.base",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.base"
}
]
}
@@ -565,8 +557,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl2",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl2"
},
{
"iops_rd": 0,
@@ -594,8 +585,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl2",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl2"
},
{
"iops_rd": 0,
@@ -647,8 +637,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl3",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl3"
},
{
"iops_rd": 0,
@@ -676,8 +665,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.ovl3",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.ovl3"
},
{
"iops_rd": 0,
@@ -706,8 +694,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.base",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.base"
},
{
"iops_rd": 0,
@@ -735,8 +722,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.base",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.base"
},
{
"iops_rd": 0,
@@ -777,8 +763,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
},
{
"iops_rd": 0,
@@ -806,8 +791,7 @@ wrote 65536/65536 bytes at offset 1048576
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
}
]
}
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
index 3889266..e44b8df 100755
--- a/tests/qemu-iotests/194
+++ b/tests/qemu-iotests/194
@@ -95,7 +95,7 @@ with iotests.FilePath('source.img') as source_img_path, \
iotests.log(event, filters=[iotests.filter_qmp_event])
iotests.log('Check bitmaps on source:')
- iotests.log(source_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+ iotests.log(source_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
iotests.log('Check bitmaps on target:')
- iotests.log(dest_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+ iotests.log(dest_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
diff --git a/tests/qemu-iotests/194.out b/tests/qemu-iotests/194.out
index a51bdb2..4e6df15 100644
--- a/tests/qemu-iotests/194.out
+++ b/tests/qemu-iotests/194.out
@@ -24,6 +24,6 @@ Stopping the NBD server on destination...
Wait for migration completion on target...
{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
Check bitmaps on source:
-[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true, "status": "active"}]
+[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true}]
Check bitmaps on target:
-[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true, "status": "active"}]
+[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true}]
diff --git a/tests/qemu-iotests/226.out b/tests/qemu-iotests/226.out
index 42be973..55504d2 100644
--- a/tests/qemu-iotests/226.out
+++ b/tests/qemu-iotests/226.out
@@ -3,23 +3,23 @@ QA output created by 226
=== Testing with driver:file ===
== Testing RO ==
-qemu-io: can't open: A regular file was expected by the 'file' driver, but something else was given
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires 'TEST_DIR/t.IMGFMT' to be a regular file
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
== Testing RW ==
qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
=== Testing with driver:host_device ===
== Testing RO ==
-qemu-io: can't open: 'host_device' driver expects either a character or block device
+qemu-io: can't open: 'host_device' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
== Testing RW ==
qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
=== Testing with driver:host_cdrom ===
== Testing RO ==
-qemu-io: can't open: 'host_cdrom' driver expects either a character or block device
+qemu-io: can't open: 'host_cdrom' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
== Testing RW ==
qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
diff --git a/tests/qemu-iotests/236 b/tests/qemu-iotests/236
index f6c4451..20419bb 100755
--- a/tests/qemu-iotests/236
+++ b/tests/qemu-iotests/236
@@ -39,7 +39,7 @@ overwrite = [("0xab", "0", "64k"), # Full overwrite
def query_bitmaps(vm):
res = vm.qmp("query-block")
- return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+ return { "bitmaps": { device['device']: device.get('inserted', {}).get('dirty-bitmaps', []) for
device in res['return'] } }
with iotests.FilePath('img') as img_path, \
diff --git a/tests/qemu-iotests/236.out b/tests/qemu-iotests/236.out
index 815cd05..7448cee 100644
--- a/tests/qemu-iotests/236.out
+++ b/tests/qemu-iotests/236.out
@@ -27,8 +27,7 @@ write -P0xcd 0x3ff0000 64k
"granularity": 65536,
"name": "bitmapB",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -36,8 +35,7 @@ write -P0xcd 0x3ff0000 64k
"granularity": 65536,
"name": "bitmapA",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -93,8 +91,7 @@ write -P0xcd 0x3ff0000 64k
"granularity": 65536,
"name": "bitmapB",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -102,8 +99,7 @@ write -P0xcd 0x3ff0000 64k
"granularity": 65536,
"name": "bitmapA",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -197,8 +193,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapC",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -206,8 +201,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapB",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -215,8 +209,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapA",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
}
]
}
@@ -270,8 +263,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapC",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -279,8 +271,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapB",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -288,8 +279,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapA",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
}
]
}
@@ -336,8 +326,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapD",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -345,8 +334,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapC",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -354,8 +342,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapB",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
@@ -363,8 +350,7 @@ write -P0xea 0x3fe0000 64k
"granularity": 65536,
"name": "bitmapA",
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
}
]
}
diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246
index fa3102c..5932a0e 100755
--- a/tests/qemu-iotests/246
+++ b/tests/qemu-iotests/246
@@ -30,7 +30,8 @@ gran_large = 128 * 1024
def query_bitmaps(vm):
res = vm.qmp("query-block")
- return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+ return { "bitmaps": { device['device']: device.get('inserted', {})
+ .get('dirty-bitmaps', []) for
device in res['return'] } }
with iotests.FilePath('img') as img_path, \
diff --git a/tests/qemu-iotests/246.out b/tests/qemu-iotests/246.out
index 6671a11..eeb98ab 100644
--- a/tests/qemu-iotests/246.out
+++ b/tests/qemu-iotests/246.out
@@ -24,8 +24,7 @@
"granularity": 65536,
"name": "Transient",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -33,8 +32,7 @@
"granularity": 131072,
"name": "Large",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -42,8 +40,7 @@
"granularity": 65536,
"name": "Medium",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -51,8 +48,7 @@
"granularity": 32768,
"name": "Small",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -68,8 +64,7 @@
"granularity": 32768,
"name": "Small",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -77,8 +72,7 @@
"granularity": 65536,
"name": "Medium",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -86,8 +80,7 @@
"granularity": 131072,
"name": "Large",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -108,8 +101,7 @@
"granularity": 65536,
"name": "Newtwo",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -117,8 +109,7 @@
"granularity": 65536,
"name": "New",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -126,8 +117,7 @@
"granularity": 32768,
"name": "Small",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -135,8 +125,7 @@
"granularity": 65536,
"name": "Medium",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -144,8 +133,7 @@
"granularity": 131072,
"name": "Large",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -163,8 +151,7 @@
"granularity": 65536,
"name": "New",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -172,8 +159,7 @@
"granularity": 65536,
"name": "Newtwo",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -181,8 +167,7 @@
"granularity": 32768,
"name": "Small",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -190,8 +175,7 @@
"granularity": 65536,
"name": "Medium",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -199,8 +183,7 @@
"granularity": 131072,
"name": "Large",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -232,8 +215,7 @@
"granularity": 65536,
"name": "NewB",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -241,8 +223,7 @@
"granularity": 65536,
"name": "NewC",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -250,8 +231,7 @@
"granularity": 32768,
"name": "Small",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -259,8 +239,7 @@
"granularity": 65536,
"name": "Medium",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -268,8 +247,7 @@
"granularity": 131072,
"name": "Large",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254
index 49da948..108bf5f 100755
--- a/tests/qemu-iotests/254
+++ b/tests/qemu-iotests/254
@@ -73,7 +73,7 @@ vm.qmp_log('transaction', indent=2, actions=[
result = vm.qmp('query-block')['return'][0]
log("query-block: device = {}, node-name = {}, dirty-bitmaps:".format(
result['device'], result['inserted']['node-name']))
-log(result['dirty-bitmaps'], indent=2)
+log(result['inserted']['dirty-bitmaps'], indent=2)
log("\nbitmaps in backing image:")
log(result['inserted']['image']['backing-image']['format-specific'] \
['data']['bitmaps'], indent=2)
diff --git a/tests/qemu-iotests/254.out b/tests/qemu-iotests/254.out
index d185c05..fe52da9 100644
--- a/tests/qemu-iotests/254.out
+++ b/tests/qemu-iotests/254.out
@@ -99,8 +99,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
"granularity": 65536,
"name": "bitmap2",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -108,8 +107,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
"granularity": 65536,
"name": "bitmap1",
"persistent": true,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": false,
@@ -117,8 +115,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
diff --git a/tests/qemu-iotests/257.out b/tests/qemu-iotests/257.out
index a7ba512..50cbd8e 100644
--- a/tests/qemu-iotests/257.out
+++ b/tests/qemu-iotests/257.out
@@ -58,8 +58,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -113,16 +112,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -130,8 +127,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -156,8 +152,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -185,8 +180,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -234,8 +228,7 @@ expecting 15 dirty sectors; have 15. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -318,8 +311,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -367,8 +359,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -396,8 +387,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -445,8 +435,7 @@ expecting 14 dirty sectors; have 14. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -529,8 +518,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -584,16 +572,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -601,8 +587,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -627,8 +612,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -656,8 +640,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -705,8 +688,7 @@ expecting 15 dirty sectors; have 15. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -789,8 +771,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -844,16 +825,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -861,8 +840,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -887,8 +865,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -916,8 +893,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -965,8 +941,7 @@ expecting 15 dirty sectors; have 15. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1049,8 +1024,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1098,8 +1072,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1127,8 +1100,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1176,8 +1148,7 @@ expecting 14 dirty sectors; have 14. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1260,8 +1231,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1315,16 +1285,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -1332,8 +1300,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -1358,8 +1325,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1387,8 +1353,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1436,8 +1401,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1520,8 +1484,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1575,16 +1538,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -1592,8 +1553,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -1618,8 +1578,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1647,8 +1606,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1696,8 +1654,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1780,8 +1737,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1829,8 +1785,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1858,8 +1813,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1907,8 +1861,7 @@ expecting 13 dirty sectors; have 13. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -1991,8 +1944,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2046,16 +1998,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -2063,8 +2013,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -2089,8 +2038,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2118,8 +2066,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2167,8 +2114,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2251,8 +2197,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2306,16 +2251,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -2323,8 +2266,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -2349,8 +2291,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2378,8 +2319,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2427,8 +2367,7 @@ expecting 15 dirty sectors; have 15. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2511,8 +2450,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2560,8 +2498,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2589,8 +2526,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2638,8 +2574,7 @@ expecting 14 dirty sectors; have 14. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2722,8 +2657,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2777,16 +2711,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -2794,8 +2726,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -2820,8 +2751,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2849,8 +2779,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2898,8 +2827,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -2982,8 +2910,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3037,16 +2964,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -3054,8 +2979,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -3080,8 +3004,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3109,8 +3032,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3158,8 +3080,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3242,8 +3163,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3291,8 +3211,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3320,8 +3239,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3369,8 +3287,7 @@ expecting 1014 dirty sectors; have 1014. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3453,8 +3370,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3508,16 +3424,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -3525,8 +3439,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -3551,8 +3464,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3580,8 +3492,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3629,8 +3540,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3713,8 +3623,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3768,16 +3677,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -3785,8 +3692,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -3811,8 +3717,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3840,8 +3745,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3889,8 +3793,7 @@ expecting 15 dirty sectors; have 15. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -3973,8 +3876,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4022,8 +3924,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4051,8 +3952,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4100,8 +4000,7 @@ expecting 14 dirty sectors; have 14. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4184,8 +4083,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4239,16 +4137,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -4256,8 +4152,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -4282,8 +4177,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4311,8 +4205,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4360,8 +4253,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4444,8 +4336,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4499,16 +4390,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -4516,8 +4405,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -4542,8 +4430,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4571,8 +4458,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4620,8 +4506,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4704,8 +4589,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4753,8 +4637,7 @@ expecting 6 dirty sectors; have 6. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4782,8 +4665,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4831,8 +4713,7 @@ expecting 14 dirty sectors; have 14. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4915,8 +4796,7 @@ write -P0x69 0x3fe0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -4970,16 +4850,14 @@ write -P0x67 0x3fe0000 0x20000
"count": 0,
"granularity": 65536,
"persistent": false,
- "recording": false,
- "status": "disabled"
+ "recording": false
},
{
"busy": false,
"count": 458752,
"granularity": 65536,
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
},
{
"busy": true,
@@ -4987,8 +4865,7 @@ write -P0x67 0x3fe0000 0x20000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "frozen"
+ "recording": true
}
]
}
@@ -5013,8 +4890,7 @@ expecting 7 dirty sectors; have 7. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -5042,8 +4918,7 @@ write -P0xdd 0x3fc0000 0x10000
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
@@ -5091,8 +4966,7 @@ expecting 12 dirty sectors; have 12. OK!
"granularity": 65536,
"name": "bitmap0",
"persistent": false,
- "recording": true,
- "status": "active"
+ "recording": true
}
]
}
diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260
index a35cb7b..2ec64a9 100755
--- a/tests/qemu-iotests/260
+++ b/tests/qemu-iotests/260
@@ -32,8 +32,9 @@ size = 64 * 1024 * 3
def print_bitmap(msg, vm):
result = vm.qmp('query-block')['return'][0]
- if 'dirty-bitmaps' in result:
- bitmap = result['dirty-bitmaps'][0]
+ info = result.get("inserted", {})
+ if 'dirty-bitmaps' in info:
+ bitmap = info['dirty-bitmaps'][0]
log('{}: name={} dirty-clusters={}'.format(msg, bitmap['name'],
bitmap['count'] // 64 // 1024))
else:
diff --git a/tests/qemu-iotests/273.out b/tests/qemu-iotests/273.out
index 8247cba..4e840b6 100644
--- a/tests/qemu-iotests/273.out
+++ b/tests/qemu-iotests/273.out
@@ -69,8 +69,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
},
{
"iops_rd": 0,
@@ -98,8 +97,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT"
},
{
"iops_rd": 0,
@@ -139,8 +137,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.mid",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.mid"
},
{
"iops_rd": 0,
@@ -168,8 +165,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.mid",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.mid"
},
{
"iops_rd": 0,
@@ -197,8 +193,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
"direct": false,
"writeback": true
},
- "file": "TEST_DIR/t.IMGFMT.base",
- "encryption_key_missing": false
+ "file": "TEST_DIR/t.IMGFMT.base"
}
]
}
diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
index dbf10e5..d046ebe 100755
--- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
+++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
@@ -67,10 +67,12 @@ def event_dist(e1, e2):
def check_bitmaps(vm, count):
result = vm.qmp('query-block')
+ info = result['return'][0].get('inserted', {})
+
if count == 0:
- assert 'dirty-bitmaps' not in result['return'][0]
+ assert 'dirty-bitmaps' not in info
else:
- assert len(result['return'][0]['dirty-bitmaps']) == count
+ assert len(info['dirty-bitmaps']) == count
class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index f2142fb..3a711bb 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -658,53 +658,6 @@ static void test_migrate_end(QTestState *from, QTestState *to, bool test_dest)
cleanup("dest_serial");
}
-static void deprecated_set_downtime(QTestState *who, const double value)
-{
- QDict *rsp;
-
- rsp = qtest_qmp(who,
- "{ 'execute': 'migrate_set_downtime',"
- " 'arguments': { 'value': %f } }", value);
- g_assert(qdict_haskey(rsp, "return"));
- qobject_unref(rsp);
- migrate_check_parameter_int(who, "downtime-limit", value * 1000);
-}
-
-static void deprecated_set_speed(QTestState *who, long long value)
-{
- QDict *rsp;
-
- rsp = qtest_qmp(who, "{ 'execute': 'migrate_set_speed',"
- "'arguments': { 'value': %lld } }", value);
- g_assert(qdict_haskey(rsp, "return"));
- qobject_unref(rsp);
- migrate_check_parameter_int(who, "max-bandwidth", value);
-}
-
-static void deprecated_set_cache_size(QTestState *who, long long value)
-{
- QDict *rsp;
-
- rsp = qtest_qmp(who, "{ 'execute': 'migrate-set-cache-size',"
- "'arguments': { 'value': %lld } }", value);
- g_assert(qdict_haskey(rsp, "return"));
- qobject_unref(rsp);
- migrate_check_parameter_int(who, "xbzrle-cache-size", value);
-}
-
-static void test_deprecated(void)
-{
- QTestState *from;
-
- from = qtest_init("-machine none");
-
- deprecated_set_downtime(from, 0.12345);
- deprecated_set_speed(from, 12345);
- deprecated_set_cache_size(from, 4096);
-
- qtest_quit(from);
-}
-
static int migrate_postcopy_prepare(QTestState **from_ptr,
QTestState **to_ptr,
MigrateStart *args)
@@ -1486,7 +1439,6 @@ int main(int argc, char **argv)
qtest_add_func("/migration/postcopy/unix", test_postcopy);
qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
- qtest_add_func("/migration/deprecated", test_deprecated);
qtest_add_func("/migration/bad_dest", test_baddest);
qtest_add_func("/migration/precopy/unix", test_precopy_unix);
qtest_add_func("/migration/precopy/tcp", test_precopy_tcp);
diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c
index b25ebf9..dc0ec57 100644
--- a/tests/qtest/numa-test.c
+++ b/tests/qtest/numa-test.c
@@ -72,7 +72,7 @@ static void test_mon_partial(const void *data)
static QList *get_cpus(QTestState *qts, QDict **resp)
{
- *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus' }");
+ *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }");
g_assert(*resp);
g_assert(qdict_haskey(*resp, "return"));
return qdict_get_qlist(*resp, "return");
@@ -97,10 +97,10 @@ static void test_query_cpus(const void *data)
int64_t cpu_idx, node;
cpu = qobject_to(QDict, e);
- g_assert(qdict_haskey(cpu, "CPU"));
+ g_assert(qdict_haskey(cpu, "cpu-index"));
g_assert(qdict_haskey(cpu, "props"));
- cpu_idx = qdict_get_int(cpu, "CPU");
+ cpu_idx = qdict_get_int(cpu, "cpu-index");
props = qdict_get_qdict(cpu, "props");
g_assert(qdict_haskey(props, "node-id"));
node = qdict_get_int(props, "node-id");
diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c
index 11614bf..cd27fae 100644
--- a/tests/qtest/qmp-test.c
+++ b/tests/qtest/qmp-test.c
@@ -252,7 +252,7 @@ static void test_qmp_oob(void)
* Try any command that does not support OOB but with OOB flag. We
* should get failure.
*/
- resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }");
+ resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }");
g_assert(qdict_haskey(resp, "error"));
qobject_unref(resp);
@@ -289,7 +289,7 @@ static void test_qmp_preconfig(void)
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }")));
/* forbidden commands, expected error */
- g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+ g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
/* check that query-status returns preconfig state */
rsp = qtest_qmp(qs, "{ 'execute': 'query-status' }");
@@ -313,7 +313,7 @@ static void test_qmp_preconfig(void)
g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
/* enabled commands, no error expected */
- g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
qtest_quit(qs);
}
diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index 94a8023..413eb95 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -45,9 +45,9 @@ static const char *hmp_cmds[] = {
"log all",
"log none",
"memsave 0 4096 \"/dev/null\"",
- "migrate_set_cache_size 1",
- "migrate_set_downtime 1",
- "migrate_set_speed 1",
+ "migrate_set_parameter xbzrle_cache_size 1",
+ "migrate_set_parameter downtime_limit 1",
+ "migrate_set_parameter max_bandwidth 1",
"netdev_add user,id=net1",
"set_link net1 off",
"set_link net1 on",
diff --git a/tests/qtest/test-x86-cpuid-compat.c b/tests/qtest/test-x86-cpuid-compat.c
index 6470f0a..f28848e 100644
--- a/tests/qtest/test-x86-cpuid-compat.c
+++ b/tests/qtest/test-x86-cpuid-compat.c
@@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void)
QDict *cpu0;
char *path;
- resp = qmp("{'execute': 'query-cpus', 'arguments': {}}");
+ resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}");
g_assert(qdict_haskey(resp, "return"));
ret = qdict_get_qlist(resp, "return");
cpu0 = qobject_to(QDict, qlist_peek(ret));
- path = g_strdup(qdict_get_str(cpu0, "qom_path"));
+ path = g_strdup(qdict_get_str(cpu0, "qom-path"));
qobject_unref(resp);
return path;
}
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index 1a5f531..3d6337f 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -756,8 +756,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
/* slow down migration to have time to fiddle with log */
/* TODO: qtest could learn to break on some places */
- rsp = qmp("{ 'execute': 'migrate_set_speed',"
- "'arguments': { 'value': 10 } }");
+ rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+ "'arguments': { 'max-bandwidth': 10 } }");
g_assert(qdict_haskey(rsp, "return"));
qobject_unref(rsp);
@@ -776,8 +776,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
munmap(log, size);
/* speed things up */
- rsp = qmp("{ 'execute': 'migrate_set_speed',"
- "'arguments': { 'value': 0 } }");
+ rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+ "'arguments': { 'max-bandwidth': 0 } }");
g_assert(qdict_haskey(rsp, "return"));
qobject_unref(rsp);