qemu_monitor: Add system_wakeup interface
virt.util_test: Add a new class for guest suspend test

This 'GuestSuspend' class contains some steps needed by
guest suspend test, it provides 2 methods:
 * guest_suspend_mem()
 * guest_suspend_disk()
They will run a 'standard' suspend testing.

If you want to custom suspend testing, you can just inherit
from this class and implement your own steps.

This class also provides 3 hook points:
 * action_before_suspend()
 * action_during_suspend()
 * action_after_suspend()
You can insert your own test steps in these test points.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests.guest_s4: Update this test with new GuestSuspend class

This patch also add some custom cmd for windows XP/2003.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests: Add a new test case guest_s3

This is another version of guest s3 test, it supports
both linux and windows guest.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests: Remove test linux_s3

This linux_s3 test is replaced by test guest_s3,
so remove it directly.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.utils_test: Refactor GuestsuSpend class

* Add __init__() method for this cass.
* Use variable argument list for all members.
* Move actual test steps out of this class, they will
  be put in a new class.
* Update vm's params dict before resume it from disk.
* Add a new member '_check_guest_suspend_log' for checking
  guest's system log.
* Update all private methods to protected methods.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.tests: Update guest s3/s4 test cases with new GuestSuspend class

This patch update guest_suspend as the comments of code review
for the ACPI feature:
 * Move guest_s3 and guest_s4 into a single script, guest_suspend.
 * Move the actual test steps of suspend testing into a separated
   class called "GuestSuspendBaseTest".
 * Add a "GuestSuspendNegativeTest" class for the negative testing
   of ACPI setting.
 * Update qemu_guest_agent_suspend with the new guest_suspend test.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: Update guest_s3/guest_s4 test config

Since guest_s3 and guest_s4 are merged into single script,
Update their config for the new script.

Changes from V1:
 * Add missing 'display = spice' parameters. Since S3 only
   work with spice/qxl driver on windows guest.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: Ignore exit status when checking if win guest support s3

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: Update balloon_check test config for S3/S4 operation

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
tests.clock_getres: Add sub test support fot this test

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: guest_suspend: Add sub tests for kvmclock

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>