提交 27d934b2 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

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: NSteven Rostedt <rostedt@goodmis.org>
上级 4025bc62
...@@ -36,6 +36,7 @@ $default{"REBOOT_ON_SUCCESS"} = 1; ...@@ -36,6 +36,7 @@ $default{"REBOOT_ON_SUCCESS"} = 1;
$default{"POWEROFF_ON_SUCCESS"} = 0; $default{"POWEROFF_ON_SUCCESS"} = 0;
$default{"BUILD_OPTIONS"} = ""; $default{"BUILD_OPTIONS"} = "";
$default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects $default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects
$default{"PATCHCHECK_SLEEP_TIME"} = 60; # sleep time between patch checks
$default{"CLEAR_LOG"} = 0; $default{"CLEAR_LOG"} = 0;
$default{"BISECT_MANUAL"} = 0; $default{"BISECT_MANUAL"} = 0;
$default{"BISECT_SKIP"} = 1; $default{"BISECT_SKIP"} = 1;
...@@ -96,6 +97,7 @@ my $monitor_pid; ...@@ -96,6 +97,7 @@ my $monitor_pid;
my $monitor_cnt = 0; my $monitor_cnt = 0;
my $sleep_time; my $sleep_time;
my $bisect_sleep_time; my $bisect_sleep_time;
my $patchcheck_sleep_time;
my $store_failures; my $store_failures;
my $timeout; my $timeout;
my $booted_timeout; my $booted_timeout;
...@@ -1764,6 +1766,14 @@ sub config_bisect { ...@@ -1764,6 +1766,14 @@ sub config_bisect {
success $i; success $i;
} }
sub patchcheck_reboot {
doprint "Reboot and sleep $patchcheck_sleep_time seconds\n";
reboot;
start_monitor;
wait_for_monitor $patchcheck_sleep_time;
end_monitor;
}
sub patchcheck { sub patchcheck {
my ($i) = @_; my ($i) = @_;
...@@ -1855,6 +1865,8 @@ sub patchcheck { ...@@ -1855,6 +1865,8 @@ sub patchcheck {
end_monitor; end_monitor;
return 0 if ($failed); return 0 if ($failed);
patchcheck_reboot;
} }
$in_patchcheck = 0; $in_patchcheck = 0;
success $i; success $i;
...@@ -2004,6 +2016,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { ...@@ -2004,6 +2016,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
$poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i); $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i);
$sleep_time = set_test_option("SLEEP_TIME", $i); $sleep_time = set_test_option("SLEEP_TIME", $i);
$bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i); $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i);
$patchcheck_sleep_time = set_test_option("PATCHCHECK_SLEEP_TIME", $i);
$bisect_manual = set_test_option("BISECT_MANUAL", $i); $bisect_manual = set_test_option("BISECT_MANUAL", $i);
$bisect_skip = set_test_option("BISECT_SKIP", $i); $bisect_skip = set_test_option("BISECT_SKIP", $i);
$store_failures = set_test_option("STORE_FAILURES", $i); $store_failures = set_test_option("STORE_FAILURES", $i);
......
...@@ -366,6 +366,10 @@ ...@@ -366,6 +366,10 @@
# (default 60) # (default 60)
#BISECT_SLEEP_TIME = 60 #BISECT_SLEEP_TIME = 60
# The time in between patch checks to sleep (in seconds)
# (default 60)
#PATCHCHECK_SLEEP_TIME = 60
# Reboot the target box on error (default 0) # Reboot the target box on error (default 0)
#REBOOT_ON_ERROR = 0 #REBOOT_ON_ERROR = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册