On 07/30/2012 05:21 AM, Yu Mingfei wrote:
This patch adds a paused state in preprocess_vm.

It is same as the patch in domname.I put it here just for testcase's
assistant. ^_^
If you do not need to run the testcase of rename, skip it.

Signed-off-by: Yu Mingfei <[email protected]>
---
  client/virt/base.cfg.sample     |    1 +
  client/virt/virt_env_process.py |    3 +++
  2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/client/virt/base.cfg.sample b/client/virt/base.cfg.sample
index 80cab6e..192ec39 100644
--- a/client/virt/base.cfg.sample
+++ b/client/virt/base.cfg.sample
@@ -244,6 +244,7 @@ restore_image_on_check_error = no

  # Some preprocessor/postprocessor params
  start_vm = yes
+paused_after_start_vm = no
  kill_vm = no
  kill_vm_gracefully = yes
  kill_unresponsive_vms = yes
diff --git a/client/virt/virt_env_process.py
b/client/virt/virt_env_process.py
index 306be76..153f1a3 100644
--- a/client/virt/virt_env_process.py
+++ b/client/virt/virt_env_process.py
@@ -104,6 +104,9 @@ def preprocess_vm(test, params, env, name):
              vm.create(name, params, test.bindir,
                        migration_mode=params.get("migration_mode"),
                        migration_fd=params.get("migration_fd"))
+        if params.get("paused_after_start_vm") == "yes":
+            if vm.state() != "paused":
+                vm.pause()
      else:
          # Don't start the VM, just update its params
          vm.params = params
--
1.7.1


--
Best Regards
Yu Mingfei


Great, nice, simple, and self-documenting.  Looks good to me.

--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to