[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 23/30] stream: fix sectors not allocated test
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 23/30] stream: fix sectors not allocated test |
Date: |
Thu, 10 May 2012 13:49:27 +0200 |
From: Paolo Bonzini <address@hidden>
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>
Signed-off-by: Kevin Wolf <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.6.5
- [Qemu-devel] [PATCH 06/30] block: open backing file as read-only when probing for size, (continued)
- [Qemu-devel] [PATCH 06/30] block: open backing file as read-only when probing for size, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 09/30] qtest: Add function to send QMP commands, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 12/30] block: another bdrv_append fix, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 07/30] block: fix allocation size for dirty bitmap, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 02/30] block: add mode argument to blockdev-snapshot-sync, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 05/30] block: update in-memory backing file and format, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 18/30] block: protect path_has_protocol from filenames with colons, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 11/30] block: fix snapshot on QED, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 15/30] block: add block_job_sleep_ns, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 16/30] block: wait for job callback in block_job_cancel_sync, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 23/30] stream: fix sectors not allocated test,
Kevin Wolf <=
- [Qemu-devel] [PATCH 19/30] block: move field reset from bdrv_open_common to bdrv_close, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 26/30] stream: fix HMP block_job_set_speed, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 27/30] stream: fix ratelimiting corner case, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 22/30] qemu-io: fix the alloc command, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 24/30] stream: add testcase for partial streaming, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 25/30] stream: pass new base image format to bdrv_change_backing_file, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 28/30] stream: do not copy unallocated sectors from the base, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 29/30] tests/Makefile: Add missing $(EXESUF), Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 30/30] declare ECANCELED on all machines, Kevin Wolf, 2012/05/10
- [Qemu-devel] [PATCH 21/30] qemu-io: correctly print non-integer values as decimals, Kevin Wolf, 2012/05/10