aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorIan Main <imain@redhat.com>2013-07-26 11:39:05 -0700
committerKevin Wolf <kwolf@redhat.com>2013-07-26 22:01:31 +0200
commite3409362bd64731e042c9d001e43cc1d13d2df5d (patch)
tree6b866fb7d07dda9b8ac2aa27e7adf80377b8e3bc /tests/qemu-iotests/iotests.py
parentfc5d3f843250c9d3bfa2bcfdb7369f4753a49f0e (diff)
Add tests for sync modes 'TOP' and 'NONE'
This patch adds tests for sync modes top and none. Test for 'TOP' is separated out as it requires a backing file. Also added a test for invalid format. Signed-off-by: Ian Main <imain@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r--tests/qemu-iotests/iotests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index b028a890e6..33ad0ecb92 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -95,6 +95,11 @@ class VM(object):
self._num_drives += 1
return self
+ def hmp_qemu_io(self, drive, cmd):
+ '''Write to a given drive using an HMP command'''
+ return self.qmp('human-monitor-command',
+ command_line='qemu-io %s "%s"' % (drive, cmd))
+
def add_fd(self, fd, fdset, opaque, opts=''):
'''Pass a file descriptor to the VM'''
options = ['fd=%d' % fd,