mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
ktest.pl: Allow for the config-bisect.pl output to display to console
When commands are run in ktest, they are only displayed in the ktest log file, but that is not sufficient for outputting the display for config bisects. The result of a config bisect is not shown. Add a way to display the output of "run_command" which is the subroutine used by ktest to execute commands. Use this feature to display the output of config-bisect.pl executions to see the progress as well as the result. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
a9adc261e9
commit
b337f9790a
@ -1692,6 +1692,7 @@ sub run_command {
|
||||
my $end_time;
|
||||
my $dolog = 0;
|
||||
my $dord = 0;
|
||||
my $dostdout = 0;
|
||||
my $pid;
|
||||
|
||||
$command =~ s/\$SSH_USER/$ssh_user/g;
|
||||
@ -1710,10 +1711,16 @@ sub run_command {
|
||||
}
|
||||
|
||||
if (defined($redirect)) {
|
||||
if ($redirect eq 1) {
|
||||
$dostdout = 1;
|
||||
# Have the output of the command on its own line
|
||||
doprint "\n";
|
||||
} else {
|
||||
open (RD, ">$redirect") or
|
||||
dodie "failed to write to redirect $redirect";
|
||||
$dord = 1;
|
||||
}
|
||||
}
|
||||
|
||||
my $hit_timeout = 0;
|
||||
|
||||
@ -1734,6 +1741,7 @@ sub run_command {
|
||||
}
|
||||
print LOG $line if ($dolog);
|
||||
print RD $line if ($dord);
|
||||
print $line if ($dostdout);
|
||||
}
|
||||
|
||||
waitpid($pid, 0);
|
||||
@ -3118,7 +3126,7 @@ sub run_config_bisect {
|
||||
my $cmd;
|
||||
my $ret;
|
||||
|
||||
run_command "$builddir/tools/testing/ktest/config-bisect.pl -b $outputdir $good $bad $last_result";
|
||||
run_command "$builddir/tools/testing/ktest/config-bisect.pl -b $outputdir $good $bad $last_result", 1;
|
||||
|
||||
# config-bisect returns:
|
||||
# 0 if there is more to bisect
|
||||
|
Loading…
Reference in New Issue
Block a user