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