mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect
If config-bisect.pl sees that a config_bisect has already been started, it will ask on the command line if it should bisect or not. This will mess up running config_bisect from ktest.pl. Have ktest.pl pass in '-r' to config-bisect.pl and have config-bisect.pl recognize that to reset without asking. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
b2b07ea282
commit
133087f062
@ -52,11 +52,11 @@
|
|||||||
|
|
||||||
# If "good" or "bad" is not stated at the end, it will copy the good and
|
# If "good" or "bad" is not stated at the end, it will copy the good and
|
||||||
# bad configs to the .tmp versions. If a .tmp version already exists, it will
|
# bad configs to the .tmp versions. If a .tmp version already exists, it will
|
||||||
# warn before writing over them. If the last config is labeled "good", then
|
# warn before writing over them (-r will not warn, and just write over them).
|
||||||
# it will copy it to the good .tmp version. If the last config is labeled
|
# If the last config is labeled "good", then it will copy it to the good .tmp
|
||||||
# "bad", it will copy it to the bad .tmp version. It will continue this until
|
# version. If the last config is labeled "bad", it will copy it to the bad
|
||||||
# it can not merge the two any more without the result being equal to either
|
# .tmp version. It will continue this until it can not merge the two any more
|
||||||
# the good or bad .tmp configs.
|
# without the result being equal to either the good or bad .tmp configs.
|
||||||
|
|
||||||
my $start = 0;
|
my $start = 0;
|
||||||
my $val = "";
|
my $val = "";
|
||||||
@ -67,6 +67,7 @@ my $tree = $pwd;
|
|||||||
my $build;
|
my $build;
|
||||||
|
|
||||||
my $output_config;
|
my $output_config;
|
||||||
|
my $reset_bisect;
|
||||||
|
|
||||||
sub usage {
|
sub usage {
|
||||||
print << "EOF"
|
print << "EOF"
|
||||||
@ -654,6 +655,10 @@ while ($#ARGV >= 0) {
|
|||||||
$tree = $val;
|
$tree = $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elsif ($opt eq "-r") {
|
||||||
|
$reset_bisect = 1;
|
||||||
|
}
|
||||||
|
|
||||||
elsif ($opt eq "-h") {
|
elsif ($opt eq "-h") {
|
||||||
usage;
|
usage;
|
||||||
}
|
}
|
||||||
@ -721,8 +726,10 @@ if ($start) {
|
|||||||
$p = "$p$bad exists\n";
|
$p = "$p$bad exists\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!read_yn "${p}Overwrite and start new bisect anyway?") {
|
if (!defined($reset_bisect)) {
|
||||||
exit (-1);
|
if (!read_yn "${p}Overwrite and start new bisect anyway?") {
|
||||||
|
exit (-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
run_command "cp $good_start $good" or die "failed to copy to $good\n";
|
run_command "cp $good_start $good" or die "failed to copy to $good\n";
|
||||||
|
@ -3127,10 +3127,14 @@ sub config_bisect_end {
|
|||||||
|
|
||||||
sub run_config_bisect {
|
sub run_config_bisect {
|
||||||
my ($good, $bad, $last_result) = @_;
|
my ($good, $bad, $last_result) = @_;
|
||||||
|
my $reset = "";
|
||||||
my $cmd;
|
my $cmd;
|
||||||
my $ret;
|
my $ret;
|
||||||
|
|
||||||
run_command "$builddir/tools/testing/ktest/config-bisect.pl -b $outputdir $good $bad $last_result", 1;
|
if (!length($last_result)) {
|
||||||
|
$reset = "-r";
|
||||||
|
}
|
||||||
|
run_command "$builddir/tools/testing/ktest/config-bisect.pl $reset -b $outputdir $good $bad $last_result", 1;
|
||||||
|
|
||||||
# config-bisect returns:
|
# config-bisect returns:
|
||||||
# 0 if there is more to bisect
|
# 0 if there is more to bisect
|
||||||
|
Loading…
Reference in New Issue
Block a user