diff --git a/checkpatch.pl b/checkpatch.pl index 70a3bb4..1dbb28e 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -2140,6 +2140,7 @@ sub process { my %commit_log_tags = (); my $has_changelog = 0; + my $has_diff_file = 0; my $has_doc = 0; my $has_test = 0; my $is_test = 0; @@ -2731,6 +2732,9 @@ sub process { if ($realfile =~ /^(?:static-build\/)?test\/.*\//) { $has_test = 1; } + if ($realfile =~ /\.result$/) { + $has_diff_file = 1; + } # check for repeated words separated by a single space # avoid false positive from list command eg, '-rw-r--r-- 1 root root' @@ -5158,6 +5162,10 @@ sub process { ERROR("NO_TEST", "Please add test or NO_TEST= tag\n"); } + if ($has_test && $has_diff_file) { + ERROR("DIFF_FILE", + "Please avoid tests with .result files\n"); + } } print report_dump();