Skip to contentSkip to conversation

qemu-iotests: Handle cache mode option in 091

PATCH Applied Fam Zheng 2 participants 2 messages May 20, 2014

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH v2 1/1 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

---
v2: Add _default_cache_mode and _supported_cache_modes. (Kevin)

---
 tests/qemu-iotests/091 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/qemu-iotests/091 +4 -2
index 384b3ac..32bbd56 100755
@@ -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
 
Signature · 1 line
1.9.2
#1 lore raw
Quoted 5 lines · Fam Zheng

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

Quoted 7 lines

---
v2: Add _default_cache_mode and _supported_cache_modes. (Kevin)

---
 tests/qemu-iotests/091 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan