cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-iotests-Test-committing-to-short-backing-file.patch

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