Skip to content

Commit 4186cb4

Browse files
committed
ktest: Remove unused functions
After the rewrite of the config bisect, there were several unused functions that can be removed. One of the unused functions printed out the failed config nicer than what the rewrite did, so I kept that and used it to output the bad config. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent c4d1d11 commit 4186cb4

1 file changed

Lines changed: 1 addition & 62 deletions

File tree

‎tools/testing/ktest/ktest.pl‎

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,27 +2807,6 @@ sub process_config_ignore {
28072807
assign_configs \%config_ignore, $config;
28082808
}
28092809

2810-
sub 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-
28312810
sub get_dependencies {
28322811
my ($config) = @_;
28332812

@@ -2947,23 +2926,6 @@ sub run_config_bisect_test {
29472926
return run_bisect_test $type, "oldconfig";
29482927
}
29492928

2950-
sub 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-
29672929
sub process_failed {
29682930
my ($config) = @_;
29692931

@@ -3066,7 +3028,7 @@ sub run_config_bisect {
30663028
if (!$runtest && $len_diff > 0) {
30673029

30683030
if ($len_diff == 1) {
3069-
doprint "The bad config setting is: $diff_arr[0]\n";
3031+
process_failed $diff_arr[0];
30703032
return 1;
30713033
}
30723034
my %tmp_config = %bad_configs;
@@ -3471,29 +3433,6 @@ sub read_depends {
34713433
read_kconfig($kconfig);
34723434
}
34733435

3474-
sub 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-
3491-
sub read_output_config {
3492-
my ($config) = @_;
3493-
3494-
assign_configs \%config_ignore, $config;
3495-
}
3496-
34973436
sub make_new_config {
34983437
my @configs = @_;
34993438

0 commit comments

Comments
 (0)