|
|
ddf19c |
From e2a1b3fd32be8bb730656a6f22eb4f543b120c9d Mon Sep 17 00:00:00 2001
|
|
|
ddf19c |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
Date: Mon, 8 Jun 2020 15:01:39 +0100
|
|
|
ddf19c |
Subject: [PATCH 11/17] iotests: Test committing to short backing file
|
|
|
ddf19c |
|
|
|
ddf19c |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
Message-id: <20200608150140.38218-11-kwolf@redhat.com>
|
|
|
ddf19c |
Patchwork-id: 97453
|
|
|
ddf19c |
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 10/11] iotests: Test committing to short backing file
|
|
|
ddf19c |
Bugzilla: 1780574
|
|
|
ddf19c |
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
Message-Id: <20200424125448.63318-10-kwolf@redhat.com>
|
|
|
ddf19c |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
ddf19c |
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
ddf19c |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
(cherry picked from commit bf03dede475e29a16f9188ea85a4d77cd3dcf2b7)
|
|
|
ddf19c |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ddf19c |
---
|
|
|
ddf19c |
tests/qemu-iotests/274 | 155 ++++++++++++++++++++++++++
|
|
|
ddf19c |
tests/qemu-iotests/274.out | 268 +++++++++++++++++++++++++++++++++++++++++++++
|
|
|
ddf19c |
tests/qemu-iotests/group | 1 +
|
|
|
ddf19c |
3 files changed, 424 insertions(+)
|
|
|
ddf19c |
create mode 100755 tests/qemu-iotests/274
|
|
|
ddf19c |
create mode 100644 tests/qemu-iotests/274.out
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274
|
|
|
ddf19c |
new file mode 100755
|
|
|
ddf19c |
index 0000000..e951f72
|
|
|
ddf19c |
--- /dev/null
|
|
|
ddf19c |
+++ b/tests/qemu-iotests/274
|
|
|
ddf19c |
@@ -0,0 +1,155 @@
|
|
|
ddf19c |
+#!/usr/bin/env python3
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# Copyright (C) 2019 Red Hat, Inc.
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# This program is free software; you can redistribute it and/or modify
|
|
|
ddf19c |
+# it under the terms of the GNU General Public License as published by
|
|
|
ddf19c |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
ddf19c |
+# (at your option) any later version.
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# This program is distributed in the hope that it will be useful,
|
|
|
ddf19c |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ddf19c |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
ddf19c |
+# GNU General Public License for more details.
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# You should have received a copy of the GNU General Public License
|
|
|
ddf19c |
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# Creator/Owner: Kevin Wolf <kwolf@redhat.com>
|
|
|
ddf19c |
+#
|
|
|
ddf19c |
+# Some tests for short backing files and short overlays
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+import iotests
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+iotests.verify_image_format(supported_fmts=['qcow2'])
|
|
|
ddf19c |
+iotests.verify_platform(['linux'])
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+size_short = 1 * 1024 * 1024
|
|
|
ddf19c |
+size_long = 2 * 1024 * 1024
|
|
|
ddf19c |
+size_diff = size_long - size_short
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+def create_chain() -> None:
|
|
|
ddf19c |
+ iotests.qemu_img_log('create', '-f', iotests.imgfmt, base,
|
|
|
ddf19c |
+ str(size_long))
|
|
|
ddf19c |
+ iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base, mid,
|
|
|
ddf19c |
+ str(size_short))
|
|
|
ddf19c |
+ iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', mid, top,
|
|
|
ddf19c |
+ str(size_long))
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'write -P 1 0 %d' % size_long, base)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+def create_vm() -> iotests.VM:
|
|
|
ddf19c |
+ vm = iotests.VM()
|
|
|
ddf19c |
+ vm.add_blockdev('file,filename=%s,node-name=base-file' % base)
|
|
|
ddf19c |
+ vm.add_blockdev('%s,file=base-file,node-name=base' % iotests.imgfmt)
|
|
|
ddf19c |
+ vm.add_blockdev('file,filename=%s,node-name=mid-file' % mid)
|
|
|
ddf19c |
+ vm.add_blockdev('%s,file=mid-file,node-name=mid,backing=base'
|
|
|
ddf19c |
+ % iotests.imgfmt)
|
|
|
ddf19c |
+ vm.add_drive(top, 'backing=mid,node-name=top')
|
|
|
ddf19c |
+ return vm
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+with iotests.FilePath('base') as base, \
|
|
|
ddf19c |
+ iotests.FilePath('mid') as mid, \
|
|
|
ddf19c |
+ iotests.FilePath('top') as top:
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('== Commit tests ==')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ create_chain()
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Check visible data ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, top)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), top)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Checking allocation status ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
|
|
|
ddf19c |
+ '-c', 'alloc %d %d' % (size_short, size_diff),
|
|
|
ddf19c |
+ base)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
|
|
|
ddf19c |
+ '-c', 'alloc %d %d' % (size_short, size_diff),
|
|
|
ddf19c |
+ mid)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short,
|
|
|
ddf19c |
+ '-c', 'alloc %d %d' % (size_short, size_diff),
|
|
|
ddf19c |
+ top)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Checking map ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=json', base)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=human', base)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=json', mid)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=human', mid)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=json', top)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=human', top)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Testing qemu-img commit (top -> mid) ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.qemu_img_log('commit', top)
|
|
|
ddf19c |
+ iotests.img_info_log(mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Testing HMP commit (top -> mid) ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ create_chain()
|
|
|
ddf19c |
+ with create_vm() as vm:
|
|
|
ddf19c |
+ vm.launch()
|
|
|
ddf19c |
+ vm.qmp_log('human-monitor-command', command_line='commit drive0')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.img_info_log(mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== Testing QMP active commit (top -> mid) ===')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ create_chain()
|
|
|
ddf19c |
+ with create_vm() as vm:
|
|
|
ddf19c |
+ vm.launch()
|
|
|
ddf19c |
+ vm.qmp_log('block-commit', device='top', base_node='mid',
|
|
|
ddf19c |
+ job_id='job0', auto_dismiss=False)
|
|
|
ddf19c |
+ vm.run_job('job0', wait=5)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.img_info_log(mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('== Resize tests ==')
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ # Use different sizes for different allocation modes:
|
|
|
ddf19c |
+ #
|
|
|
ddf19c |
+ # We want to have at least one test where 32 bit truncation in the size of
|
|
|
ddf19c |
+ # the overlapping area becomes visible. This is covered by the
|
|
|
ddf19c |
+ # prealloc='off' case (1G to 6G is an overlap of 5G).
|
|
|
ddf19c |
+ #
|
|
|
ddf19c |
+ # However, we can only do this for modes that don't preallocate data
|
|
|
ddf19c |
+ # because otherwise we might run out of space on the test host.
|
|
|
ddf19c |
+ #
|
|
|
ddf19c |
+ # We also want to test some unaligned combinations.
|
|
|
ddf19c |
+ for (prealloc, base_size, top_size_old, top_size_new, off) in [
|
|
|
ddf19c |
+ ('off', '6G', '1G', '8G', '5G'),
|
|
|
ddf19c |
+ ('metadata', '32G', '30G', '33G', '31G'),
|
|
|
ddf19c |
+ ('falloc', '10M', '5M', '15M', '9M'),
|
|
|
ddf19c |
+ ('full', '16M', '8M', '12M', '11M'),
|
|
|
ddf19c |
+ ('off', '384k', '253k', '512k', '253k'),
|
|
|
ddf19c |
+ ('off', '400k', '256k', '512k', '336k'),
|
|
|
ddf19c |
+ ('off', '512k', '256k', '500k', '436k')]:
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ iotests.log('=== preallocation=%s ===' % prealloc)
|
|
|
ddf19c |
+ iotests.qemu_img_log('create', '-f', iotests.imgfmt, base, base_size)
|
|
|
ddf19c |
+ iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base, top,
|
|
|
ddf19c |
+ top_size_old)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'write -P 1 %s 64k' % off, base)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+ # After this, top_size_old to base_size should be allocated/zeroed.
|
|
|
ddf19c |
+ #
|
|
|
ddf19c |
+ # In theory, leaving base_size to top_size_new unallocated would be
|
|
|
ddf19c |
+ # correct, but in practice, if we zero out anything, we zero out
|
|
|
ddf19c |
+ # everything up to top_size_new.
|
|
|
ddf19c |
+ iotests.qemu_img_log('resize', '-f', iotests.imgfmt,
|
|
|
ddf19c |
+ '--preallocation', prealloc, top, top_size_new)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'read -P 0 %s 64k' % off, top)
|
|
|
ddf19c |
+ iotests.qemu_io_log('-c', 'map', top)
|
|
|
ddf19c |
+ iotests.qemu_img_log('map', '--output=json', top)
|
|
|
ddf19c |
diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out
|
|
|
ddf19c |
new file mode 100644
|
|
|
ddf19c |
index 0000000..1a796fd
|
|
|
ddf19c |
--- /dev/null
|
|
|
ddf19c |
+++ b/tests/qemu-iotests/274.out
|
|
|
ddf19c |
@@ -0,0 +1,268 @@
|
|
|
ddf19c |
+== Commit tests ==
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 2097152/2097152 bytes at offset 0
|
|
|
ddf19c |
+2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Check visible data ===
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 0
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 1048576
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Checking allocation status ===
|
|
|
ddf19c |
+1048576/1048576 bytes allocated at offset 0 bytes
|
|
|
ddf19c |
+1048576/1048576 bytes allocated at offset 1 MiB
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+0/1048576 bytes allocated at offset 0 bytes
|
|
|
ddf19c |
+0/0 bytes allocated at offset 1 MiB
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+0/1048576 bytes allocated at offset 0 bytes
|
|
|
ddf19c |
+0/1048576 bytes allocated at offset 1 MiB
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Checking map ===
|
|
|
ddf19c |
+[{ "start": 0, "length": 2097152, "depth": 0, "zero": false, "data": true, "offset": 327680}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Offset Length Mapped to File
|
|
|
ddf19c |
+0 0x200000 0x50000 TEST_DIR/PID-base
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 1048576, "depth": 1, "zero": false, "data": true, "offset": 327680}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Offset Length Mapped to File
|
|
|
ddf19c |
+0 0x100000 0x50000 TEST_DIR/PID-base
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 1048576, "depth": 2, "zero": false, "data": true, "offset": 327680},
|
|
|
ddf19c |
+{ "start": 1048576, "length": 1048576, "depth": 0, "zero": true, "data": false}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Offset Length Mapped to File
|
|
|
ddf19c |
+0 0x100000 0x50000 TEST_DIR/PID-base
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Testing qemu-img commit (top -> mid) ===
|
|
|
ddf19c |
+Image committed.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+image: TEST_IMG
|
|
|
ddf19c |
+file format: IMGFMT
|
|
|
ddf19c |
+virtual size: 2 MiB (2097152 bytes)
|
|
|
ddf19c |
+cluster_size: 65536
|
|
|
ddf19c |
+backing file: TEST_DIR/PID-base
|
|
|
ddf19c |
+Format specific information:
|
|
|
ddf19c |
+ compat: 1.1
|
|
|
ddf19c |
+ lazy refcounts: false
|
|
|
ddf19c |
+ refcount bits: 16
|
|
|
ddf19c |
+ corrupt: false
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 0
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 1048576
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Testing HMP commit (top -> mid) ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 2097152/2097152 bytes at offset 0
|
|
|
ddf19c |
+2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+{"execute": "human-monitor-command", "arguments": {"command-line": "commit drive0"}}
|
|
|
ddf19c |
+{"return": ""}
|
|
|
ddf19c |
+image: TEST_IMG
|
|
|
ddf19c |
+file format: IMGFMT
|
|
|
ddf19c |
+virtual size: 2 MiB (2097152 bytes)
|
|
|
ddf19c |
+cluster_size: 65536
|
|
|
ddf19c |
+backing file: TEST_DIR/PID-base
|
|
|
ddf19c |
+Format specific information:
|
|
|
ddf19c |
+ compat: 1.1
|
|
|
ddf19c |
+ lazy refcounts: false
|
|
|
ddf19c |
+ refcount bits: 16
|
|
|
ddf19c |
+ corrupt: false
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 0
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 1048576
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== Testing QMP active commit (top -> mid) ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 2097152/2097152 bytes at offset 0
|
|
|
ddf19c |
+2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+{"execute": "block-commit", "arguments": {"auto-dismiss": false, "base-node": "mid", "device": "top", "job-id": "job0"}}
|
|
|
ddf19c |
+{"return": {}}
|
|
|
ddf19c |
+{"execute": "job-complete", "arguments": {"id": "job0"}}
|
|
|
ddf19c |
+{"return": {}}
|
|
|
ddf19c |
+{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
|
|
|
ddf19c |
+{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
|
|
|
ddf19c |
+{"execute": "job-dismiss", "arguments": {"id": "job0"}}
|
|
|
ddf19c |
+{"return": {}}
|
|
|
ddf19c |
+image: TEST_IMG
|
|
|
ddf19c |
+file format: IMGFMT
|
|
|
ddf19c |
+virtual size: 2 MiB (2097152 bytes)
|
|
|
ddf19c |
+cluster_size: 65536
|
|
|
ddf19c |
+backing file: TEST_DIR/PID-base
|
|
|
ddf19c |
+Format specific information:
|
|
|
ddf19c |
+ compat: 1.1
|
|
|
ddf19c |
+ lazy refcounts: false
|
|
|
ddf19c |
+ refcount bits: 16
|
|
|
ddf19c |
+ corrupt: false
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 0
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 1048576/1048576 bytes at offset 1048576
|
|
|
ddf19c |
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+== Resize tests ==
|
|
|
ddf19c |
+=== preallocation=off ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=6442450944 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=1073741824 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 5368709120
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 5368709120
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+1 GiB (0x40000000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+7 GiB (0x1c0000000) bytes allocated at offset 1 GiB (0x40000000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 1073741824, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 1073741824, "length": 7516192768, "depth": 0, "zero": true, "data": false}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=metadata ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=34359738368 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=32212254720 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 33285996544
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 33285996544
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+30 GiB (0x780000000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+3 GiB (0xc0000000) bytes allocated at offset 30 GiB (0x780000000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 32212254720, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 32212254720, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 327680},
|
|
|
ddf19c |
+{ "start": 32749125632, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 537264128},
|
|
|
ddf19c |
+{ "start": 33285996544, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1074200576},
|
|
|
ddf19c |
+{ "start": 33822867456, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1611137024},
|
|
|
ddf19c |
+{ "start": 34359738368, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2148139008},
|
|
|
ddf19c |
+{ "start": 34896609280, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2685075456}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=falloc ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=10485760 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=5242880 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 9437184
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 9437184
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+5 MiB (0x500000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+10 MiB (0xa00000) bytes allocated at offset 5 MiB (0x500000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 5242880, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 5242880, "length": 10485760, "depth": 0, "zero": true, "data": false, "offset": 327680}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=full ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=16777216 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=8388608 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 11534336
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 11534336
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+8 MiB (0x800000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+4 MiB (0x400000) bytes allocated at offset 8 MiB (0x800000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 8388608, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 8388608, "length": 4194304, "depth": 0, "zero": true, "data": false, "offset": 327680}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=off ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=393216 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=259072 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 259072
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 259072
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+192 KiB (0x30000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+320 KiB (0x50000) bytes allocated at offset 192 KiB (0x30000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 196608, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 196608, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": 327680},
|
|
|
ddf19c |
+{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=off ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=409600 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=262144 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 344064
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 344064
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+256 KiB (0x40000) bytes allocated at offset 256 KiB (0x40000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+=== preallocation=off ===
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=524288 cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=262144 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+wrote 65536/65536 bytes at offset 446464
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+Image resized.
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+read 65536/65536 bytes at offset 446464
|
|
|
ddf19c |
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0)
|
|
|
ddf19c |
+244 KiB (0x3d000) bytes allocated at offset 256 KiB (0x40000)
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false},
|
|
|
ddf19c |
+{ "start": 262144, "length": 249856, "depth": 0, "zero": true, "data": false}]
|
|
|
ddf19c |
+
|
|
|
ddf19c |
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
|
|
|
ddf19c |
index 033b54d..cddae00 100644
|
|
|
ddf19c |
--- a/tests/qemu-iotests/group
|
|
|
ddf19c |
+++ b/tests/qemu-iotests/group
|
|
|
ddf19c |
@@ -286,6 +286,7 @@
|
|
|
ddf19c |
270 rw backing quick
|
|
|
ddf19c |
272 rw
|
|
|
ddf19c |
273 backing quick
|
|
|
ddf19c |
+274 rw backing
|
|
|
ddf19c |
277 rw quick
|
|
|
ddf19c |
280 rw migration quick
|
|
|
ddf19c |
281 rw quick
|
|
|
ddf19c |
--
|
|
|
ddf19c |
1.8.3.1
|
|
|
ddf19c |
|