qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-iotests: fix 030 for faster machines
@ 2013-10-15  2:41 Fam Zheng
  2013-10-16 18:45 ` Max Reitz
  2013-10-17 12:38 ` Stefan Hajnoczi
  0 siblings, 2 replies; 6+ messages in thread
From: Fam Zheng @ 2013-10-15  2:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha

If the block job completes too fast, the test can fail. Change the
numbers so the qmp events are more stably captured by the script.

A sleep is removed for the same reason.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/qemu-iotests/030 | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index ae56f3b..188b182 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -403,14 +403,13 @@ class TestStreamStop(iotests.QMPTestCase):
         result = self.vm.qmp('block-stream', device='drive0')
         self.assert_qmp(result, 'return', {})
 
-        time.sleep(0.1)
         events = self.vm.get_qmp_events(wait=False)
         self.assertEqual(events, [], 'unexpected QMP event: %s' % events)
 
         self.cancel_and_wait()
 
 class TestSetSpeed(iotests.QMPTestCase):
-    image_len = 80 * 1024 * 1024 # MB
+    image_len = 512 * 1024 * 1024 # MB
 
     def setUp(self):
         qemu_img('create', backing_img, str(TestSetSpeed.image_len))
@@ -457,23 +456,23 @@ class TestSetSpeed(iotests.QMPTestCase):
         self.assert_qmp(result, 'return[0]/device', 'drive0')
         self.assert_qmp(result, 'return[0]/speed', 0)
 
-        result = self.vm.qmp('block-job-set-speed', device='drive0', speed=8 * 1024 * 1024)
+        result = self.vm.qmp('block-job-set-speed', device='drive0', speed=8 * 1024)
         self.assert_qmp(result, 'return', {})
 
         # Ensure the speed we set was accepted
         result = self.vm.qmp('query-block-jobs')
         self.assert_qmp(result, 'return[0]/device', 'drive0')
-        self.assert_qmp(result, 'return[0]/speed', 8 * 1024 * 1024)
+        self.assert_qmp(result, 'return[0]/speed', 8 * 1024)
 
         self.cancel_and_wait()
 
         # Check setting speed in block-stream works
-        result = self.vm.qmp('block-stream', device='drive0', speed=4 * 1024 * 1024)
+        result = self.vm.qmp('block-stream', device='drive0', speed=4 * 1024)
         self.assert_qmp(result, 'return', {})
 
         result = self.vm.qmp('query-block-jobs')
         self.assert_qmp(result, 'return[0]/device', 'drive0')
-        self.assert_qmp(result, 'return[0]/speed', 4 * 1024 * 1024)
+        self.assert_qmp(result, 'return[0]/speed', 4 * 1024)
 
         self.cancel_and_wait()
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-30 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15  2:41 [Qemu-devel] [PATCH] qemu-iotests: fix 030 for faster machines Fam Zheng
2013-10-16 18:45 ` Max Reitz
2013-10-17  6:28   ` Fam Zheng
2013-10-18 18:17     ` Max Reitz
2013-10-17 12:38 ` Stefan Hajnoczi
2013-10-30 11:45   ` Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).