aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2013-12-04 09:06:59 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-04 11:55:13 +0100
commit58cc2ae1e3f9f8cd6830a0af116c51c3355710d3 (patch)
treeba071b4b2d874ce9fdef272ac3f9e4ab94ea619c /tests/qemu-iotests
parent3baa84491a43c6ba4909cbff69a9f045df9f4879 (diff)
downloadqemu-58cc2ae1e3f9f8cd6830a0af116c51c3355710d3.zip
qemu-58cc2ae1e3f9f8cd6830a0af116c51c3355710d3.tar.gz
qemu-58cc2ae1e3f9f8cd6830a0af116c51c3355710d3.tar.bz2
qemu-iotests: Honour cache mode in iotests.py
This will allow overriding cache mode from the "-c mode" option. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r--tests/qemu-iotests/iotests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 10c9a99..e4fa9af 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -37,6 +37,7 @@ qemu_args = os.environ.get('QEMU', 'qemu').strip().split(' ')
imgfmt = os.environ.get('IMGFMT', 'raw')
imgproto = os.environ.get('IMGPROTO', 'file')
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')
@@ -96,7 +97,7 @@ class VM(object):
'''Add a virtio-blk drive to the VM'''
options = ['if=virtio',
'format=%s' % imgfmt,
- 'cache=none',
+ 'cache=%s' % cachemode,
'file=%s' % path,
'id=drive%d' % self._num_drives]
if opts: