summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorFam Zheng2014-05-20 03:10:32 +0200
committerStefan Hajnoczi2014-05-28 14:22:25 +0200
commit7cf6376ae80e320fdaa6c9020f3e8ac1eecf1307 (patch)
treebeb5571a9bd52a852588e59e5052eb8abd081139 /tests/qemu-iotests
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into staging (diff)
downloadqemu-7cf6376ae80e320fdaa6c9020f3e8ac1eecf1307.tar.gz
qemu-7cf6376ae80e320fdaa6c9020f3e8ac1eecf1307.tar.xz
qemu-7cf6376ae80e320fdaa6c9020f3e8ac1eecf1307.zip
qemu-iotests: Handle cache mode option in 091
We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE. The cache mode is still "none" by default but overridable Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rwxr-xr-xtests/qemu-iotests/0916
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091
index 384b3ace54..32bbd56975 100755
--- a/tests/qemu-iotests/091
+++ b/tests/qemu-iotests/091
@@ -47,6 +47,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+_default_cache_mode "none"
+_supported_cache_modes "writethrough" "none" "writeback"
size=1G
@@ -59,13 +61,13 @@ echo === Starting QEMU VM1 ===
echo
qemu_comm_method="monitor"
-_launch_qemu -drive file="${TEST_IMG}",cache=none,id=disk
+_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
h1=$QEMU_HANDLE
echo
echo === Starting QEMU VM2 ===
echo
-_launch_qemu -drive file="${TEST_IMG}",cache=none,id=disk \
+_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk \
-incoming "exec: cat '${MIG_FIFO}'"
h2=$QEMU_HANDLE