]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
qemu-iotests: Handle cache mode option in 091
authorFam Zheng <famz@redhat.com>
Tue, 20 May 2014 01:10:32 +0000 (09:10 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 28 May 2014 12:22:25 +0000 (14:22 +0200)
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>
tests/qemu-iotests/091

index 384b3ace54a0c2a7b94232c51c3daf3118d490bc..32bbd5697581a8ae825b0a10c717f51e62dd4ba1 100755 (executable)
@@ -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