[PATCH 2/7] ktest: Strip off \n when reading which files were modified
From: Steven Rostedt
Date: Tue Feb 19 2013 - 23:09:49 EST
From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>
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@xxxxxxxxxxx>
---
tools/testing/ktest/ktest.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index d6690df..cc9925a 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -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>) {
--
1.7.10.4
Attachment:
signature.asc
Description: This is a digitally signed message part