]> Pileus Git - ~andy/linux/commitdiff
ktest: Strip off '\n' when reading which files were modified
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 30 Jan 2013 17:28:15 +0000 (12:28 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 30 Jan 2013 17:28:15 +0000 (12:28 -0500)
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>
tools/testing/ktest/ktest.pl

index d6690df5e7f1417b98d5f6a03830eff39ed3a80a..cc9925a68f2ac909589da3b0dc868a90eb5537cb 100755 (executable)
@@ -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>) {