Commit 91ee647b11 for qemu.org
commit 91ee647b11bb2473bb69e40e2edd037ba27cff85
Author: Denis V. Lunev <den@openvz.org>
Date: Fri Aug 14 21:51:18 2026 +0200
iotests: run the persistent dirty bitmap test on parallels
parallels stores persistent dirty bitmaps now, so test 165 applies to it
as well. The bitmap name is the only format specific bit: parallels
keeps it as the UUID identifying the bitmap in the image, so a name like
'bitmap0' is rejected on store.
test_reopen_rw is skipped, as parallels has no bdrv_reopen_prepare() and
blockdev-reopen fails with "does not support reopening files". Skipped
cases do not show up in the reference output, so 165.out stays as it is.
test_persistent covers what the series adds: it dirties the bitmap,
records its hash, restarts the VM twice and compares the hash again,
which passes only if the bitmap survives both the store on inactivation
and the load on open.
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index 8fc79daae1..13b784fcc6 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -27,6 +27,12 @@ from iotests import qemu_img
disk = os.path.join(iotests.test_dir, 'disk')
disk_size = 0x40000000 # 1G
+# parallels stores a bitmap name as the UUID identifying it in the image
+if iotests.imgfmt == 'parallels':
+ bitmap_name = 'b2c9e1a4-5d3f-4e8b-9a7c-6f0d1e2b3a45'
+else:
+ bitmap_name = 'bitmap0'
+
# regions for qemu_io: (start, count) in bytes
regions1 = ((0x0fff00, 0x10000),
(0x200000, 0x100000))
@@ -50,12 +56,12 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
def getSha256(self):
result = self.vm.qmp('x-debug-block-dirty-bitmap-sha256',
- node='drive0', name='bitmap0')
+ node='drive0', name=bitmap_name)
return result['return']['sha256']
def checkBitmap(self, sha256):
result = self.vm.qmp('x-debug-block-dirty-bitmap-sha256',
- node='drive0', name='bitmap0')
+ node='drive0', name=bitmap_name)
self.assert_qmp(result, 'return/sha256', sha256);
def writeRegions(self, regions):
@@ -65,7 +71,7 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
def qmpAddBitmap(self):
self.vm.qmp('block-dirty-bitmap-add', node='drive0',
- name='bitmap0', persistent=True)
+ name=bitmap_name, persistent=True)
def test_persistent(self):
self.vm = self.mkVm()
@@ -100,6 +106,8 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
self.vm.shutdown()
+ # parallels has no bdrv_reopen_prepare() yet
+ @iotests.skip_for_formats(('parallels',))
def test_reopen_rw(self):
self.vm = self.mkVm()
self.vm.launch()
@@ -115,7 +123,7 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
assert sha256_1 != sha256_2 # Otherwise, it's not very interesting.
self.vm.cmd('block-dirty-bitmap-clear', node='drive0',
- name='bitmap0')
+ name=bitmap_name)
# Start with regions1
@@ -152,7 +160,7 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
if __name__ == '__main__':
- iotests.main(supported_fmts=['qcow2'],
+ iotests.main(supported_fmts=['qcow2', 'parallels'],
supported_protocols=['file'],
unsupported_imgopts=['compat'],
require_hmp=True)