cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From 33e66fa335c602b53302cd2838d075a8c05509d6 Mon Sep 17 00:00:00 2001
0a122b
From: Fam Zheng <famz@redhat.com>
0a122b
Date: Fri, 17 Jan 2014 03:08:01 +0100
0a122b
Subject: [PATCH 18/34] qemu-iotests: prefill some data to test image
0a122b
0a122b
RH-Author: Fam Zheng <famz@redhat.com>
0a122b
Message-id: <1389928083-8921-17-git-send-email-famz@redhat.com>
0a122b
Patchwork-id: 56778
0a122b
O-Subject: [RHEL-7 qemu-kvm PATCH 16/18] qemu-iotests: prefill some data to test image
0a122b
Bugzilla: 1041301
0a122b
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
0a122b
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
0a122b
Case 030 occasionally fails because of block job compltes too fast to be
0a122b
captured by script, and 'unexpected qmp event' of job completion causes
0a122b
the test failure.
0a122b
0a122b
Simply fill in some data to the test image to make this false alarm less
0a122b
likely to happen.
0a122b
0a122b
(For other benefits to prefill data to test image, see also commit
0a122b
ab68cdfaa).
0a122b
0a122b
Signed-off-by: Fam Zheng <famz@redhat.com>
0a122b
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
0a122b
(cherry picked from commit 7890111b642e8e03430c3bf8bd6cedee26cec4fe)
0a122b
Signed-off-by: Fam Zheng <famz@redhat.com>
0a122b
---
0a122b
 tests/qemu-iotests/030 | 4 ++++
0a122b
 1 file changed, 4 insertions(+)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 tests/qemu-iotests/030 |    4 ++++
0a122b
 1 files changed, 4 insertions(+), 0 deletions(-)
0a122b
0a122b
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
0a122b
index dd4ef11..3d128b3 100755
0a122b
--- a/tests/qemu-iotests/030
0a122b
+++ b/tests/qemu-iotests/030
0a122b
@@ -421,7 +421,9 @@ class TestStreamStop(ImageStreamingTestCase):
0a122b
 
0a122b
     def setUp(self):
0a122b
         qemu_img('create', backing_img, str(TestStreamStop.image_len))
0a122b
+        qemu_io('-c', 'write -P 0x1 0 32M', backing_img)
0a122b
         qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, test_img)
0a122b
+        qemu_io('-c', 'write -P 0x1 32M 32M', test_img)
0a122b
         self.vm = iotests.VM().add_drive(test_img)
0a122b
         self.vm.launch()
0a122b
 
0a122b
@@ -447,7 +449,9 @@ class TestSetSpeed(ImageStreamingTestCase):
0a122b
 
0a122b
     def setUp(self):
0a122b
         qemu_img('create', backing_img, str(TestSetSpeed.image_len))
0a122b
+        qemu_io('-c', 'write -P 0x1 0 32M', backing_img)
0a122b
         qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, test_img)
0a122b
+        qemu_io('-c', 'write -P 0x1 32M 32M', test_img)
0a122b
         self.vm = iotests.VM().add_drive(test_img)
0a122b
         self.vm.launch()
0a122b
 
0a122b
-- 
0a122b
1.7.1
0a122b