[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Introduce an s3 test
From: root <root@bguthro-desktop.(none)> This test attempts to have an initial pass at introducing a test to catch regressions in S3. It currently just suspends for N seconds, and checks xl dmesg for a partiular message printed when S3 is complete. --- ts-host-suspend | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 ts-host-suspend diff --git a/ts-host-suspend b/ts-host-suspend new file mode 100755 index 0000000..9fe38d5 --- /dev/null +++ b/ts-host-suspend @@ -0,0 +1,51 @@ +#!/usr/bin/perl -w + +use strict qw(vars); + +use Osstest; +use Osstest::TestSupport; + +tsreadconfig(); + +my $timeout = 30; +if (@ARGV && $ARGV[0] =~ m/^--timeout=([0-9]*)$/) { + $timeout = $1; + shift @ARGV; +} + +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho = selecthost($whhost); + +my $RTC = "/sys/class/rtc/rtc0"; + +# get RTC NOW +my $epoch = target_cmd_output_root($ho, "cat " . $RTC . "/since_epoch"); + +# Clear the wake alarm +target_cmd_root($ho, "echo 0 > " . $RTC . "/wakealarm"); + +# Set the wake alarm to NOW + time +my $t2 = $epoch + $timeout; +target_cmd_root($ho, "echo " . ($epoch + $timeout) . " > ". $RTC . "/wakealarm"); + +# Put the machine to sleep +target_cmd_root($ho, "pm-suspend"); + +# Give the machine some time to go to sleep. +sleep (5 + $timeout); + +# check log for resume message +poll_loop(4*$timeout, 2, 's3-confirm-resumed', + target_cmd_output($ho,"xl dmesg | grep 'ACPI S' | tail -1 | " . + "grep -n 'Finishing wakeup from S3 state'")); + +# TODO: +# - Check pcpu state +# - Affinity has been restored +# - C-states are not lost +# - CPU pools are all correct +# - Check timer queues are correct +# - vcpu_singleshot_timer on every pcpu +# - Check for kernel Oops +# - Check for Xen WARN -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |