aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-04 15:42:08 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-06 14:08:03 -0400
commit133087f0623e927dfdf439a1b6a4e819a7a5f3ea (patch)
tree0c328ac8dbba3638fe0e15443aa4a238484d44d2 /tools
parentb2b07ea282721b6c7bed21e95e2c00dd95cb8520 (diff)
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/config-bisect.pl21
-rwxr-xr-xtools/testing/ktest/ktest.pl6
2 files changed, 19 insertions, 8 deletions
diff --git a/tools/testing/ktest/config-bisect.pl b/tools/testing/ktest/config-bisect.pl
index 37cd796efa2b..b28feea7c363 100755
--- a/tools/testing/ktest/config-bisect.pl
+++ b/tools/testing/ktest/config-bisect.pl
@@ -52,11 +52,11 @@
52 52
53# If "good" or "bad" is not stated at the end, it will copy the good and 53# If "good" or "bad" is not stated at the end, it will copy the good and
54# bad configs to the .tmp versions. If a .tmp version already exists, it will 54# bad configs to the .tmp versions. If a .tmp version already exists, it will
55# warn before writing over them. If the last config is labeled "good", then 55# warn before writing over them (-r will not warn, and just write over them).
56# it will copy it to the good .tmp version. If the last config is labeled 56# If the last config is labeled "good", then it will copy it to the good .tmp
57# "bad", it will copy it to the bad .tmp version. It will continue this until 57# version. If the last config is labeled "bad", it will copy it to the bad
58# it can not merge the two any more without the result being equal to either 58# .tmp version. It will continue this until it can not merge the two any more
59# the good or bad .tmp configs. 59# without the result being equal to either the good or bad .tmp configs.
60 60
61my $start = 0; 61my $start = 0;
62my $val = ""; 62my $val = "";
@@ -67,6 +67,7 @@ my $tree = $pwd;
67my $build; 67my $build;
68 68
69my $output_config; 69my $output_config;
70my $reset_bisect;
70 71
71sub usage { 72sub usage {
72 print << "EOF" 73 print << "EOF"
@@ -654,6 +655,10 @@ while ($#ARGV >= 0) {
654 $tree = $val; 655 $tree = $val;
655 } 656 }
656 657
658 elsif ($opt eq "-r") {
659 $reset_bisect = 1;
660 }
661
657 elsif ($opt eq "-h") { 662 elsif ($opt eq "-h") {
658 usage; 663 usage;
659 } 664 }
@@ -721,8 +726,10 @@ if ($start) {
721 $p = "$p$bad exists\n"; 726 $p = "$p$bad exists\n";
722 } 727 }
723 728
724 if (!read_yn "${p}Overwrite and start new bisect anyway?") { 729 if (!defined($reset_bisect)) {
725 exit (-1); 730 if (!read_yn "${p}Overwrite and start new bisect anyway?") {
731 exit (-1);
732 }
726 } 733 }
727 } 734 }
728 run_command "cp $good_start $good" or die "failed to copy to $good\n"; 735 run_command "cp $good_start $good" or die "failed to copy to $good\n";
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 27505fef2dab..fe6a7bb7d7d9 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -3127,10 +3127,14 @@ sub config_bisect_end {
3127 3127
3128sub run_config_bisect { 3128sub run_config_bisect {
3129 my ($good, $bad, $last_result) = @_; 3129 my ($good, $bad, $last_result) = @_;
3130 my $reset = "";
3130 my $cmd; 3131 my $cmd;
3131 my $ret; 3132 my $ret;
3132 3133
3133 run_command "$builddir/tools/testing/ktest/config-bisect.pl -b $outputdir $good $bad $last_result", 1; 3134 if (!length($last_result)) {
3135 $reset = "-r";
3136 }
3137 run_command "$builddir/tools/testing/ktest/config-bisect.pl $reset -b $outputdir $good $bad $last_result", 1;
3134 3138
3135 # config-bisect returns: 3139 # config-bisect returns:
3136 # 0 if there is more to bisect 3140 # 0 if there is more to bisect