瀏覽代碼

ktest: Strip off '\n' when reading which files were modified

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>
Steven Rostedt (Red Hat) 12 年之前
父節點
當前提交
35275685bf
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tools/testing/ktest/ktest.pl

+ 4 - 0
tools/testing/ktest/ktest.pl

@@ -1925,6 +1925,10 @@ sub check_buildlog {
 
 
     my @files = `git show $patch | diffstat -l`;
     my @files = `git show $patch | diffstat -l`;
 
 
+    foreach my $file (@files) {
+	chomp $file;
+    }
+
     open(IN, "git show $patch |") or
     open(IN, "git show $patch |") or
 	dodie "failed to show $patch";
 	dodie "failed to show $patch";
     while (<IN>) {
     while (<IN>) {