summaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl63
1 files changed, 1 insertions, 62 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 59697ead9dfc..880566803431 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2807,27 +2807,6 @@ sub process_config_ignore {
2807 assign_configs \%config_ignore, $config; 2807 assign_configs \%config_ignore, $config;
2808} 2808}
2809 2809
2810sub read_current_config {
2811 my ($config_ref) = @_;
2812
2813 %{$config_ref} = ();
2814 undef %{$config_ref};
2815
2816 my @key = keys %{$config_ref};
2817 if ($#key >= 0) {
2818 print "did not delete!\n";
2819 exit;
2820 }
2821 open (IN, "$output_config");
2822
2823 while (<IN>) {
2824 if (/^(CONFIG\S+)=(.*)/) {
2825 ${$config_ref}{$1} = $2;
2826 }
2827 }
2828 close(IN);
2829}
2830
2831sub get_dependencies { 2810sub get_dependencies {
2832 my ($config) = @_; 2811 my ($config) = @_;
2833 2812
@@ -2947,23 +2926,6 @@ sub run_config_bisect_test {
2947 return run_bisect_test $type, "oldconfig"; 2926 return run_bisect_test $type, "oldconfig";
2948} 2927}
2949 2928
2950sub process_passed {
2951 my (%configs) = @_;
2952
2953 doprint "These configs had no failure: (Enabling them for further compiles)\n";
2954 # Passed! All these configs are part of a good compile.
2955 # Add them to the min options.
2956 foreach my $config (keys %configs) {
2957 if (defined($config_list{$config})) {
2958 doprint " removing $config\n";
2959 $config_ignore{$config} = $config_list{$config};
2960 delete $config_list{$config};
2961 }
2962 }
2963 doprint "config copied to $outputdir/config_good\n";
2964 run_command "cp -f $output_config $outputdir/config_good";
2965}
2966
2967sub process_failed { 2929sub process_failed {
2968 my ($config) = @_; 2930 my ($config) = @_;
2969 2931
@@ -3066,7 +3028,7 @@ sub run_config_bisect {
3066 if (!$runtest && $len_diff > 0) { 3028 if (!$runtest && $len_diff > 0) {
3067 3029
3068 if ($len_diff == 1) { 3030 if ($len_diff == 1) {
3069 doprint "The bad config setting is: $diff_arr[0]\n"; 3031 process_failed $diff_arr[0];
3070 return 1; 3032 return 1;
3071 } 3033 }
3072 my %tmp_config = %bad_configs; 3034 my %tmp_config = %bad_configs;
@@ -3471,29 +3433,6 @@ sub read_depends {
3471 read_kconfig($kconfig); 3433 read_kconfig($kconfig);
3472} 3434}
3473 3435
3474sub read_config_list {
3475 my ($config) = @_;
3476
3477 open (IN, $config)
3478 or dodie "Failed to read $config";
3479
3480 while (<IN>) {
3481 if (/^((CONFIG\S*)=.*)/) {
3482 if (!defined($config_ignore{$2})) {
3483 $config_list{$2} = $1;
3484 }
3485 }
3486 }
3487
3488 close(IN);
3489}
3490
3491sub read_output_config {
3492 my ($config) = @_;
3493
3494 assign_configs \%config_ignore, $config;
3495}
3496
3497sub make_new_config { 3436sub make_new_config {
3498 my @configs = @_; 3437 my @configs = @_;
3499 3438