[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/26] stream: fix sectors not allocated test
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 18/26] stream: fix sectors not allocated test |
Date: |
Thu, 12 Apr 2012 14:01:08 +0200 |
The test on sectors not allocated can fail if the L1/L2 tables are
not on disk yet. Allow tests to shutdown the VM early.
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/qemu-iotests/030 | 1 +
tests/qemu-iotests/iotests.py | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 1faf984..3efb6cd 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -63,6 +63,7 @@ class TestSingleDrive(ImageStreamingTestCase):
completed = True
self.assert_no_active_streams()
+ self.vm.shutdown()
self.assertFalse('sectors not allocated' in qemu_io('-c', 'map',
test_img),
'image file not fully populated after streaming')
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 36787cc..e27b40e 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -87,10 +87,12 @@ class VM(object):
def shutdown(self):
'''Terminate the VM and clean up'''
- self._qmp.cmd('quit')
- self._popen.wait()
- os.remove(self._monitor_path)
- os.remove(self._qemu_log_path)
+ if not self._popen is None:
+ self._qmp.cmd('quit')
+ self._popen.wait()
+ os.remove(self._monitor_path)
+ os.remove(self._qemu_log_path)
+ self._popen = None
def qmp(self, cmd, **args):
'''Invoke a QMP command and return the result dict'''
--
1.7.9.3
- [Qemu-devel] [PATCH 11/26] block: push bdrv_change_backing_file error checking up from drivers, (continued)
- [Qemu-devel] [PATCH 11/26] block: push bdrv_change_backing_file error checking up from drivers, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 13/26] block: open backing file as read-only when probing for size, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 22/26] stream: do not copy unallocated sectors from the base, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 23/26] block: implement is_allocated for raw, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 24/26] stream: tweak usage of bdrv_co_is_allocated, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 16/26] qemu-io: correctly print non-integer values as decimals, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 25/26] stream: move is_allocated_above to block.c, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 17/26] qemu-io: fix the alloc command, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 15/26] qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 21/26] stream: fix ratelimiting corner case, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 18/26] stream: fix sectors not allocated test,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 19/26] stream: add testcase for partial streaming, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 26/26] stream: move rate limiting to a separate header file, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 20/26] stream: pass new base image format to bdrv_change_backing_file, Paolo Bonzini, 2012/04/12
- [Qemu-devel] [PATCH 27/26] block: another bdrv_append fix, Paolo Bonzini, 2012/04/17