diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-05-20 09:18:18 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-20 09:21:02 -0400 |
commit | 27d934b28752b860cba6c0d77ea4598861d80998 (patch) | |
tree | 30b1dda6c72d07a7736a003fc73c0606843e178f /tools/testing/ktest/ktest.pl | |
parent | 4025bc62dd045d326d8a26a50fc86fd163aec89f (diff) |
ktest: Reboot after each patchcheck run
The patches being checked may not leave the kernel in a state
that the next run will allow the new kernel to be copied to the
machine. Reboot to a known good kernel before continuing to the
next kernel to test.
Added option PATCHCHECK_SLEEP_TIME for the max time to sleep between
patchcheck reboots.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 2011222c8918..65003a196305 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -36,6 +36,7 @@ $default{"REBOOT_ON_SUCCESS"} = 1; | |||
36 | $default{"POWEROFF_ON_SUCCESS"} = 0; | 36 | $default{"POWEROFF_ON_SUCCESS"} = 0; |
37 | $default{"BUILD_OPTIONS"} = ""; | 37 | $default{"BUILD_OPTIONS"} = ""; |
38 | $default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects | 38 | $default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects |
39 | $default{"PATCHCHECK_SLEEP_TIME"} = 60; # sleep time between patch checks | ||
39 | $default{"CLEAR_LOG"} = 0; | 40 | $default{"CLEAR_LOG"} = 0; |
40 | $default{"BISECT_MANUAL"} = 0; | 41 | $default{"BISECT_MANUAL"} = 0; |
41 | $default{"BISECT_SKIP"} = 1; | 42 | $default{"BISECT_SKIP"} = 1; |
@@ -96,6 +97,7 @@ my $monitor_pid; | |||
96 | my $monitor_cnt = 0; | 97 | my $monitor_cnt = 0; |
97 | my $sleep_time; | 98 | my $sleep_time; |
98 | my $bisect_sleep_time; | 99 | my $bisect_sleep_time; |
100 | my $patchcheck_sleep_time; | ||
99 | my $store_failures; | 101 | my $store_failures; |
100 | my $timeout; | 102 | my $timeout; |
101 | my $booted_timeout; | 103 | my $booted_timeout; |
@@ -1764,6 +1766,14 @@ sub config_bisect { | |||
1764 | success $i; | 1766 | success $i; |
1765 | } | 1767 | } |
1766 | 1768 | ||
1769 | sub patchcheck_reboot { | ||
1770 | doprint "Reboot and sleep $patchcheck_sleep_time seconds\n"; | ||
1771 | reboot; | ||
1772 | start_monitor; | ||
1773 | wait_for_monitor $patchcheck_sleep_time; | ||
1774 | end_monitor; | ||
1775 | } | ||
1776 | |||
1767 | sub patchcheck { | 1777 | sub patchcheck { |
1768 | my ($i) = @_; | 1778 | my ($i) = @_; |
1769 | 1779 | ||
@@ -1855,6 +1865,8 @@ sub patchcheck { | |||
1855 | end_monitor; | 1865 | end_monitor; |
1856 | return 0 if ($failed); | 1866 | return 0 if ($failed); |
1857 | 1867 | ||
1868 | patchcheck_reboot; | ||
1869 | |||
1858 | } | 1870 | } |
1859 | $in_patchcheck = 0; | 1871 | $in_patchcheck = 0; |
1860 | success $i; | 1872 | success $i; |
@@ -2004,6 +2016,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
2004 | $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i); | 2016 | $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i); |
2005 | $sleep_time = set_test_option("SLEEP_TIME", $i); | 2017 | $sleep_time = set_test_option("SLEEP_TIME", $i); |
2006 | $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i); | 2018 | $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i); |
2019 | $patchcheck_sleep_time = set_test_option("PATCHCHECK_SLEEP_TIME", $i); | ||
2007 | $bisect_manual = set_test_option("BISECT_MANUAL", $i); | 2020 | $bisect_manual = set_test_option("BISECT_MANUAL", $i); |
2008 | $bisect_skip = set_test_option("BISECT_SKIP", $i); | 2021 | $bisect_skip = set_test_option("BISECT_SKIP", $i); |
2009 | $store_failures = set_test_option("STORE_FAILURES", $i); | 2022 | $store_failures = set_test_option("STORE_FAILURES", $i); |