OLD | NEW |
1 import logging, time | 1 import logging, time |
2 from autotest_lib.client.common_lib import error | 2 from autotest_lib.client.common_lib import error |
3 | 3 |
4 | 4 |
5 def run_linux_s3(test, params, env): | 5 def run_linux_s3(test, params, env): |
6 """ | 6 """ |
7 Suspend a guest Linux OS to memory. | 7 Suspend a guest Linux OS to memory. |
8 | 8 |
9 @param test: kvm test object. | 9 @param test: kvm test object. |
10 @param params: Dictionary with test parameters. | 10 @param params: Dictionary with test parameters. |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 logging.info("Putting VM into S3") | 33 logging.info("Putting VM into S3") |
34 command = "chvt %s && echo mem > /sys/power/state && chvt %s" % (dst_tty, | 34 command = "chvt %s && echo mem > /sys/power/state && chvt %s" % (dst_tty, |
35 src_tty) | 35 src_tty) |
36 suspend_timeout = 120 + int(params.get("smp")) * 60 | 36 suspend_timeout = 120 + int(params.get("smp")) * 60 |
37 session.cmd(command, timeout=suspend_timeout) | 37 session.cmd(command, timeout=suspend_timeout) |
38 | 38 |
39 logging.info("VM resumed after S3") | 39 logging.info("VM resumed after S3") |
40 | 40 |
41 session.close() | 41 session.close() |
OLD | NEW |