Signed-off-by: Marc-André Lureau <[email protected]>
---
 tests/qemu-iotests/151 | 51 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151
index 204221a5738e..72f7bcaa0c60 100755
--- a/tests/qemu-iotests/151
+++ b/tests/qemu-iotests/151
@@ -69,14 +69,14 @@ class TestActiveMirror(iotests.QMPTestCase):
 
     def doActiveIO(self, sync_source_and_target):
         # Fill the source image
-        self.vm.hmp_qemu_io('source',
+        self.vm.qmp_qemu_io('source',
                             'write -P 1 0 %i' % self.image_len);
 
         # Start some background requests
         for offset in range(1 * self.image_len // 8, 3 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -P 2 %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -P 2 %i 1M' % offset)
         for offset in range(2 * self.image_len // 8, 3 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
 
         # Start the block job
         self.vm.cmd('blockdev-mirror',
@@ -89,9 +89,9 @@ class TestActiveMirror(iotests.QMPTestCase):
 
         # Start some more requests
         for offset in range(3 * self.image_len // 8, 5 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
         for offset in range(4 * self.image_len // 8, 5 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
 
         # Wait for the READY event
         self.wait_ready(drive='mirror')
@@ -101,14 +101,14 @@ class TestActiveMirror(iotests.QMPTestCase):
         # The mirror code itself asserts that the source BDS's dirty
         # bitmap will stay clean between READY and COMPLETED.
         for offset in range(5 * self.image_len // 8, 7 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -P 3 %i 1M' % offset)
         for offset in range(6 * self.image_len // 8, 7 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
+            self.vm.qmp_qemu_io('source', 'aio_write -z %i 1M' % offset)
 
         if sync_source_and_target:
             # If source and target should be in sync after the mirror,
             # we have to flush before completion
-            self.vm.hmp_qemu_io('source', 'aio_flush')
+            self.vm.qmp_qemu_io('source', 'aio_flush')
             self.potential_writes_in_flight = False
 
         self.complete_and_wait(drive='mirror', wait_ready=False)
@@ -121,7 +121,7 @@ class TestActiveMirror(iotests.QMPTestCase):
 
     def testUnalignedActiveIO(self):
         # Fill the source image
-        result = self.vm.hmp_qemu_io('source', 'write -P 1 0 2M')
+        result = self.vm.qmp_qemu_io('source', 'write -P 1 0 2M')
 
         # Start the block job (very slowly)
         self.vm.cmd('blockdev-mirror',
@@ -135,7 +135,7 @@ class TestActiveMirror(iotests.QMPTestCase):
                     speed=1)
 
         # Start an unaligned request to a dirty area
-        result = self.vm.hmp_qemu_io('source', 'write -P 2 %i 1' % (1048576 + 
42))
+        result = self.vm.qmp_qemu_io('source', 'write -P 2 %i 1' % (1048576 + 
42))
 
         # Let the job finish
         self.vm.cmd('block-job-set-speed', device='mirror', speed=0)
@@ -145,7 +145,7 @@ class TestActiveMirror(iotests.QMPTestCase):
 
     def testIntersectingActiveIO(self):
         # Fill the source image
-        result = self.vm.hmp_qemu_io('source', 'write -P 1 0 2M')
+        result = self.vm.qmp_qemu_io('source', 'write -P 1 0 2M')
 
         # Start the block job (very slowly)
         self.vm.cmd('blockdev-mirror',
@@ -157,23 +157,23 @@ class TestActiveMirror(iotests.QMPTestCase):
                     copy_mode='write-blocking',
                     speed=1)
 
-        self.vm.hmp_qemu_io('source', 'break write_aio A')
-        self.vm.hmp_qemu_io('source', 'aio_write 0 1M')  # 1
-        self.vm.hmp_qemu_io('source', 'wait_break A')
-        self.vm.hmp_qemu_io('source', 'aio_write 0 2M')  # 2
-        self.vm.hmp_qemu_io('source', 'aio_write 0 2M')  # 3
+        self.vm.qmp_qemu_io('source', 'break write_aio A')
+        self.vm.qmp_qemu_io('source', 'aio_write 0 1M')  # 1
+        self.vm.qmp_qemu_io('source', 'wait_break A')
+        self.vm.qmp_qemu_io('source', 'aio_write 0 2M')  # 2
+        self.vm.qmp_qemu_io('source', 'aio_write 0 2M')  # 3
 
         # Now 2 and 3 are in mirror_wait_on_conflicts, waiting for 1
 
-        self.vm.hmp_qemu_io('source', 'break write_aio B')
-        self.vm.hmp_qemu_io('source', 'aio_write 1M 2M')  # 4
-        self.vm.hmp_qemu_io('source', 'wait_break B')
+        self.vm.qmp_qemu_io('source', 'break write_aio B')
+        self.vm.qmp_qemu_io('source', 'aio_write 1M 2M')  # 4
+        self.vm.qmp_qemu_io('source', 'wait_break B')
 
         # 4 doesn't wait for 2 and 3, because they didn't yet set
         # in_flight_bitmap. So, nothing prevents 4 to go except for our
         # break-point B.
 
-        self.vm.hmp_qemu_io('source', 'resume A')
+        self.vm.qmp_qemu_io('source', 'resume A')
 
         # Now we resumed 1, so 2 and 3 goes to the next iteration of while loop
         # in mirror_wait_on_conflicts(). They don't exit, as bitmap is dirty
@@ -181,7 +181,7 @@ class TestActiveMirror(iotests.QMPTestCase):
         # In the past at that point 2 and 3 would wait for each other producing
         # a dead-lock. Now this is fixed and they will wait for request 4.
 
-        self.vm.hmp_qemu_io('source', 'resume B')
+        self.vm.qmp_qemu_io('source', 'resume B')
 
         # After resuming 4, one of 2 and 3 goes first and set in_flight_bitmap,
         # so the other will wait for it.
@@ -193,7 +193,7 @@ class TestActiveMirror(iotests.QMPTestCase):
 
     def testUnalignedSmallerThanGranularityWriteZeroes(self):
         # Fill the source image
-        self.vm.hmp_qemu_io('source', 'write -P 1 0 %i' % self.image_len);
+        self.vm.qmp_qemu_io('source', 'write -P 1 0 %i' % self.image_len);
 
         # Start the block job
         self.vm.cmd('blockdev-mirror',
@@ -208,7 +208,7 @@ class TestActiveMirror(iotests.QMPTestCase):
         self.wait_ready(drive='mirror')
 
         for offset in range(6 * self.image_len // 8, 7 * self.image_len // 8, 
1024 * 1024):
-            self.vm.hmp_qemu_io('source', 'aio_write -z %i 512' % (offset + 
512))
+            self.vm.qmp_qemu_io('source', 'aio_write -z %i 512' % (offset + 
512))
 
         self.complete_and_wait(drive='mirror', wait_ready=False)
 
@@ -323,7 +323,7 @@ class 
TestLowThrottledWithNbdExport(TestThrottledWithNbdExportBase):
         # progress (because when the job was started, those areas were not
         # intended to be copied, so active mirroring will only lead to not
         # losing progress, but also not making any).
-        self.vm.hmp_qemu_io('source-node',
+        self.vm.qmp_qemu_io('source-node',
                             f'aio_write -P 1 0 {self.image_len // 2}')
         self.vm.qtest(f'clock_step {1 * 1000 * 1000 * 1000}')
 
@@ -434,5 +434,4 @@ class 
TestHighThrottledWithNbdExport(TestThrottledWithNbdExportBase):
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2', 'raw'],
-                 supported_protocols=['file'],
-                 require_hmp=True)
+                 supported_protocols=['file'])

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to