diff mbox

[2/4] Add VMs alive check while spliting the guest's pages

Message ID 1273338071-8595-3-git-send-email-ldoktor@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lukáš Doktor May 8, 2010, 5:01 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/ksm_overcommit.py b/client/tests/kvm/tests/ksm_overcommit.py
index 4aa6deb..b3d6880 100644
--- a/client/tests/kvm/tests/ksm_overcommit.py
+++ b/client/tests/kvm/tests/ksm_overcommit.py
@@ -142,6 +142,12 @@  def run_ksm_overcommit(test, params, env):
         session = None
         vm = None
         for i in range(1, vmsc):
+            # Check VMs
+            for j in range(0, vmsc):
+                if not lvms[j].is_alive:
+                    e_msg = "VM %d died while executing static_random_fill in"\
+                            " VM %d on allocator loop" % (j, i)
+                    raise error.TestFail(e_msg)
             vm = lvms[i]
             session = lsessions[i]
             a_cmd = "mem.static_random_fill()"
@@ -154,6 +160,10 @@  def run_ksm_overcommit(test, params, env):
                 logging.debug("Watching host memory while filling vm %s memory",
                               vm.name)
                 while not out.startswith("PASS") and not out.startswith("FAIL"):
+                    if not vm.is_alive():
+                        e_msg = "VM %d died while executing static_random_fill"\
+                                " on allocator loop" % i
+                        raise error.TestFail(e_msg)
                     free_mem = int(utils.read_from_meminfo("MemFree"))
                     if (ksm_swap):
                         free_mem = (free_mem +