[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1.1 13/22] stream: fix sectors not allocated test
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 1.1 13/22] stream: fix sectors not allocated test |
Date: |
Tue, 8 May 2012 16:51:53 +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 38abc2c..0d2f87b 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -78,6 +78,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.10.1
- [Qemu-devel] [PATCH 1.1 03/22] block: do not reuse the backing file across bdrv_close/bdrv_open, (continued)
- [Qemu-devel] [PATCH 1.1 03/22] block: do not reuse the backing file across bdrv_close/bdrv_open, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 05/22] block: add block_job_sleep_ns, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 04/22] block: fully delete bs->file when closing, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 06/22] block: wait for job callback in block_job_cancel_sync, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 07/22] block: simplify path_is_absolute, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 09/22] block: move field reset from bdrv_open_common to bdrv_close, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 08/22] block: protect path_has_protocol from filenames with colons, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 10/22] qemu-img: make "info" backing file output correct and easier to use, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 13/22] stream: fix sectors not allocated test,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 1.1 16/22] stream: fix HMP block_job_set_speed, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 14/22] stream: add testcase for partial streaming, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 15/22] stream: pass new base image format to bdrv_change_backing_file, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 17/22] stream: fix ratelimiting corner case, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 18/22] stream: do not copy unallocated sectors from the base, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 20/22] stream: tweak usage of bdrv_co_is_allocated, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 21/22] stream: move is_allocated_above to block.c, Paolo Bonzini, 2012/05/08
- [Qemu-devel] [PATCH 1.1 22/22] stream: move rate limiting to a separate header file, Paolo Bonzini, 2012/05/08