diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-07-15 22:01:56 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-07-15 22:01:56 -0400 |
commit | 43d1b6518e523df1bd15f07be480d10a9eb043bc (patch) | |
tree | 8362aa52fae89d8933839b9e47fca761f4494f43 /tools/testing/ktest | |
parent | 35ce5952e62bc72520e6a7dbcfa4baf8c9f9eedb (diff) |
ktest: Keep fonud configs separate from default configs
The IGNORE_CONFIG file holds the configs that we don't want to change
(with their proper settings). But on start up, the make noconfig is
executed, and the configs that are on are also put into the ignore
config category. But these are configs that were forced on by the
kconfig scripts and not something that we found must be enabled to boot
our machine. By keeping the configs that are forced on by default,
separate from the configs we found that are required to boot the box, we
can get a much more interesting IGNORE_CONFIG. In fact, the
IGNORE_CONFIG can usually end up being the must have configs to boot,
and only have 6 or 7 configs set.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index cf45f58f8fdf..e826704703f4 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -2405,6 +2405,7 @@ sub get_depends { | |||
2405 | 2405 | ||
2406 | my %min_configs; | 2406 | my %min_configs; |
2407 | my %keep_configs; | 2407 | my %keep_configs; |
2408 | my %save_configs; | ||
2408 | my %processed_configs; | 2409 | my %processed_configs; |
2409 | my %nochange_config; | 2410 | my %nochange_config; |
2410 | 2411 | ||
@@ -2496,15 +2497,17 @@ sub make_min_config { | |||
2496 | 2497 | ||
2497 | process_config_ignore $output_config; | 2498 | process_config_ignore $output_config; |
2498 | 2499 | ||
2499 | undef %keep_configs; | 2500 | undef %save_configs; |
2500 | undef %min_configs; | 2501 | undef %min_configs; |
2501 | 2502 | ||
2502 | if (defined($ignore_config)) { | 2503 | if (defined($ignore_config)) { |
2503 | # make sure the file exists | 2504 | # make sure the file exists |
2504 | `touch $ignore_config`; | 2505 | `touch $ignore_config`; |
2505 | assign_configs \%keep_configs, $ignore_config; | 2506 | assign_configs \%save_configs, $ignore_config; |
2506 | } | 2507 | } |
2507 | 2508 | ||
2509 | %keep_configs = %save_configs; | ||
2510 | |||
2508 | doprint "Load initial configs from $start_minconfig\n"; | 2511 | doprint "Load initial configs from $start_minconfig\n"; |
2509 | 2512 | ||
2510 | # Look at the current min configs, and save off all the | 2513 | # Look at the current min configs, and save off all the |
@@ -2614,14 +2617,15 @@ sub make_min_config { | |||
2614 | doprint "$min_configs{$config} is needed to boot the box... keeping\n"; | 2617 | doprint "$min_configs{$config} is needed to boot the box... keeping\n"; |
2615 | # this config is needed, add it to the ignore list. | 2618 | # this config is needed, add it to the ignore list. |
2616 | $keep_configs{$config} = $min_configs{$config}; | 2619 | $keep_configs{$config} = $min_configs{$config}; |
2620 | $save_configs{$config} = $min_configs{$config}; | ||
2617 | delete $min_configs{$config}; | 2621 | delete $min_configs{$config}; |
2618 | 2622 | ||
2619 | # update new ignore configs | 2623 | # update new ignore configs |
2620 | if (defined($ignore_config)) { | 2624 | if (defined($ignore_config)) { |
2621 | open (OUT, ">$temp_config") | 2625 | open (OUT, ">$temp_config") |
2622 | or die "Can't write to $temp_config"; | 2626 | or die "Can't write to $temp_config"; |
2623 | foreach my $config (keys %keep_configs) { | 2627 | foreach my $config (keys %save_configs) { |
2624 | print OUT "$keep_configs{$config}\n"; | 2628 | print OUT "$save_configs{$config}\n"; |
2625 | } | 2629 | } |
2626 | close OUT; | 2630 | close OUT; |
2627 | run_command "mv $temp_config $ignore_config" or | 2631 | run_command "mv $temp_config $ignore_config" or |