summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/1944
-rwxr-xr-xtests/qemu-iotests/2362
-rwxr-xr-xtests/qemu-iotests/2463
-rwxr-xr-xtests/qemu-iotests/2542
-rwxr-xr-xtests/qemu-iotests/2605
-rwxr-xr-xtests/qemu-iotests/tests/migrate-bitmaps-postcopy-test6
6 files changed, 13 insertions, 9 deletions
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
index 3889266afa..e44b8df728 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/236 b/tests/qemu-iotests/236
index f6c44517d6..20419bbb9e 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/246 b/tests/qemu-iotests/246
index fa3102c546..5932a0e8a9 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/254 b/tests/qemu-iotests/254
index 49da948407..108bf5f894 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/260 b/tests/qemu-iotests/260
index a35cb7b61f..2ec64a9b99 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/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
index dbf10e58d3..d046ebeb94 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):