KVM test: Add a kvm subtest guest_s4
PATCH 1/1 KVM test: Add a kvm subtest guest_s4
This test suspends a guest OS to disk, it supports Linux and Windows.
Signed-off-by Ken Cao <[email protected]>
Signed-off-by Yolkfull Chow <[email protected]>
--- client/tests/kvm/kvm_tests.cfg.sample | 16 ++++++++ client/tests/kvm/tests/guest_s4.py | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/tests/guest_s4.py
client/tests/kvm/kvm_tests.cfg.sample +16 -0
@@ -118,6 +118,15 @@ variants: - linux_s3: install setup type = linux_s3 + - guest_s4: + type = guest_s4 + check_s4_support_cmd = grep -q disk /sys/power/state + test_s4_cmd = "cd /tmp/;nohup tcpdump -q -t ip host localhost" + check_s4_cmd = pgrep tcpdump + set_s4_cmd = echo disk > /sys/power/state + kill_test_s4_cmd = pkill tcpdump + services_up_timeout = 30 + - timedrift: install setup extra_params += " -rtc-td-hack" variants:
@@ -507,6 +516,13 @@ variants: # Alternative host load: #host_load_command = "dd if=/dev/urandom of=/dev/null" host_load_instances = 8 + guest_s4: + check_s4_support_cmd = powercfg /hibernate on + test_s4_cmd = start /B ping -n 3000 localhost + check_s4_cmd = tasklist | find /I "ping" + set_s4_cmd = rundll32.exe PowrProf.dll, SetSuspendState + kill_test_s4_cmd = taskkill /IM ping.exe /F + services_up_timeout = 30 nic_hotplug: reference_cmd = ipconfig /all find_pci_cmd = ipconfig /all | find "Description"
client/tests/kvm/tests/guest_s4.py new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
1.6.2.5