Skip to content

Commit

Permalink
ktest: Strip off '\n' when reading which files were modified
Browse files Browse the repository at this point in the history
The patchcheck test looks at what files are modified for each patch it
checks and makes sure that those files do not produce any warnings.

Unfortunately, when it read the diffstat, the newlines were added on the
files and this made compares miss warnings, and commits that should not
have passed, ktest let pass.

Fix this by using the perl command "chomp" that strips off whitespace at
the end of lines.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (Red Hat) committed Jan 30, 2013
1 parent 319ab14 commit 3527568
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,10 @@ sub check_buildlog {

my @files = `git show $patch | diffstat -l`;

foreach my $file (@files) {
chomp $file;
}

open(IN, "git show $patch |") or
dodie "failed to show $patch";
while (<IN>) {
Expand Down

0 comments on commit 3527568

Please sign in to comment.