public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [KVM-AUTOTEST PATCH] KVM test: support 'cache' and 'serial' params to the qemu -drive option
@ 2009-06-17 15:24 Michael Goldish
  2009-06-18  6:15 ` Lucas Meneghel Rodrigues
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Goldish @ 2009-06-17 15:24 UTC (permalink / raw)
  To: kvm, autotest; +Cc: Michael Goldish

Support 'cache' and 'serial'.
Both can be controlled directly from the config file, e.g.:
drive_cache = writeback

or for a specific image 'image1':
drive_cache_image1 = writeback

or for 'image1' of VM 'vm1':
drive_cache_image1_vm1 = writeback

The cache options are listed in the QEMU documentation.
(currently "none", "writeback", or "writethrough" are supported.)

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm/kvm_vm.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 9aea3fb..e98ffd7 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -226,6 +226,10 @@ class VM:
                                                                image_dir)
             if image_params.get("drive_format"):
                 qemu_cmd += ",if=%s" % image_params.get("drive_format")
+            if image_params.get("drive_cache"):
+                qemu_cmd += ",cache=%s" % image_params.get("drive_cache")
+            if image_params.get("drive_serial"):
+                qemu_cmd += ",serial=%s" % image_params.get("drive_serial")
             if image_params.get("image_snapshot") == "yes":
                 qemu_cmd += ",snapshot=on"
             if image_params.get("image_boot") == "yes":
-- 
1.5.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-18  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 15:24 [KVM-AUTOTEST PATCH] KVM test: support 'cache' and 'serial' params to the qemu -drive option Michael Goldish
2009-06-18  6:15 ` Lucas Meneghel Rodrigues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox