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>
This commit is contained in:
Ian Main 2013-07-26 11:39:05 -07:00 committed by Kevin Wolf
parent fc5d3f8432
commit e3409362bd
6 changed files with 113 additions and 2 deletions

View file

@ -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,