Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319798
b: refs/heads/master
c: cf79fab
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jul 19, 2012
1 parent 0420aa5 commit 35436b0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0918612545e698e55889c15d25e5118ea09c1fd
refs/heads/master: cf79fab676b3aa3b5fbae95aab25e2d4e26e4224
46 changes: 46 additions & 0 deletions trunk/tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
my %entered_configs;
my %config_help;
my %variable;

# force_config is the list of configs that we force enabled (or disabled)
# in a .config file. The MIN_CONFIG and ADD_CONFIG configs.
my %force_config;

# do not force reboots on config problems
Expand Down Expand Up @@ -1837,6 +1840,7 @@ sub make_oldconfig {
sub load_force_config {
my ($config) = @_;

doprint "Loading force configs from $config\n";
open(IN, $config) or
dodie "failed to read $config";
while (<IN>) {
Expand Down Expand Up @@ -2389,9 +2393,24 @@ sub bisect {
success $i;
}

# config_ignore holds the configs that were set (or unset) for
# a good config and we will ignore these configs for the rest
# of a config bisect. These configs stay as they were.
my %config_ignore;

# config_set holds what all configs were set as.
my %config_set;

# config_off holds the set of configs that the bad config had disabled.
# We need to record them and set them in the .config when running
# oldnoconfig, because oldnoconfig does not turn off new symbols, but
# instead just keeps the defaults.
my %config_off;

# config_off_tmp holds a set of configs to turn off for now
my @config_off_tmp;

# config_list is the set of configs that are being tested
my %config_list;
my %null_config;

Expand Down Expand Up @@ -2470,6 +2489,16 @@ sub create_config {
}
}

# turn off configs to keep off
foreach my $config (keys %config_off) {
print OUT "# $config is not set\n";
}

# turn off configs that should be off for now
foreach my $config (@config_off_tmp) {
print OUT "# $config is not set\n";
}

foreach my $config (keys %config_ignore) {
print OUT "$config_ignore{$config}\n";
}
Expand Down Expand Up @@ -2551,6 +2580,13 @@ sub run_config_bisect {
do {
my @tophalf = @start_list[0 .. $half];

# keep the bottom half off
if ($half < $#start_list) {
@config_off_tmp = @start_list[$half + 1 .. $#start_list];
} else {
@config_off_tmp = ();
}

create_config @tophalf;
read_current_config \%current_config;

Expand All @@ -2567,7 +2603,11 @@ sub run_config_bisect {
if (!$found) {
# try the other half
doprint "Top half produced no set configs, trying bottom half\n";

# keep the top half off
@config_off_tmp = @tophalf;
@tophalf = @start_list[$half + 1 .. $#start_list];

create_config @tophalf;
read_current_config \%current_config;
foreach my $config (@tophalf) {
Expand Down Expand Up @@ -2705,6 +2745,10 @@ sub config_bisect {
$added_configs{$2} = $1;
$config_list{$2} = $1;
}
} elsif (/^# ((CONFIG\S*).*)/) {
# Keep these configs disabled
$config_set{$2} = $1;
$config_off{$2} = $1;
}
}
close(IN);
Expand All @@ -2727,6 +2771,8 @@ sub config_bisect {
my %config_test;
my $once = 0;

@config_off_tmp = ();

# Sometimes kconfig does weird things. We must make sure
# that the config we autocreate has everything we need
# to test, otherwise we may miss testing configs, or
Expand Down

0 comments on commit 35436b0

Please sign in to comment.