Skip to contentSkip to conversation

qemu-iotests: Honor ${CACHEMODE} in 091

PATCH In review Fam Zheng 2 participants 4 messages May 19, 2014 – May 20, 2014

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 qemu-iotests: Honor ${CACHEMODE} in 091

We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE.

---
 tests/qemu-iotests/091 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/091 +2 -2
index 384b3ac..a7deea8 100755
@@ -59,13 +59,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

Am 19.05.2014 um 14:24 hat Fam Zheng geschrieben:

Quoted 4 lines

We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE.

Should we set _default_cache_mode=none then at least? We should probably also refuse to run with unsafe.

Kevin

Quoted 26 lines
 tests/qemu-iotests/091 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/091 +2 -2
index 384b3ac..a7deea8 100755
@@ -59,13 +59,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
author
#2 lore raw
Quoted 7 lines · Kevin Wolf

Am 19.05.2014 um 14:24 hat Fam Zheng geschrieben:

Quoted 4 lines

We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE.

Should we set _default_cache_mode=none then at least?

Yes we should set a default. We use _default_cache_mode=writethrough elsewhere, why use none over writethrough here?

Quoted 2 lines

We should probably
also refuse to run with unsafe.

OK, I'll add _supported_cache_modes.

Fam

Quoted 26 lines
Quoted 26 lines
 tests/qemu-iotests/091 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/091 +2 -2
index 384b3ac..a7deea8 100755
@@ -59,13 +59,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
#3 lore raw

Am 20.05.2014 um 03:03 hat Fam Zheng geschrieben:

Quoted 11 lines · Kevin Wolf
Quoted 7 lines

Am 19.05.2014 um 14:24 hat Fam Zheng geschrieben:

Quoted 4 lines

We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE.

Should we set _default_cache_mode=none then at least?

Yes we should set a default. We use _default_cache_mode=writethrough elsewhere, why use none over writethrough here?

I think the test case set cache=none originally because it's a migration test and this is the recommended setting for migration. As long as we're on localhost, writethrough should be fine, though, so it's probably not strictly necessary.

Quoted 4 lines
Quoted 2 lines

We should probably
also refuse to run with unsafe.

OK, I'll add _supported_cache_modes.

Thanks.

Kevin