| Index: client/tests/kvm/tests/guest_s4.py
 | 
| diff --git a/client/tests/kvm/tests/guest_s4.py b/client/tests/kvm/tests/guest_s4.py
 | 
| index 0280f71731a8a83733168351b30294b140dffc03..2eb035be30cae9e2b2fa2ce41f218766a656664c 100644
 | 
| --- a/client/tests/kvm/tests/guest_s4.py
 | 
| +++ b/client/tests/kvm/tests/guest_s4.py
 | 
| @@ -16,7 +16,11 @@ def run_guest_s4(test, params, env):
 | 
|      session = kvm_test_utils.wait_for_login(vm, timeout=timeout)
 | 
|  
 | 
|      logging.info("Checking whether guest OS supports suspend to disk (S4)...")
 | 
| -    session.cmd(params.get("check_s4_support_cmd"))
 | 
| +    s, o = session.get_command_status_output(params.get("check_s4_support_cmd"))
 | 
| +    if "not enough space" in o:
 | 
| +        raise error.TestError("Check S4 support failed: %s" % o)
 | 
| +    elif s != 0:
 | 
| +        raise error.TestNAError("Guest OS does not support S4")
 | 
|  
 | 
|      logging.info("Waiting until all guest OS services are fully started...")
 | 
|      time.sleep(float(params.get("services_up_timeout", 30)))
 | 
| @@ -32,7 +36,9 @@ def run_guest_s4(test, params, env):
 | 
|  
 | 
|      # Make sure the background program is running as expected
 | 
|      check_s4_cmd = params.get("check_s4_cmd")
 | 
| -    session2.cmd(check_s4_cmd)
 | 
| +    if session2.get_command_status(check_s4_cmd) != 0:
 | 
| +        raise error.TestError("Failed to launch '%s' as a background process" %
 | 
| +                              test_s4_cmd)
 | 
|      logging.info("Launched background command in guest: %s" % test_s4_cmd)
 | 
|  
 | 
|      # Suspend to disk
 | 
| @@ -62,9 +68,11 @@ def run_guest_s4(test, params, env):
 | 
|  
 | 
|      # Check whether the test command is still alive
 | 
|      logging.info("Checking if background command is still alive...")
 | 
| -    session2.cmd(check_s4_cmd)
 | 
| +    if session2.get_command_status(check_s4_cmd) != 0:
 | 
| +        raise error.TestFail("Background command '%s' stopped running. S4 "
 | 
| +                             "failed." % test_s4_cmd)
 | 
|  
 | 
|      logging.info("VM resumed successfuly after suspend to disk")
 | 
| -    session2.cmd_output(params.get("kill_test_s4_cmd"))
 | 
| +    session2.get_command_output(params.get("kill_test_s4_cmd"))
 | 
|      session.close()
 | 
|      session2.close()
 | 
| 
 |