]> Git Repo - qemu.git/commitdiff
iotests/030: Reduce run time by unthrottling job earlier
authorKevin Wolf <[email protected]>
Wed, 13 May 2020 10:00:25 +0000 (12:00 +0200)
committerKevin Wolf <[email protected]>
Mon, 18 May 2020 17:05:25 +0000 (19:05 +0200)
test_overlapping_3() throttles its active commit job so it can be sure
the job is still busy when it checks that you can't start a conflicting
streaming job.

However, it only sets the commit job back to full speed when it is
ready, which takes a few seconds while it's throttled. We can already
reset the limit after having checked that block-stream returns an error
and save these seconds.

Signed-off-by: Kevin Wolf <[email protected]>
Message-Id: <20200513100025[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
tests/qemu-iotests/030

index 104e3cee1bf74f10ddfd45d9e2eed3049fb800c7..1cdd7e2999f686eccf3e0bcfc143b4b0e53514f9 100755 (executable)
@@ -354,14 +354,14 @@ class TestParallelOps(iotests.QMPTestCase):
         self.assert_qmp(result, 'error/desc',
             "Node 'node5' is busy: block device is in use by block job: commit")
 
+        result = self.vm.qmp('block-job-set-speed', device='commit-drive0', speed=0)
+        self.assert_qmp(result, 'return', {})
+
         event = self.vm.event_wait(name='BLOCK_JOB_READY')
         self.assert_qmp(event, 'data/device', 'commit-drive0')
         self.assert_qmp(event, 'data/type', 'commit')
         self.assert_qmp_absent(event, 'data/error')
 
-        result = self.vm.qmp('block-job-set-speed', device='commit-drive0', speed=0)
-        self.assert_qmp(result, 'return', {})
-
         result = self.vm.qmp('block-job-complete', device='commit-drive0')
         self.assert_qmp(result, 'return', {})
 
This page took 0.029754 seconds and 4 git commands to generate.