Skip to content

Commit

Permalink
ktest.pl: Have config-bisect save each config used in the bisect
Browse files Browse the repository at this point in the history
When performing a automatic config bisect via ktest.pl, it is very useful to
have a copy of each of the bisects used. This way, if a bisect were to go
wrong, it is possible to retrace the steps and continue at the location
before the error was made.

The ktest.pl will make a copy of the good and bad configs, labeled as such,
as well as a number attached to it that represents the iteration of the
bisect. These files are saved in the ktest temp directory where it currently
stores the good and bad config files.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (VMware) committed Jul 1, 2020
1 parent 9ebcfad commit 9dce29e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3188,6 +3188,8 @@ sub config_bisect_end {
doprint "***************************************\n\n";
}

my $pass = 1;

sub run_config_bisect {
my ($good, $bad, $last_result) = @_;
my $reset = "";
Expand All @@ -3210,11 +3212,15 @@ sub run_config_bisect {

$ret = run_config_bisect_test $config_bisect_type;
if ($ret) {
doprint "NEW GOOD CONFIG\n";
doprint "NEW GOOD CONFIG ($pass)\n";
system("cp $output_config $tmpdir/good_config.tmp.$pass");
$pass++;
# Return 3 for good config
return 3;
} else {
doprint "NEW BAD CONFIG\n";
doprint "NEW BAD CONFIG ($pass)\n";
system("cp $output_config $tmpdir/bad_config.tmp.$pass");
$pass++;
# Return 4 for bad config
return 4;
}
Expand Down

0 comments on commit 9dce29e

Please sign in to comment.