aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-06-01 23:22:30 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-06-02 11:57:41 -0400
commit4c8cc55b3c0ebe989e727017933945b68b4327cd (patch)
tree725aa612c6d01c912e724c3dc0e1eb8f4e1b2712 /tools
parent55922c9d1b84b89cb946c777fddccb3247e7df2c (diff)
ktest: Fix off-by-one in config bisect result
Because in perl the array size returned by $#arr, is the last index and not the actually size of the array, we end the config bisect early, thinking there is only one config left when there are in fact two. Thus the result has a 50% chance of picking the correct config that caused the problem. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 1fd29b2daa92..8dc8c3cf3acf 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1638,7 +1638,7 @@ sub run_config_bisect {
1638 if (!$found) { 1638 if (!$found) {
1639 # try the other half 1639 # try the other half
1640 doprint "Top half produced no set configs, trying bottom half\n"; 1640 doprint "Top half produced no set configs, trying bottom half\n";
1641 @tophalf = @start_list[$half .. $#start_list]; 1641 @tophalf = @start_list[$half + 1 .. $#start_list];
1642 create_config @tophalf; 1642 create_config @tophalf;
1643 read_current_config \%current_config; 1643 read_current_config \%current_config;
1644 foreach my $config (@tophalf) { 1644 foreach my $config (@tophalf) {
@@ -1690,7 +1690,7 @@ sub run_config_bisect {
1690 # remove half the configs we are looking at and see if 1690 # remove half the configs we are looking at and see if
1691 # they are good. 1691 # they are good.
1692 $half = int($#start_list / 2); 1692 $half = int($#start_list / 2);
1693 } while ($half > 0); 1693 } while ($#start_list > 0);
1694 1694
1695 # we found a single config, try it again unless we are running manually 1695 # we found a single config, try it again unless we are running manually
1696 1696