Skip to contentSkip to conversation

KVM test: Unattended install - Fix incorrect verify_kernel_crash

PATCH New Lucas Meneghel Rodrigues 1 participant 3 messages Apr 8, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 KVM test: Unattended install - Fix incorrect verify_kernel_crash

The idea was to put the kernel crash verification during the install loop, not at the beginning of the test.

---
 client/tests/kvm/tests/unattended_install.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/tests/unattended_install.py +1 -1
index 4868053..955f8d6 100644
@@ -16,7 +16,6 @@ def run_unattended_install(test, params, env):
     """
     vm = env.get_vm(params["main_vm"])
     vm.verify_alive()
-    vm.verify_kernel_crash()
 
     install_timeout = int(params.get("timeout", 3000))
     post_install_delay = int(params.get("post_install_delay", 0))
@@ -34,6 +33,7 @@ def run_unattended_install(test, params, env):
     start_time = time.time()
     while (time.time() - start_time) < install_timeout:
         vm.verify_alive()
+        vm.verify_kernel_crash()
         client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         try:
             client.connect((vm.get_address(), port))
Signature · 1 line
1.7.4.2
#1 lore raw

PATCH 2/3 KVM test: Check for guest kernel crash after migration

We noticed some times guests crash after migration. Putting a kernel crash check on that stage makes it easier to indentify when such conditions happened.

---
 client/tests/kvm/kvm_vm.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
client/tests/kvm/kvm_vm.py +1 -0
index f004f4f..f0b8152 100755
@@ -1678,6 +1678,7 @@ class VM:
             if local:
                 time.sleep(1)
                 self.verify_alive()
+                self.verify_kernel_crash()
 
             if local and stable_check:
                 try:
Signature · 1 line
1.7.4.2
#2 lore raw

PATCH 3/3 KVM test: enospc subtest: Catch error.TestWarn in main loop

In reply to Lucas Meneghel Rodrigues

Now that image_check() can throw TestWarn exceptions, let's catch it as well.

---
 client/tests/kvm/tests/enospc.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/tests/enospc.py +1 -1
index 3c53b64..9917144 100644
@@ -54,7 +54,7 @@ def run_enospc(test, params, env):
                 image_params = vm.params.object_params(image_name)
                 try:
                     kvm_vm.check_image(image_params, test.bindir)
-                except kvm_vm.VMError, e:
+                except (kvm_vm.VMError, error.TestWarn), e:
                     logging.error(e)
             logging.info("Guest paused, extending Logical Volume size")
             try:
Signature · 1 line
1.7.4.2