diff options
author | Fam Zheng <famz@redhat.com> | 2013-11-20 10:01:56 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-11-29 13:40:37 +0100 |
commit | b59b3d57737a0d40450f8232abd89e8986387402 (patch) | |
tree | 74fb1ebaa4d95c0e5c3cbab2aaad04e8d5f7259b /tests/qemu-iotests/040 | |
parent | 3cf53c771406ad360117f30e61b24635df0e9b50 (diff) |
qemu-iotests: Make test case 030, 040 and 055 deterministic
Pause the drive and start the block job, so we won't miss the block job.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/040')
-rwxr-xr-x | tests/qemu-iotests/040 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 0e85136ae6..18dcd61ef2 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -228,6 +228,7 @@ class TestSetSpeed(ImageCommitTestCase): qemu_img('create', backing_img, str(TestSetSpeed.image_len)) qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, mid_img) qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % mid_img, test_img) + qemu_io('-c', 'write -P 0x1 0 512', test_img) self.vm = iotests.VM().add_drive(test_img) self.vm.launch() @@ -240,6 +241,7 @@ class TestSetSpeed(ImageCommitTestCase): def test_set_speed(self): self.assert_no_active_commit() + self.vm.pause_drive('drive0') result = self.vm.qmp('block-commit', device='drive0', top=mid_img, speed=1024 * 1024) self.assert_qmp(result, 'return', {}) @@ -248,7 +250,7 @@ class TestSetSpeed(ImageCommitTestCase): self.assert_qmp(result, 'return[0]/device', 'drive0') self.assert_qmp(result, 'return[0]/speed', 1024 * 1024) - self.cancel_and_wait() + self.cancel_and_wait(resume=True) if __name__ == '__main__': |