提交 58cc2ae1 编写于 作者: F Fam Zheng 提交者: Stefan Hajnoczi

qemu-iotests: Honour cache mode in iotests.py

This will allow overriding cache mode from the "-c mode" option.
Signed-off-by: NFam Zheng <famz@redhat.com>
Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 3baa8449
...@@ -37,6 +37,7 @@ qemu_args = os.environ.get('QEMU', 'qemu').strip().split(' ') ...@@ -37,6 +37,7 @@ qemu_args = os.environ.get('QEMU', 'qemu').strip().split(' ')
imgfmt = os.environ.get('IMGFMT', 'raw') imgfmt = os.environ.get('IMGFMT', 'raw')
imgproto = os.environ.get('IMGPROTO', 'file') imgproto = os.environ.get('IMGPROTO', 'file')
test_dir = os.environ.get('TEST_DIR', '/var/tmp') test_dir = os.environ.get('TEST_DIR', '/var/tmp')
cachemode = os.environ.get('CACHEMODE')
socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper') socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper')
...@@ -96,7 +97,7 @@ class VM(object): ...@@ -96,7 +97,7 @@ class VM(object):
'''Add a virtio-blk drive to the VM''' '''Add a virtio-blk drive to the VM'''
options = ['if=virtio', options = ['if=virtio',
'format=%s' % imgfmt, 'format=%s' % imgfmt,
'cache=none', 'cache=%s' % cachemode,
'file=%s' % path, 'file=%s' % path,
'id=drive%d' % self._num_drives] 'id=drive%d' % self._num_drives]
if opts: if opts:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册