Skip to content

Commit 9dce29e

Browse files
committed
ktest.pl: Have config-bisect save each config used in the bisect
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) <[email protected]>
1 parent 9ebcfad commit 9dce29e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/testing/ktest/ktest.pl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3188,6 +3188,8 @@ sub config_bisect_end {
31883188
doprint "***************************************\n\n";
31893189
}
31903190

3191+
my $pass = 1;
3192+
31913193
sub run_config_bisect {
31923194
my ($good, $bad, $last_result) = @_;
31933195
my $reset = "";
@@ -3210,11 +3212,15 @@ sub run_config_bisect {
32103212

32113213
$ret = run_config_bisect_test $config_bisect_type;
32123214
if ($ret) {
3213-
doprint "NEW GOOD CONFIG\n";
3215+
doprint "NEW GOOD CONFIG ($pass)\n";
3216+
system("cp $output_config $tmpdir/good_config.tmp.$pass");
3217+
$pass++;
32143218
# Return 3 for good config
32153219
return 3;
32163220
} else {
3217-
doprint "NEW BAD CONFIG\n";
3221+
doprint "NEW BAD CONFIG ($pass)\n";
3222+
system("cp $output_config $tmpdir/bad_config.tmp.$pass");
3223+
$pass++;
32183224
# Return 4 for bad config
32193225
return 4;
32203226
}

0 commit comments

Comments
 (0)