Index: client/tests/kvm/tests/ioquit.py |
diff --git a/client/tests/kvm/tests/ioquit.py b/client/tests/kvm/tests/ioquit.py |
index 25d3ac922cfb3e83463121d750f36b4174ce11e3..81261393bf4d0c681e0e9cb3589de7c84c85d696 100644 |
--- a/client/tests/kvm/tests/ioquit.py |
+++ b/client/tests/kvm/tests/ioquit.py |
@@ -20,13 +20,17 @@ def run_ioquit(test, params, env): |
try: |
bg_cmd = params.get("background_cmd") |
logging.info("Add IO workload for guest OS.") |
- session.cmd_output(bg_cmd, timeout=60) |
+ (s, o) = session.get_command_status_output(bg_cmd, timeout=60) |
check_cmd = params.get("check_cmd") |
- session2.cmd(check_cmd, timeout=60) |
+ (s, o) = session2.get_command_status_output(check_cmd, timeout=60) |
+ if s: |
+ raise error.TestError("Fail to add IO workload for Guest OS") |
logging.info("Sleep for a while") |
time.sleep(random.randrange(30,100)) |
- session2.cmd(check_cmd, timeout=60) |
+ (s, o) = session2.get_command_status_output(check_cmd, timeout=60) |
+ if s: |
+ logging.info("IO workload finished before the VM was killed") |
logging.info("Kill the virtual machine") |
vm.process.close() |
finally: |