cryptospore / rpms / qemu-kvm

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