[KVM-AUTOTEST PATCH 01/18] KVM test: kvm_preprocessing.py: allow modifying VM params without restarting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently a VM's params are changed before the test only if it's restarted.
This patch allows VM params to be changed when it isn't restarted.  This is
useful for params that can have an effect without a restart, such as
main_monitor: monitors can be switched between tests without restarting, so
that one test talks to the human monitor and the next test talks to the QMP
monitor of the same VM.

Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/kvm_preprocessing.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index ee3e9b2..17f3a29 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -79,8 +79,13 @@ def preprocess_vm(test, params, env, name):
                           "restarting it...")
             start_vm = True
 
-    if start_vm and not vm.create(name, params, test.bindir, for_migration):
-        raise error.TestError("Could not start VM")
+    if start_vm:
+        # Start the VM (or restart it if it's already up)
+        if not vm.create(name, params, test.bindir, for_migration):
+            raise error.TestError("Could not start VM")
+    else:
+        # Don't start the VM, just update its params
+        vm.params = params
 
     scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name)
     try:
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux